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

498 Коммитов

Автор SHA1 Сообщение Дата
Julian Descottes 6d4437d90f Bug 1783814 - Add documentation for remaining SandboxOptions r=kmag
Depends on D154260

Add documentation for
- allowWaivers
- discardSource
- forceSecureContext
- freshCompartment
- invisibleToDebugger
- isWebExtensionContentScript
- metadata
- originAttributes
- userContextId

Differential Revision: https://phabricator.services.mozilla.com/D154307
2022-08-12 08:34:53 +00:00
Julian Descottes 590a767d3a Bug 1783814 - Add documentation for SandboxOptions previously documented on MDN r=kmag
This only ports documentation for options which used to be documented on MDN.
Since then new sandbox options have been added, I will try to add documentation for them in a second changeset

Differential Revision: https://phabricator.services.mozilla.com/D154260
2022-08-12 08:34:53 +00:00
Kris Maglione 2b9e8682a2 Bug 1770237: Part 16 - Remove component loading logic from mozJSComponentLoader. r=mccr8,florian
Differential Revision: https://phabricator.services.mozilla.com/D148196
2022-06-22 20:31:37 +00:00
Tooru Fujisawa 47f69a4984 Bug 1768819 - Add Cu.{isJSModuleLoaded,isESModuleLoaded,loadedJSModules,loadedESModules}. r=kmag
Added 4 new functions, into Cu, for the following reasons:
  * Cu.isModuleLoaded and Cu.loadedModule is kept for backward compatibility
  * Cu.isModuleLoaded and Cu.loadedModule uses shim (bug 1769029 and
    bug 1768922), and loaded ESM (.sys.mjs) is visible as JSM (`.jsm`) there

Differential Revision: https://phabricator.services.mozilla.com/D146167
2022-06-17 04:59:14 +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 e99900bcca Bug 1768819 - Add Cu.{isJSModuleLoaded,isESModuleLoaded,loadedJSModules,loadedESModules}. r=kmag
Added 4 new functions, into Cu, for the following reasons:
  * Cu.isModuleLoaded and Cu.loadedModule is kept for backward compatibility
  * Cu.isModuleLoaded and Cu.loadedModule uses shim (bug 1769029 and
    bug 1768922), and loaded ESM (.sys.mjs) is visible as JSM (`.jsm`) there

Differential Revision: https://phabricator.services.mozilla.com/D146167
2022-06-17 01:30:23 +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 3d15caadb4 Bug 1768819 - Add Cu.{isJSModuleLoaded,isESModuleLoaded,loadedJSModules,loadedESModules}. r=kmag
Added 4 new functions, into Cu, for the following reasons:
  * Cu.isModuleLoaded and Cu.loadedModule is kept for backward compatibility
  * Cu.isModuleLoaded and Cu.loadedModule uses shim (bug 1769029 and
    bug 1768922), and loaded ESM (.sys.mjs) is visible as JSM (`.jsm`) there

Differential Revision: https://phabricator.services.mozilla.com/D146167
2022-06-16 16:20:37 +00:00
Jon Coppeard d40ccf2be0 Bug 1757956 - Part 3: Rename JSFreeOp to JS::GCContext in the JS engine r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D140525
2022-03-10 08:40:03 +00:00
Nick Alexander 02dda268a6 Bug 1742879 - Let `Cu.createCommandLine` accept arguments and state. r=nika
There's a lot of history in this area that mostly explains why this
has not been supported in the past, leading to several awkward
workarounds in tests.  But it doesn't appear that there's any reason
to prevent tests from creating actual command lines, so that's what we
allow here.

I've elected to flesh out `Cu.createCommandLine` rather than expose
`.init(..._)` directly since `Cu.createCommandLine` is already used in
the relevant tests and is only used in tests.  And I've made the
arguments required, rather than optional, so that consumers think
about the arguments, in particular `state`.

Differential Revision: https://phabricator.services.mozilla.com/D132089
2021-12-02 19:06:44 +00:00
Noemi Erli 4aa2f8759e Backed out 2 changesets (bug 1742879) for causing build bustage in nsDebug.h CLOSED TREE
Backed out changeset 994d0986757c (bug 1742879)
Backed out changeset d4b8e45faaec (bug 1742879)
2021-12-02 09:34:25 +02:00
Nick Alexander a8c4c5c97b Bug 1742879 - Let `Cu.createCommandLine` accept arguments and state. r=nika
There's a lot of history in this area that mostly explains why this
has not been supported in the past, leading to several awkward
workarounds in tests.  But it doesn't appear that there's any reason
to prevent tests from creating actual command lines, so that's what we
allow here.

I've elected to flesh out `Cu.createCommandLine` rather than expose
`.init(..._)` directly since `Cu.createCommandLine` is already used in
the relevant tests and is only used in tests.  And I've made the
arguments required, rather than optional, so that consumers think
about the arguments, in particular `state`.

Differential Revision: https://phabricator.services.mozilla.com/D132089
2021-12-02 04:02:07 +00:00
Tooru Fujisawa f263a1ae81 Bug 1718481 - Use stencil in nsXULPrototypeCache. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D121254
2021-09-21 03:18:02 +00:00
Butkovits Atila 8957144a0f Backed out 3 changesets (bug 1718194, bug 1718623, bug 1718481) for causing leaks. CLOSED TREE
Backed out changeset 1cd8bdf1fc92 (bug 1718481)
Backed out changeset aa56fe2c069d (bug 1718194)
Backed out changeset f7cb7313d1c7 (bug 1718623)
2021-09-18 15:47:45 +03:00
Tooru Fujisawa 58155ebcca Bug 1718481 - Use stencil in nsXULPrototypeCache. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D121254
2021-09-18 11:16:46 +00:00
Henrik Skupin 0edcc72b48 Bug 1722718 - [xpconnect] Allow Javascript to print to stderr. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D121094
2021-07-29 07:17:07 +00:00
Peter Van der Beken c1a5f99ad3 Bug 1697900 - Remove unused NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108095
2021-03-12 10:57:15 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Gijs Kruitbosch af15d01659 Bug 1666221 - cope with not having a working directory, r=robwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D91221
2020-10-22 19:44:46 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Bobby Holley daf490c526 Bug 1669556 - Remove nsIXPCScriptable enumerate hook. r=mccr8
NewEnumerate is used, but Enumerate isn't.

Differential Revision: https://phabricator.services.mozilla.com/D92685
2020-10-07 20:06:18 +00:00
Tooru Fujisawa 436f86f9a2 Bug 1666683 - Part 5: Add options parameter to nsXPConnect::ReadScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92407
2020-10-07 04:46:55 +00:00
Kris Maglione 4200cb539c Bug 1464542: Part 2 - Add infrastructure for defining named services exposed to JS. r=mccr8
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.

Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.

Differential Revision: https://phabricator.services.mozilla.com/D81417
2020-07-09 20:42:50 +00:00
Csoregi Natalia b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione 0ae37bde4e Bug 1464542: Part 2 - Add infrastructure for defining named services exposed to JS. r=mccr8
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.

Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.

Differential Revision: https://phabricator.services.mozilla.com/D81417
2020-07-09 17:59:11 +00:00
Andrew McCreight 208d20a42e Bug 1645908 - Eliminate gratuitous use of dom::danger::GetJSContext() in ForceShrinkingGC(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D79756
2020-06-15 22:37:10 +00:00
Masatoshi Kimura 8b30e469c5 Bug 1481640 - Remove forcePermissiveCOWs(). r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D77612
2020-06-01 18:04:20 +00:00
Gijs Kruitbosch 2f983e6cfa Bug 1638373 - remove Cu.isCrossProcessWrapper now that CPOWs are dead, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D76597
2020-05-24 23:38:17 +00:00
Tom Schuster 25a8ce26ec Bug 1277801 - Introduce Cu.isOpaqueWrapper. r=peterv
With the following changes Object.prototype.toString is not using the JSClass' name
anymore. This means we now fail to detect opaque wrappers, because they just get the default string: [object Object]

Differential Revision: https://phabricator.services.mozilla.com/D74016
2020-05-11 20:53:10 +00:00
Florian Quèze fa2f59b3f7 Bug 1630982 - Terminate browser-chrome mochitests with an exit(0), r=gbrown,dthayer.
Differential Revision: https://phabricator.services.mozilla.com/D71336
2020-05-07 17:34:30 +00:00
Dorel Luca d9c6949cf6 Backed out changeset b77388326b1b (bug 1630982) for causing leaks on mochitest jobs. CLOSED TREE 2020-05-07 13:49:20 +03:00
Florian Quèze c1fe95dc03 Bug 1630982 - Terminate browser-chrome mochitests with an exit(0), r=gbrown,dthayer.
Differential Revision: https://phabricator.services.mozilla.com/D71336
2020-05-07 09:25:57 +00:00
Gijs Kruitbosch 5ffecefa61 Bug 1620226 - remove Cu.permitCPOWsInScope and Cu.getCrossProcessWrapperTag, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D71400
2020-04-17 21:32:38 +00:00
Mihai Alexandru Michis 0eb5f699ca Backed out 2 changesets (bug 1622718) as requested by dev for causing Bug 1626727.
Backed out changeset eb632d0b3a7b (bug 1622718)
Backed out changeset 016b86b83932 (bug 1622718)
2020-04-03 06:03:25 +03:00
Logan Smyth 1442e01626 Bug 1622718 - Part 1: Expose 'useCompilationScope' as an option from nsIJSSubScriptLoader. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D68502

--HG--
extra : moz-landing-system : lando
2020-03-30 23:29:23 +00:00
Tom Schuster 00218dcac0 Bug 1275508 - Remove JavaScript werror from browser. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D66255

--HG--
extra : moz-landing-system : lando
2020-03-11 12:20:21 +00:00
Tom Schuster 3946b3eaea Bug 1619177 - Remove remaining extra warnings code. r=tcampbell,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D65830

--HG--
extra : moz-landing-system : lando
2020-03-10 22:59:41 +00:00
Boris Zbarsky 7df96355fc Bug 1448992. Get rid of nsXPCComponentsBase. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D65737

--HG--
extra : moz-landing-system : lando
2020-03-06 17:40:57 +00:00
Ted Campbell c23b94d337 Bug 1598053 - Remove nsIXPConnect::writeFunction/readFunction r=kmag
These are no longer used after the removal of XBL. The underlying
SpiderMonkey APIs will be removed as well to fascilitate modernizing of
bytecode caching.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 20:06:42 +00:00
Tom Ritter 1f3b68b54b Bug 1582512 - Disable script filename restrictions in Marionette r=jandem,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D51676

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:18 +00:00
Ciure Andrei e473bd5f57 Backed out 10 changesets (bug 1582512) for causing browser_preferences_usage.js to permafail CLOSED TREE
Backed out changeset a615a2c07523 (bug 1582512)
Backed out changeset 7dd0266da0a1 (bug 1582512)
Backed out changeset dfdefc6ede97 (bug 1582512)
Backed out changeset 59db30e1915f (bug 1582512)
Backed out changeset 1eb6f6b02149 (bug 1582512)
Backed out changeset 391ed11326fb (bug 1582512)
Backed out changeset 02865605c1c3 (bug 1582512)
Backed out changeset 017582048986 (bug 1582512)
Backed out changeset 1374c08302f9 (bug 1582512)
Backed out changeset 40dd63b6910a (bug 1582512)
2019-12-02 19:23:12 +02:00
Tom Ritter fc663a0a8d Bug 1582512 - Disable script filename restrictions in Marionette r=jandem,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D51676

--HG--
extra : moz-landing-system : lando
2019-12-02 15:46:21 +00:00
Cosmin Sabou be84eb7037 Backed out 11 changesets (bug 1582512) for causing valgrind bustages.
Backed out changeset 8b850fd66bf5 (bug 1582512)
Backed out changeset 07d3631e609a (bug 1582512)
Backed out changeset fa91b085eb59 (bug 1582512)
Backed out changeset 232d5735d404 (bug 1582512)
Backed out changeset 47045fa2ffd2 (bug 1582512)
Backed out changeset 40a0f6c6cd61 (bug 1582512)
Backed out changeset 5fb3e489c31f (bug 1582512)
Backed out changeset 379318a35b20 (bug 1582512)
Backed out changeset bf81985c33b7 (bug 1582512)
Backed out changeset 1e0dd57b8041 (bug 1582512)
Backed out changeset 2787043f1fab (bug 1582512)
2019-11-20 18:44:45 +02:00
Tom Ritter 3a72c5e713 Bug 1582512 - Disable script filename restrictions in Marionette r=jandem,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D51676

--HG--
extra : moz-landing-system : lando
2019-11-18 20:59:41 +00:00
Kris Maglione 3dfef17d14 Bug 1587580 - Use the actual source filename and line number for SpecialPowers.spawn callback. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D48758

--HG--
extra : moz-landing-system : lando
2019-10-09 21:05:46 +00:00
Dave Townsend 1c67b00d98 Bug 1586216: Fallback to a synchronous channel load if the url preloader cannot load the ftl file. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D48726

--HG--
extra : moz-landing-system : lando
2019-10-09 17:50:33 +00:00