Commit graph

142 commits

Author SHA1 Message Date
nchevobbe
6e0558b9e7 Bug 1483662 - Add ChromeUtils.dateNow() . r=arai,kmag
The function returns the current a fractional number
representing the current time (in milliseconds from the Epoch).

This replicates the JSShell `dateNow` function.

This could be useful in JS land so we can get a more
precise timestamp than `Date.now`.

For example, it will be used in DevTools code, for the console,
so we can more precisely compare evaluation results
with consoleAPI messages that might have been emitted
as a result of the evaluation.

Differential Revision: https://phabricator.services.mozilla.com/D155547
2022-09-02 04:58:29 +00:00
Emilio Cobos Álvarez
4fc9841344 Bug 1782623 - Set select color-scheme based on child background. r=dholbert
This makes us use light or dark select popups on supported platforms
based on the background of the select element, which allows us to use
the right scrollbar color.

Depends on D153424

Differential Revision: https://phabricator.services.mozilla.com/D153425
2022-08-02 15:49:13 +00:00
Tooru Fujisawa
9084893802 Bug 1768870 - Part 2: Add ChromeUtils.defineESModuleGetters. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D146212
2022-06-17 04:59:13 +00:00
criss
8fc8ec5d8e Backed out 8 changesets (bug 1771092, bug 1768870, bug 1771097, bug 1769002, bug 1768819) for causing mochitest failures on browser_sendQuery.js. CLOSED TREE
Backed out changeset 8a4d712f819a (bug 1771092)
Backed out changeset f4e27a35c83c (bug 1771092)
Backed out changeset 072323bc72cc (bug 1771092)
Backed out changeset 2ccf2a00fff7 (bug 1769002)
Backed out changeset ba7086fd9b1f (bug 1768819)
Backed out changeset 6205d3e2c666 (bug 1771097)
Backed out changeset 960f0aee97d5 (bug 1768870)
Backed out changeset 5f53760c5637 (bug 1768870)
2022-06-17 05:44:37 +03:00
Tooru Fujisawa
7d3a2529f0 Bug 1768870 - Part 2: Add ChromeUtils.defineESModuleGetters. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D146212
2022-06-17 01:30:22 +00:00
Molnar Sandor
c1ae6857f8 Backed out 9 changesets (bug 1769002, bug 1768870, bug 1771097, bug 1771092, bug 1768819) for causing lint failures. CLOSED TREE
Backed out changeset 829df1dfad70 (bug 1769002)
Backed out changeset f0537d333adc (bug 1771092)
Backed out changeset 25b43856bc00 (bug 1771092)
Backed out changeset a49f754ca73f (bug 1771092)
Backed out changeset 164f85686a32 (bug 1769002)
Backed out changeset ef5cf9ceb915 (bug 1768819)
Backed out changeset c64e6c1fbfe7 (bug 1771097)
Backed out changeset f85393f988a8 (bug 1768870)
Backed out changeset fe708d13cc1d (bug 1768870)
2022-06-16 20:15:14 +03:00
Tooru Fujisawa
3fddc2b25a Bug 1768870 - Part 2: Add ChromeUtils.defineESModuleGetters. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D146212
2022-06-16 16:20:36 +00:00
Jon Coppeard
01f312e1ec Bug 1771678 - Part 2: Re-add the renamed ChromeUtils.importESModule method r=smaug
This reverses the action of bug 1771112, with the method renamed to importESModule.

Differential Revision: https://phabricator.services.mozilla.com/D147681
2022-06-16 15:05:35 +00:00
Kagami Sascha Rosylight
1991e6336d Bug 1769290 - Part 7: Apply mozilla-js-handle-rooted-typedef against dom/base r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148280
2022-06-05 20:54:59 +00:00
Jon Coppeard
a7fd419ccc Bug 1771112 - Temporarily remove ChromeUtils.importModule API r=smaug
This removes the API and skips the tests. The implementation in
mozJSComponentLoader is not removed.

This patch will be backed out after the next merge.

Differential Revision: https://phabricator.services.mozilla.com/D147278
2022-05-25 12:12:18 +00:00
Jon Coppeard
aed536664b Bug 1432901 - Part 11: Add ChromeUtils.importModule method to import and ES6 module r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145566
2022-05-10 12:58:09 +00:00
Mark Banner
20a0448631 Bug 1609271 - Disallow passing null as the target argument to ChromeUtils.import. r=evilpie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D140516
2022-04-22 12:42:41 +00:00
Dimi
5186434570 Bug 1681985 - P3. Implement CreditCardRuleset in C++ r=sgalich,emilio
Depends on D137269

Differential Revision: https://phabricator.services.mozilla.com/D137271
2022-03-11 11:45:59 +00:00
Alexandre Poirot
679bde75eb Bug 1740543 - Expose xpcom's GetErrorName() to JS. r=xpcom-reviewers,nika
This will help JS codebase decipher what a given nsresult refers to.

Differential Revision: https://phabricator.services.mozilla.com/D130879
2021-12-09 14:00:39 +00:00
Florian Quèze
c27db31462 Bug 1744991 - add ChromeUtils.vsyncEnabled to allow checking from tests if vsync remained enabled, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D133204
2021-12-09 11:27:40 +00:00
Norisz Fay
1b759d112f Backed out changeset 4628f9ff25a5 (bug 1740543) for causing build bustages on ErrorNames CLOSED TREE 2021-12-09 12:44:14 +02:00
Alexandre Poirot
2ecfb8077f Bug 1740543 - Expose xpcom's GetErrorName() to JS. r=xpcom-reviewers,nika
This will help JS codebase decipher what a given nsresult refers to.

Differential Revision: https://phabricator.services.mozilla.com/D130879
2021-12-09 10:02:53 +00:00
Andrew Creskey
46162554f6 Bug 1717920 - Add scrolling metrics to history metadata r=mossop,botond,edgar
Disabled by default, browser.places.interactions.enabled, this adds scrolling metrics (time spent scrolling and distance scrolled) to the history metadata.

Differential Revision: https://phabricator.services.mozilla.com/D120656
2021-09-02 14:11:56 +00:00
Tim Huang
67476e5f95 Bug 1724768 - Part 1: Add ChromeUtils.getPartitionKeyFromURL(). r=pbz,robwu
Differential Revision: https://phabricator.services.mozilla.com/D122320
2021-08-13 07:57:17 +00:00
Paul Zuehlcke
6ae03e10fd Bug 1714608 - Replace custom partitionKey parsing method in SiteDataManager with ChromeUtils helper. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D118726
2021-07-07 17:36:46 +00:00
Andrew Creskey
32478151d9 Bug 1716606 - Replace keyup handling of history metadata typing metrics with C++ implementation r=Standard8,smaug
Due to measured performance issues in the Chrome process, moving this code to C++.

Differential Revision: https://phabricator.services.mozilla.com/D118178
2021-06-25 19:40:36 +00:00
Paul Zuehlcke
dc5ce17977 Bug 1717463 - Update SecuritySettingsCleaner to clear partitioned client auth remember decisions. r=johannh,keeler
Differential Revision: https://phabricator.services.mozilla.com/D118451
2021-06-25 10:27:00 +00:00
Paul Zuehlcke
8e5f5e55fc Bug 1705032 - Added CSSCacheCleaner deleteByBaseDomain. r=emilio,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D114518
2021-05-27 12:37:03 +00:00
Emilio Cobos Álvarez
106b693662 Bug 1679456 - Use transient user activation for iframe external protocol blocking. r=smaug,edgar
I think this allows us to remove TryUsePopupOpeningToken (which is a similar
concept to consuming user activation), and also the ad-hoc <iframe> timing
thing we have from bug 1514547, which should be covered by the user activation
timeout.

Depends on D97640

Differential Revision: https://phabricator.services.mozilla.com/D98020
2020-11-30 16:16:41 +00:00
Simon Giesecke
dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Florian Quèze
0d164d3a9f Bug 1674476 - ChromeUtils.addProfilerMarker should support capturing a stack or setting the category, r=gerald,gregtatum.
Differential Revision: https://phabricator.services.mozilla.com/D95406
2020-11-20 15:41:16 +00:00
Andi-Bogdan Postelnicu
2f17c5961e Bug 1626555 - Make dom/base buildable outside of unified-build environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D93640
2020-10-19 12:18:01 +00:00
Emilio Cobos Álvarez
47916c8c70 Bug 1662987 - ClearDataService should know how to clear the stylesheet cache. r=baku
Much like it does for images.

Differential Revision: https://phabricator.services.mozilla.com/D89242
2020-09-08 19:38:43 +00:00
alwu
923ecc4e6a Bug 1658075 - part1 : move testing functions to new namespace 'MediaControlService'. r=smaug,chunmin
Create a new namespace `MediaControlService` to use those helper functions which is used to get the main controller related status.

Then, move those functions from `ChromeUtils` to `MediaControlService`, which give us two benefit. The first is that we can remove redudant test-only enum `MediaSessionPlaybackTestState`, the second is a pref-required work for bug1656398, to fix the build order error when exposing `MediaSessionPlaybackState` in the media controller's webidl.

Differential Revision: https://phabricator.services.mozilla.com/D86620
2020-08-14 01:32:10 +00:00
Alexandre Poirot
b020241bb9 Bug 1644795 - Expose all nsIDOMProcessParent via ChromeUtils.getAllDOMProcesses(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D81121
2020-07-01 09:09:44 +00:00
Nika Layzell
c7f85b7fac Bug 1633379 - Part 2: Add support for in-process JSWindowActors, r=kmag,Yoric
This switches the `nsIContent{Parent,Child}` interface to be
`nsIDOMProcess{Parent,Child}`, and also implements it on
`InProcess{Parent,Child}`, along with the `ProcessActor` interface.

Differential Revision: https://phabricator.services.mozilla.com/D80582
2020-06-25 20:35:18 +00:00
Cosmin Sabou
4d79f57fed Backed out 2 changesets (bug 1633379) for windows build bustages on ContentChild.obj. CLOSED TREE
Backed out changeset a26037f3225b (bug 1633379)
Backed out changeset efef0b59bcd8 (bug 1633379)
2020-06-25 20:47:03 +03:00
Nika Layzell
0fefabd35b Bug 1633379 - Part 2: Add support for in-process JSWindowActors, r=kmag,Yoric
This switches the `nsIContent{Parent,Child}` interface to be
`nsIDOMProcess{Parent,Child}`, and also implements it on
`InProcess{Parent,Child}`, along with the `ProcessActor` interface.

Differential Revision: https://phabricator.services.mozilla.com/D80582
2020-06-25 16:28:11 +00:00
alwu
934302cd0d Bug 1640998 - part9 : use MediaControlKey to replace MediaControlKeysEvent r=chunmin,agi,geckoview-reviewers
This patch will
- remove `MediaControlKeysEvent` and use `MediaControlKey` to replace it
- rename names for all `MediaControlKey` related methods, functions, classes and descriptions

The advantage of doing so are
- remove the duplicated type so that we only need to maintain `MediaControlKey`

Differential Revision: https://phabricator.services.mozilla.com/D78140
2020-06-09 02:59:57 +00:00
David Teller
038fcc44b3 Bug 1580448 - ChromeUtils.{register, unregister}ProcessActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69786
2020-04-30 16:43:31 +00:00
Stefan Hindli
e22cd35728 Backed out 9 changesets (bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
Backed out changeset 6b4db1a501df (bug 1580448)
Backed out changeset 677257a41457 (bug 1580448)
Backed out changeset 6db8de5fc125 (bug 1580448)
Backed out changeset fd7527c86239 (bug 1580448)
Backed out changeset bfbd3330b0a5 (bug 1580448)
Backed out changeset dafa80c63322 (bug 1580448)
Backed out changeset 2a1701831a6a (bug 1580448)
Backed out changeset 9b548bd38671 (bug 1580448)
Backed out changeset 358f764ae48b (bug 1580448)
2020-04-30 10:58:27 +03:00
David Teller
6fc81ee749 Bug 1580448 - ChromeUtils.{register, unregister}ProcessActor;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69786
2020-04-30 07:35:24 +00:00
David Teller
021fdf8b13 Bug 1605209 - Turn actor names into nsCString;r=nika
This should save (a little) memory and avoid quite a few conversions.

Differential Revision: https://phabricator.services.mozilla.com/D70341
2020-04-17 10:56:22 +00:00
Daniel Varga
ca80197a2f Backed out 4 changesets (bug 1605209) for causing browser-chrome failures at dom/ipc/tests/JSWindowActor/browser_crash_report.js
CLOSED TREE

Backed out changeset 6eb1cc169dbf (bug 1605209)
Backed out changeset d81b566ad94f (bug 1605209)
Backed out changeset e0e6dbf1d48d (bug 1605209)
Backed out changeset 289f5bbac1ae (bug 1605209)
2020-04-17 13:49:04 +03:00
David Teller
5435691b55 Bug 1605209 - Turn actor names into nsCString;r=nika
This should save (a little) memory and avoid quite a few conversions.

Differential Revision: https://phabricator.services.mozilla.com/D70341
2020-04-16 08:58:21 +00:00
Florian Quèze
67e60784ca Bug 1608556 - Expose to privileged JS an API to add markers with a start time and an associated text, r=gerald,mconley,baku.
Differential Revision: https://phabricator.services.mozilla.com/D68784

--HG--
extra : moz-landing-system : lando
2020-04-04 14:48:35 +00:00
Narcis Beleuzu
1aa55f1914 Backed out changeset 859ae92f4110 (bug 1608556) for bustages on ProfilerMarkerPayload.h. CLOSED TREE
--HG--
extra : histedit_source : 297a94849cc019db6bc32ecadfdd119347da4ac8
2020-04-03 21:58:02 +03:00
Florian Quèze
d10cae0789 Bug 1608556 - Expose to privileged JS an API to add markers with a start time and an associated text, r=gerald,mconley,baku.
Differential Revision: https://phabricator.services.mozilla.com/D68784

--HG--
extra : moz-landing-system : lando
2020-04-03 13:47:25 +00:00
David Teller
c781dd8809 Bug 1580447 - Expose Content{Parent, Child} to JS;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D65344

--HG--
extra : moz-landing-system : lando
2020-03-20 09:11:32 +00:00
Arthur Iakab
768dcd08ae Backed out changeset 0b8ffd5fed51 (bug 1580447) for causing build bustages.
CLOSED TREE
2020-03-19 14:53:26 +02:00
David Teller
96c856d32a Bug 1580447 - Expose Content{Parent, Child} to JS;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D65344

--HG--
extra : moz-landing-system : lando
2020-03-19 09:13:48 +00:00
alwu
5fb309e36a Bug 1582508 - part7 : create a chrome-only method to get the playback state from the main controller. r=webidl,Ehsan
Implement a chrome-only method `getCurrentMediaSessionPlaybackState()` to expose current actual playback state in testing.

The reason we create an new enum `MediaSessionPlaybackTestState` is because of building issue. If we use `MediaSessionPlaybackState` directly in the `ChromeUtils.webidl`, then the codegen would automatically add an header include of `MediaSessionBinding.h` in the `ChromeUtilsBinding.h`, which would cause the complier complaining about lots of undeclared identifier.

Differential Revision: https://phabricator.services.mozilla.com/D66344

--HG--
extra : moz-landing-system : lando
2020-03-17 01:01:31 +00:00
alwu
71f97d6fff Bug 1592037 - part6 : implement a chrome-only method for accessing current active media metadata during testing. r=bzbarsky
Create a chrome-only method to get the current media metadata to know if we correctly update the media metadata or not. That method would only be used for testing.

Differential Revision: https://phabricator.services.mozilla.com/D64849

--HG--
extra : moz-landing-system : lando
2020-03-05 19:43:50 +00:00
alwu
c7f094e7dc Bug 1604691 - part2 : add webidl method in ChromeUtils to support generating testing event. r=bzbarsky
We handle media control key events differently from normal key events, and at this point we haven't finished the implementation of capturing media control key events on each platform.  Therefore, create a method to generate platform-independent events in order to help testing.

Differential Revision: https://phabricator.services.mozilla.com/D57911

--HG--
extra : moz-landing-system : lando
2019-12-21 00:10:13 +00:00
Alexandre Poirot
77af789c1f Bug 1597999 - Implements ChromeUtils.getObjectNodeId. r=jimb
This helps retrieving the NodeId for any JS Object you pass in.
This allows identifying a particular object when using HeapSnapshot API.
`HeapSnapshot.computeDominatorTree()` returns a tree of object,
but there is no way to identify a given JS object in it.
Getting the node id of a given JS object helps you browse this tree
from a given object you know is leaking.

Differential Revision: https://phabricator.services.mozilla.com/D53971

--HG--
extra : moz-landing-system : lando
2019-11-21 22:12:20 +00:00