Commit Graph

57 Commits

Author SHA1 Message Date
Tarek Ziadé
540acfadac Bug 1470073 - Make IOActivityMonitor timer optional - r=valentin
- Introduced the io.activity.enabled pref, so IOActivityMonitor can run without a timer
- Added IOActivityMonitor::NotifyActivities() to trigger notifications manually
- Added ChromeUtils.requestIOActivity() so we can trigger it via JS

MozReview-Commit-ID: 9JA2rLaM496
2018-06-26 10:43:16 +02:00
arthur.iakab
3393874725 Backed out changeset b5e89c1b4e8c (bug 1470073) for failing browser chrome tests on browser_test_io_activity.js on a CLOSED TREE 2018-06-26 04:10:45 +03:00
Tarek Ziadé
35c063c5f6 Bug 1470073 - Make IOActivityMonitor timer optional - r=valentin
- Introduced the io.activity.enabled pref, so IOActivityMonitor can run without a timer
- Added IOActivityMonitor::NotifyActivities() to trigger notifications manually
- Added ChromeUtils.requestIOActivity() so we can trigger it via JS

MozReview-Commit-ID: 9JA2rLaM496
2018-06-25 18:32:22 +02:00
Kris Maglione
578d3a9021 Bug 1456035: Part 1 - Add helper to generate native QueryInterface callbacks. r=bz
MozReview-Commit-ID: JpV6zYOdvHu
2018-04-22 20:32:11 -07:00
Tarek Ziadé
481052965e Bug 1452580 - remove RELEASE_OR_BETA defines for PerformanceCounter usage - r=baku,erahm,farre
PerformanceCounters are currently disabled in two ways:

- a preference that's off by default "dom.performance.enable_scheduler_timing"
- calls made only for nightly using #ifndef RELEASE_OR_BETA

In order to simplify the code, let's remove the #ifndef and rely only on the pref.
That will also allows us to use the feature in every version going forward.

The performance will not be impacted since the current code is already using
the (cached) pref value to determine if the counters are used.

MozReview-Commit-ID: 47t2M1O13aH
2018-04-24 22:03:06 +02:00
Tarek Ziadé
e463333fe4 Bug 1443443 - Extend PContent to retrieve Performance Counters in the parent process - r=baku
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.

MozReview-Commit-ID: RbKstNx8pi
2018-03-20 20:07:41 +01:00
Cosmin Sabou
3a4bdd413d Backed out changeset fae7d9814403 (bug 1443443) for mochitest browser-chrome failure on browser_test_performance_metrics.js 2018-03-20 20:31:01 +02:00
Tarek Ziadé
e4239d612f Bug 1443443 - Extend PContent to retrieve Performance Counters in the parent process - r=baku
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.

MozReview-Commit-ID: RbKstNx8pi
2018-03-20 17:19:32 +01:00
Noemi Erli
68cc0e4e1b Backed out changeset 20e9096156b0 (bug 1443443) for failing in dom/tests/browser/browser_test_performance_metrics.js on a CLOSED TREE 2018-03-20 18:07:54 +02:00
Tarek Ziadé
a402a2a595 Bug 1443443 - Extend PContent to retrieve Performance Counters in the parent process - r=baku
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.

MozReview-Commit-ID: RbKstNx8pi
2018-03-20 14:13:37 +01:00
Kris Maglione
e20a16424e Bug 1441333: Part 3 - Add helper to create a JS error with a saved stack. r=bz
There's no standard way to create a JS error with full stack and location
information from a saved stack. Since we need this functionality in order to
reject promises with useful Error objects, this patch adds a simple helper to
make that possible.

MozReview-Commit-ID: FyGuo4UjfsQ
2018-03-01 14:00:00 -08:00
Kris Maglione
6af0f88e72 Bug 1441333: Part 1 - Add helper to retrieve closest stack frame with a given principal. r=bz
Most WebExtension APIs are async, and have fairly complicated error reporting
semantics. As a result, when we report an error, the current JS stack has very
little to do with the JS caller that triggered the error, which makes it
difficult to diagnose.

In order to improve the situation, we need to store the location of the caller
at the start of an async operation, so we can tie the error to some marginally
useful location. We don't have a reasonable way to do that now other than
proactively creating an error object when the API is called, or creating a
promise with a full async stack, both of which are too expensive.

This helper instead returns a single SavedStack frame with a given principal,
which should be considerably cheaper, and likely good enough to give a
starting point for debugging cryptic errors.

MozReview-Commit-ID: BTxhpZK9Fdz
2017-11-11 17:39:16 -08:00
Kris Maglione
6a672d70e1 Bug 1431533: Part 2 - Add ChromeUtils.defineModuleGetter helper. r=bz
This helper makes it easy to lazily import a JavaScript module the first time
one of its exports is required. It is intended to replace
XPCOMUtils.defineLazyModuleGetter, which has similar functionality but is much
less efficient.

MozReview-Commit-ID: 2zxXYwrn3Dr
2018-01-17 19:20:16 -08:00
Boris Zbarsky
7b4c6fb282 Bug 1431057 part 1. Add a ChromeUtils.import that does what Cu.import does. r=kmag
MozReview-Commit-ID: IOaL8fdyoGO
2017-12-15 23:30:25 -06:00
David Teller
c572e064a3 Bug 1409852 - Expose an API in ChromeUtils to detect chrome JS dev errors;r=bz
MozReview-Commit-ID: GluMLeQOHTZ
2017-11-16 10:48:45 +01:00
Csoregi Natalia
a7ffe7d981 Backed out 3 changesets (bug 1409852) for build bustage and failing test_js_dev_error_interceptor.js. r=backout on a CLOSED TREE
Backed out changeset 06368bf1a32c (bug 1409852)
Backed out changeset 46fce9a2622d (bug 1409852)
Backed out changeset 649d7bdf80ad (bug 1409852)
2017-12-21 15:31:27 +02:00
David Teller
ebfea04c0f Bug 1409852 - Expose an API in ChromeUtils to detect chrome JS dev errors;r=bz
MozReview-Commit-ID: GluMLeQOHTZ
2017-11-16 10:48:45 +01:00
Boris Zbarsky
5e2f01813d Bug 1415389. Make ChromeUtils a WebIDL namespace. Remove ThreadSafeChromeUtils. r=kmag
MozReview-Commit-ID: 9ysAeaBMNVt
2017-11-08 00:25:33 -05:00
Andrew McCreight
2c2e9cbbbe Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL
2017-10-26 15:08:41 -07:00
Kris Maglione
6a73a3d9a3 Bug 1404652: Part 1 - Add ChromeUtils.idleDispatch helper method. r=ehsan
This is similar to Services.tm.idleDispatchToMainThread, but provides an
IdleDeadline argument to its callbacks, the same way that
Window.requestIdleCallback does.

The IdleDeadline argument was necessary for my first attempt at this bug. It's
not necessary for the current version, but I suspect it will be useful in
other areas, and it also avoids some XPConnect overhead, so it's probably
worth keeping.

MozReview-Commit-ID: FtrbNkE7Vz5
2017-09-23 22:12:32 -07:00
Bobby Holley
b1404a6cc6 Bug 1403397 - Revert: Add a testing API. r=bholley
This reverts commit 4194b7dd8ec748c044a9b8b0967fd9d652ea342c.
2017-10-03 14:05:56 -07:00
Bobby Holley
9176b13fd1 Bug 1403397 - Add a testing API. r=bz,r=Manishearth
This will allow us to verify the entire detection pipeline in real nightly
builds, which will give us confidence that real heap corruption will be
detected and reported properly.

MozReview-Commit-ID: 43Fp2HT8RYy
2017-09-28 18:23:15 -07:00
Kris Maglione
29763b3d3d Bug 1391405: Part 5 - Add helper for retrieving the enumerable value properties of a cross-compartment object. r=gabor,qdot
As part of the normalization process for WebExtension API calls, we need to
extract and validate the full set of value properties (including properties
X-rays would normally deny access to) from cross-compartment objects. This
currently involves waiving X-rays, enumerating property descriptors, and
unwaiving X-rays - all through X-ray wrappers and waivers - and generating a
lot of expensive and short-lived wrappers in-between.

This helper reads out the list of safe properties from within the object's
compartment, and then copies them over to an object in the target compartment,
without any X-ray overhead, or any unnecessary intermediate wrappers or
compartment switches. It cuts about 40% off the overhead of our normalization
code.

MozReview-Commit-ID: H582oAYocaX
2017-08-24 13:33:40 -07:00
Kris Maglione
d2ab8e0ac2 Bug 1391405: Part 1 - Add WebIDL versions of much used Components.utils helpers. r=gabor,qdot
In the code that I'm profiling, the XPC WrappedNative overhead of calling
these functions adds up to about a quarter of the time spent executing the
code. The overhead of the WebIDL versions is negligible.

MozReview-Commit-ID: 30qJy5RtP9d
2017-08-18 11:10:10 -07:00
Andrew McCreight
df7cef86b2 Bug 1350435 - Compute snapshot ID in the parent process. r=fitzgen,smaug
The parent and content processes can have different temp directories
when sandboxing is enabled, so the process that creates the file for a
heap snapshot must also determine the snapshot ID.

MozReview-Commit-ID: 2UuncT54NXc
2017-03-24 10:34:44 -07:00
Kris Maglione
c7bc8231f7 Bug 1333990: Part 1a - Add an async script pre-loading utility. r=billm,shu
MozReview-Commit-ID: 4vJF2drLeHS
2017-03-16 19:10:40 -07:00
Ehsan Akhgari
25b778293e Bug 1344974 - Part 2: Make the non-virtual helpers for principal equality/subsumption checks inline; r=bholley 2017-03-07 00:29:27 -05:00
Kris Maglione
88a6d45c04 Bug 1314361 - Part 5: Remove origin attribute comparison helpers for ignoring addonId. r=bholley 2016-11-04 14:32:26 -07:00
Tim Huang
2386b8b73e Bug 1319773 - Part 1: Add a SubsumesConsideringDomainIgnoringFPD in BasePrincipal. r=baku 2017-01-18 20:17:19 +08:00
Andrea Marchesini
6fdea0f7b1 Bug 1315905 - Cleanup Necko http security check - part 1, r=valentin 2016-11-17 14:52:16 +01:00
Andrea Marchesini
7f7472a4fd Bug 1271516 - Introducing nsIWebNavigation.setOriginAttributesBeforeLoading, r=smaug 2016-06-07 19:59:22 +02:00
Phil Ringnalda
732de24a7c Back out 32d16086e85e (bug 1271516) for frequent ChromeUtils::IsOriginAttributesEqual assertin failures
CLOSED TREE
2016-06-06 21:07:42 -07:00
Andrea Marchesini
c151ac65b4 Bug 1271516 - Introducing nsIWebNavigation.setOriginAttributesBeforeLoading, r=smaug 2016-06-07 00:47:13 +02:00
Kit Cambridge
7ff3e6eac9 Bug 1256488 - Add a Base64 URL-decoder for C++ and chrome JS callers. r=mt,baku
MozReview-Commit-ID: IrDwImYfHRu
2016-03-22 12:09:04 -07:00
Dave Huseby
d7c8e692f6 Bug 1238177 - fix extension content needs to use the correct user context id origin attribute. r=sicking
(HEAD -> oa, refs/patches/oa/Bug_1238177)
Fixes Bug 1238177 -- extension content needs to use the correct user context id origin attribute
2016-04-04 12:20:00 +02:00
Carsten "Tomcat" Book
4446c02b47 Backed out changeset 0519406b6e57 (bug 1238177) for eslint test failures 2016-04-03 09:30:03 +02:00
Dave Huseby
4a361948ce Bug 1238177 - Extension content needs to use the correct user context id origin attribute. r=bholley 2016-04-02 13:14:00 -04:00
Dave Huseby
af2143c78d Bug 1229222 - add chromeutils for the creation of origin attributes with the correct default values. r=sicking
(HEAD -> oa, refs/patches/oa/Bug_1229222)
Fixes Bug 1229222
2016-02-29 12:26:00 +01:00
Andrea Marchesini
5685489215 Bug 1245184 - nsICookieManager.remove should use the OriginAttributes, r=sicking 2016-02-25 16:41:13 +01:00
Carsten "Tomcat" Book
dd540f5334 Backed out changeset e4b8bb93313b (bug 1229222) 2016-02-19 15:55:25 +01:00
Carsten "Tomcat" Book
a50632893b Backed out changeset 27f3968ae8b2 (bug 1245184) 2016-02-19 15:55:23 +01:00
Andrea Marchesini
9111a1ecc9 Bug 1245184 - CookieManager should remove cookies only if they match the userContextId, r=sicking 2016-02-19 14:49:50 +01:00
Dave Huseby
800ab5025d Bug 1229222 - add chromeutils for the creation of origin attributes with the correct default values. r=sicking
(HEAD -> oa, refs/patches/oa/Bug_1229222)
Fixes Bug 1229222
2016-02-18 13:42:00 +01:00
Andrea Marchesini
9c267e07a9 Bug 1235657 - Session storage needs to handle origin attributes correctly - part 1 - createOriginAttributesWithUserContextId, r=huseby 2016-01-06 10:08:30 +00:00
Carsten "Tomcat" Book
04b45a986d Merge mozilla-central to mozilla-inbound 2015-11-17 12:33:46 +01:00
Tom Tromey
38351dc381 Bug 1223954 - don't use implicitJSContext for readHeapSnapshot and saveHeapSnapshot; r=bz 2015-11-12 08:51:00 +01:00
Tom Tromey
f80a26c683 Bug 1165807 - display WeakSet and WeakMap contents in console; r=bz,fitzgen 2015-11-16 06:50:00 -08:00
Tom Tromey
743134b3e7 Bug 1221292 - move nondeterministicGetWeakMapKeys to ThreadSafeChromeUtils; r=bz 2015-11-11 12:55:00 +01:00
J. Ryan Stinnett
b17c143421 Bug 912121 - Update misc. DevTools paths and comments. rs=devtools 2015-09-21 12:07:31 -05:00
Nick Fitzgerald
7b4a033aee Bug 1201597 - Part 0: Make saveHeapSnapshot return the file path rather than take it as a parameter; r=bholley
This changeset modifies the ThreadSafeChromeUtils::saveHeapSnapshot webidl
method to return the path to the core dump file where the heap snapshot was
serialized rather than taking the file path as a parameter.

By removing the ability for callers to choose a path, we pave the way for
enabling taking heap snapshots in sandboxed child processes (e10s, fxos) that do
not have access to the filesystem directly and must be handed a file descriptor
over IPDL. Additionally, the devtools API consumers were not taking advantage of
the ability to choose a file path, and always saving heap snapshots into the
temp directory anyways.
2015-09-15 11:26:46 +05:30