Граф коммитов

63 Коммитов

Автор SHA1 Сообщение Дата
Tarek Ziadé bcf6f4c256 Bug 1471517 - Converts ChromeUtils.requestPerformanceMetrics as Promise - r=baku
This ChromeUtils API now returns a promise that gets resolved once all the data
has been collected via IPDL and the main process. The existing notification
design and its related XPCOM classes are removed.

MozReview-Commit-ID: CYKukBOC8yh

--HG--
extra : rebase_source : 1e27524726ace0bfed5297d48af8be268c5b4945
2018-07-05 16:32:03 +02:00
Tarek Ziadé 8533ddcaac Bug 1472718 - Convert ChromeUtils.requestIOActivity to a Promise - r=baku,valentin
Changes:

- The API now returns a Promise containing a sequence of IOActivityData dictionnaries.
- All the code related to notifications and XPCOM is removed.
- The counters are no longer reset to 0 when the API is called

MozReview-Commit-ID: 7J2EgFqDgf

--HG--
extra : rebase_source : eb7dc3e0921b12bbb3715a90863dc8e2a60c1c09
2018-07-06 13:43:08 +02:00
Margareta Eliza Balazs 4ee26c6e5e Backed out changeset c22aa9571139 (bug 1472718) for failures in browser/browser_test_io_activity.js on a CLOSED TREE 2018-07-06 11:04:39 +03:00
Margareta Eliza Balazs 9974f39b66 Backed out changeset f177b4c9bdcd (bug 1471517) for causing failures in netwerk/test/browser/browser_test_io_activity.js on a CLOSED TREE 2018-07-06 11:02:21 +03:00
Tarek Ziadé 80d44a0d4e Bug 1471517 - Converts ChromeUtils.requestPerformanceMetrics as Promise - r=baku
This ChromeUtils API now returns a promise that gets resolved once all the data
has been collected via IPDL and the main process. The existing notification
design and its related XPCOM classes are removed.

MozReview-Commit-ID: CYKukBOC8yh

--HG--
extra : rebase_source : 1e27524726ace0bfed5297d48af8be268c5b4945
2018-07-05 16:32:03 +02:00
Tarek Ziadé 12c531f562 Bug 1472718 - Convert ChromeUtils.requestIOActivity to a Promise - r=baku,valentin
Changes:

- The API now returns a Promise containing a sequence of IOActivityData dictionnaries.
- All the code related to notifications and XPCOM is removed.
- The counters are no longer reset to 0 when the API is called

MozReview-Commit-ID: 7J2EgFqDgf

--HG--
extra : rebase_source : 4e16640a3f52fd7c042687471153971a66158623
2018-07-06 02:10:33 +02:00
Tarek Ziadé 7158cbfa29 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

--HG--
extra : rebase_source : e473a7b0ec7c231ab321846c5ddcc4d6a88d7245
2018-06-26 10:43:16 +02:00
arthur.iakab 05cc8bb814 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é 0f643a27fd 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

--HG--
extra : rebase_source : 0a92195b6b8314383c63de4b2bb1dfe033c40e9f
2018-06-25 18:32:22 +02:00
Kris Maglione dc8ba3688b Bug 1456035: Part 1 - Add helper to generate native QueryInterface callbacks. r=bz
MozReview-Commit-ID: JpV6zYOdvHu

--HG--
extra : rebase_source : 4aeda7c2c612dd9c7dbb7b6f4fdd33b8b289b702
2018-04-22 20:32:11 -07:00
Tarek Ziadé 90bafd1f42 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

--HG--
extra : rebase_source : e129e1829f1dc37c019e50e156474c4876d6d6cb
2018-04-24 22:03:06 +02:00
Tarek Ziadé 255bc818dc 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

--HG--
extra : rebase_source : d7c00f2ef16623dbbd88ede0f6636ca56501e151
2018-03-20 20:07:41 +01:00
Cosmin Sabou 6f9a8dd015 Backed out changeset fae7d9814403 (bug 1443443) for mochitest browser-chrome failure on browser_test_performance_metrics.js
--HG--
extra : rebase_source : 03d120899e3898ec18e2fd226973f38d438a156a
2018-03-20 20:31:01 +02:00
Tarek Ziadé 3073443de2 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

--HG--
extra : rebase_source : f81058b9bdd67c2f77bb5cd45d3838bc12f406ea
2018-03-20 17:19:32 +01:00
Noemi Erli a3b2dc08d7 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é 49896a66d5 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

--HG--
extra : rebase_source : 673bbf79f5e20493eee5e129f6954c574c9c41b6
2018-03-20 14:13:37 +01:00
Kris Maglione 69844a6fbb 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

--HG--
extra : rebase_source : 65ef11c56f23e04ea5eeb87b972bfc8e4867fdd2
2018-03-01 14:00:00 -08:00
Kris Maglione 443f8d0c08 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

--HG--
extra : rebase_source : 7f2c66b1dc18d4ce4c47bef2e3b9d5d3ade929aa
2017-11-11 17:39:16 -08:00
Kris Maglione 68ac13e6b6 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

--HG--
extra : rebase_source : 998de7388ee03fdec0a0949b4e43bd9169dbb592
extra : histedit_source : 414d0ed1842b2270146d37b2788a56c682d3d695
2018-01-17 19:20:16 -08:00
Boris Zbarsky 68cc4fd46f 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 e5c2a5003e Bug 1409852 - Expose an API in ChromeUtils to detect chrome JS dev errors;r=bz
MozReview-Commit-ID: GluMLeQOHTZ

--HG--
extra : rebase_source : 37516c3b76a9eb7821ba66ee46ba3c5c0f659e2e
2017-11-16 10:48:45 +01:00
Csoregi Natalia 9743e10556 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 9e97d5406a Bug 1409852 - Expose an API in ChromeUtils to detect chrome JS dev errors;r=bz
MozReview-Commit-ID: GluMLeQOHTZ

--HG--
extra : rebase_source : e1551690496cde70d72c4d35c8a57927ed54a68b
2017-11-16 10:48:45 +01:00
Boris Zbarsky 97828fce1d 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 298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Kris Maglione 00d7367b44 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

--HG--
extra : rebase_source : d28973641e914c8d180f66125669aabc29ab857f
2017-09-23 22:12:32 -07:00
Bobby Holley ef26283b2d Bug 1403397 - Revert: Add a testing API. r=bholley
This reverts commit 4194b7dd8ec748c044a9b8b0967fd9d652ea342c.
2017-10-03 14:05:56 -07:00
Bobby Holley bd4be52f46 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 13e61f79f9 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

--HG--
extra : rebase_source : 7f7d5df605bc6544cb7f1c0c7e224d81b211e09c
extra : histedit_source : f980a03413b5e65fc6fa272c012a769d2764d89b
2017-08-24 13:33:40 -07:00
Kris Maglione 85754fb12a 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

--HG--
extra : rebase_source : 4fe73f4b9bde052a0eadf7d5634f792e16ca1c94
extra : histedit_source : ec61152a0181f3b0e28023c951e7181c43216d2f
2017-08-18 11:10:10 -07:00
Andrew McCreight 855f08b5d6 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

--HG--
extra : rebase_source : 350e49bf7c570abfdde457a89ee8922f8cdb8b7d
2017-03-24 10:34:44 -07:00
Kris Maglione 437f4e37d4 Bug 1333990: Part 1a - Add an async script pre-loading utility. r=billm,shu
MozReview-Commit-ID: 4vJF2drLeHS

--HG--
extra : rebase_source : 8adaa22d6d91ac6ef1804cf4c8d5698cf304b141
2017-03-16 19:10:40 -07:00
Ehsan Akhgari 9b370e9857 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 7c5ab514b7 Bug 1314361 - Part 5: Remove origin attribute comparison helpers for ignoring addonId. r=bholley 2016-11-04 14:32:26 -07:00
Tim Huang 3e5d172c95 Bug 1319773 - Part 1: Add a SubsumesConsideringDomainIgnoringFPD in BasePrincipal. r=baku
--HG--
extra : rebase_source : db853a600e666cd11a140153536427c1f4e5882c
2017-01-18 20:17:19 +08:00
Andrea Marchesini d5b0cbe35a Bug 1315905 - Cleanup Necko http security check - part 1, r=valentin 2016-11-17 14:52:16 +01:00
Andrea Marchesini dd6cbdac21 Bug 1271516 - Introducing nsIWebNavigation.setOriginAttributesBeforeLoading, r=smaug 2016-06-07 19:59:22 +02:00
Phil Ringnalda 035f8773be Back out 32d16086e85e (bug 1271516) for frequent ChromeUtils::IsOriginAttributesEqual assertin failures
CLOSED TREE
2016-06-06 21:07:42 -07:00
Andrea Marchesini 943c6e667c Bug 1271516 - Introducing nsIWebNavigation.setOriginAttributesBeforeLoading, r=smaug 2016-06-07 00:47:13 +02:00
Kit Cambridge d21d6da5e8 Bug 1256488 - Add a Base64 URL-decoder for C++ and chrome JS callers. r=mt,baku
MozReview-Commit-ID: IrDwImYfHRu

--HG--
extra : rebase_source : ed7da7447e5d70c596234961625fcd4b8139814f
2016-03-22 12:09:04 -07:00
Dave Huseby c01e63f1a5 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 394034a83e Backed out changeset 0519406b6e57 (bug 1238177) for eslint test failures 2016-04-03 09:30:03 +02:00
Dave Huseby 32251ddc37 Bug 1238177 - Extension content needs to use the correct user context id origin attribute. r=bholley
--HG--
extra : amend_source : f8d3bb6f6b1426ac73669491b651900614f6461c
2016-04-02 13:14:00 -04:00
Dave Huseby 0c0cf070cf 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

--HG--
extra : rebase_source : 299742335452d5b5ac3cf25a3bd2d71ec655049f
2016-02-29 12:26:00 +01:00
Andrea Marchesini ed31fee8d4 Bug 1245184 - nsICookieManager.remove should use the OriginAttributes, r=sicking 2016-02-25 16:41:13 +01:00
Carsten "Tomcat" Book 6b54f0d05b Backed out changeset e4b8bb93313b (bug 1229222) 2016-02-19 15:55:25 +01:00
Carsten "Tomcat" Book f2a98554ec Backed out changeset 27f3968ae8b2 (bug 1245184) 2016-02-19 15:55:23 +01:00
Andrea Marchesini 0a72c5e9e3 Bug 1245184 - CookieManager should remove cookies only if they match the userContextId, r=sicking 2016-02-19 14:49:50 +01:00
Dave Huseby 364ac22ba7 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 a365470b87 Bug 1235657 - Session storage needs to handle origin attributes correctly - part 1 - createOriginAttributesWithUserContextId, r=huseby 2016-01-06 10:08:30 +00:00