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

1334 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 0c976d908a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-08-17 20:22:12 +00:00
Kris Maglione 3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Matthew Gaudet d17334a69d Bug 1655563 - Ensure Private Fields are enabled in workers, following the preference setting r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D85866
2020-08-11 19:12:49 +00:00
Sebastian Streich bf58055b03 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-08-04 11:10:41 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Noemi Erli 5cebe61c77 Backed out changeset 4ed7b13fb7a5 (bug 1633710) for causing failures in browser_amosigned_url.js CLOSED TREE 2020-07-29 22:34:42 +03:00
Sebastian Streich ea482d8e73 Bug 1633710 - Move uri.spec calls to nsIPrincipal r=necko-reviewers,geckoview-reviewers,preferences-reviewers,ckerschb,ntim,snorp,valentin
Differential Revision: https://phabricator.services.mozilla.com/D82911
2020-07-29 17:33:10 +00:00
Matthew Gaudet 25fd6df2e9 Bug 1644160 - Add test cases for various DOM related classes r=jorendorff
- CrossOriginWrappers
- A variety DOM objects (including window, and window's prototype chain)
- Xray wrappers

Differential Revision: https://phabricator.services.mozilla.com/D83555
2020-07-28 21:29:17 +00:00
Dorel Luca 990d081d9f Backed out 2 changesets (bug 1651519) for WPT failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 7b973a0e7be9 (bug 1651519)
Backed out changeset 55e9184c5617 (bug 1651519)
2020-07-22 02:47:34 +03:00
Kris Maglione d182c95351 Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 22:19:19 +00:00
Kris Maglione e7d942c77f Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 19:02:27 +00:00
Dorel Luca d91c6dc40b Backed out 2 changesets (bug 1651519) for wpt failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 52317abc5c68 (bug 1651519)
Backed out changeset 45448dca59a4 (bug 1651519)
2020-07-21 21:55:57 +03:00
Kris Maglione 4a25531b4a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 16:59:33 +00:00
Kris Maglione 9c2c147159 Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 16:59:28 +00:00
Jon Coppeard 1d1648a98c Bug 1648453 - Add tests to check that FinalizationRegistry sets the incumbent global correctly when calling the callback r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83615
2020-07-17 17:35:01 +00:00
Razvan Maries 6767314b95 Backed out 4 changesets (bug 1648453) for hazzard bustages on CycleCollectedJSContext.cpp. CLOSED TREE
Backed out changeset 9598a75cca47 (bug 1648453)
Backed out changeset 473e7d55a25e (bug 1648453)
Backed out changeset 0afcee198ecd (bug 1648453)
Backed out changeset 623252539387 (bug 1648453)
2020-07-17 00:01:11 +03:00
Jon Coppeard 9e76ce31b8 Bug 1648453 - Add tests to check that FinalizationRegistry sets the incumbent global correctly when calling the callback r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83615
2020-07-16 15:33:03 +00:00
Mihai Alexandru Michis 30e2927e24 Backed out 3 changesets (bug 1648453) for causing bustages in AccessCheck.h
CLOSED TREE

Backed out changeset 8b21977bb2df (bug 1648453)
Backed out changeset 4cac71f274b8 (bug 1648453)
Backed out changeset a9ad01b4ab2e (bug 1648453)
2020-07-16 15:43:52 +03:00
Jon Coppeard c941aaa0c8 Bug 1648453 - Add tests to check that FinalizationRegistry sets the incumbent global correctly when calling the callback r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83615
2020-07-16 09:24:35 +00:00
David Major a7ce56c08e Bug 1653047 - Work around a clang crash in the nsXPCTestParams constructor r=sg
The combination of clang-11, mingw builds, and the recent constructor refactorings in this file, have revealed a previously unseen compiler crash: https://bugs.llvm.org/show_bug.cgi?id=46738.

The underlying issue is present in older clangs but for some reason we haven't triggered the right conditions for it until now.

For now, the easiest way forward is to move the constructors inline. I don't feel so bad about using a code workaround in this case, because this makes the code read more naturally anyway.

Differential Revision: https://phabricator.services.mozilla.com/D83684
2020-07-16 10:47:56 +00:00
Kris Maglione b6be72f351 Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81749
2020-07-10 23:58:30 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Kris Maglione 3bda67deab Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-17 17:17:16 +00:00
Jason Orendorff 033a5e6ba7 Bug 1599769 - Part 1: Ship Promise.any. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76393
2020-06-15 21:57:04 +00:00
Narcis Beleuzu fbae0b49f9 Backed out 3 changesets (bug 1634847, bug 1599769) for mochitest failures on test_xrayToJS.xhtml . CLOSED TREE
Backed out changeset 249e60b52fb4 (bug 1599769)
Backed out changeset c3c837a5bf38 (bug 1599769)
Backed out changeset c958e2551f1c (bug 1634847)
2020-06-15 19:50:59 +03:00
Jason Orendorff 8296b1ab7a Bug 1599769 - Part 1: Ship Promise.any. r=jwalden.
Differential Revision: https://phabricator.services.mozilla.com/D76393
2020-06-15 15:12:18 +00:00
Jason Orendorff 87b8f09585 Bug 1641355 - Change AggregateError.errors to a data property on instances. r=tcampbell,peterv.
The changes in xpconnect are necessary because this is not being specified in
the usual way, with a getter. Ordinary data properties require an explicit
loophole to make them visible through X-ray wrappers.

Differential Revision: https://phabricator.services.mozilla.com/D77181
2020-06-11 14:57:00 +00:00
Logan Smyth 25d491b792 Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug
The 'asyncStack' flag on JS execution contexts is used as a general switch
to enable async stack capture across all locations in SpiderMonkey, but
this causes problems because it can at times be too much of a performance
burden to general and track all of these stacks.

Since the introduction of this option, we have only enabled it on Nightly
and DevEdition for non-mobile builds, which has left a lot of users unable
to take advantage of this data while debugging.

This patch enables async stack traces across all of Firefox, but introduces
a new pref to toggle the scope of the actual expensive part of async stacks,
which is _capturing_ them and keeping them alive in memory. The new pref
limits the capturing of async stack traces to only debuggees, unless an
explicit pref is flipped to capture async traces for all cases.

This means that while async stacks are technically enabled, and code could
manually capture a stack and pass it back to SpiderMonkey and see that stack
reflected in later captured stacks, SpiderMonkey itself and related async
DOM APIs, among others, will not capture stacks or pass them to SpiderMonkey,
so there should be no general change in performance by enabling the broader
feature itself, unless the user is actively debugging the page.

One effect of this patch is that if you have the debugger open and then close
it, objects that have async stacks associated with them will retain those
stacks and they will continue to show up in stack traces, no _new_ stacks
will be captured. jorendorff and I have decided that this is okay because
the expectation that the debugger fully revert every possible effect that it
could have on a page is a nice goal but not a strict requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68503
2020-06-14 02:41:45 +00:00
Noemi Erli 279f3b6a42 Backed out changeset 550164313c4f (bug 1601179) for causing failures in test_async CLOSED TREE 2020-06-12 08:16:14 +03:00
Logan Smyth 7f4a5aeed0 Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug
The 'asyncStack' flag on JS execution contexts is used as a general switch
to enable async stack capture across all locations in SpiderMonkey, but
this causes problems because it can at times be too much of a performance
burden to general and track all of these stacks.

Since the introduction of this option, we have only enabled it on Nightly
and DevEdition for non-mobile builds, which has left a lot of users unable
to take advantage of this data while debugging.

This patch enables async stack traces across all of Firefox, but introduces
a new pref to toggle the scope of the actual expensive part of async stacks,
which is _capturing_ them and keeping them alive in memory. The new pref
limits the capturing of async stack traces to only debuggees, unless an
explicit pref is flipped to capture async traces for all cases.

This means that while async stacks are technically enabled, and code could
manually capture a stack and pass it back to SpiderMonkey and see that stack
reflected in later captured stacks, SpiderMonkey itself and related async
DOM APIs, among others, will not capture stacks or pass them to SpiderMonkey,
so there should be no general change in performance by enabling the broader
feature itself, unless the user is actively debugging the page.

One affect of this patch is that if you have the debugger open and then close
it, objects that have async stacks associated with them will retain those
stacks and they will continue to show up in stack traces, no _new_ stacks
will be captured. jorendorff and I have decided that this is okay because
the expectation that the debugger fully revert every possible effect that it
could have on a page is a nice goal but not a strict requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68503
2020-06-11 21:24:16 +00:00
Jon Coppeard 16131c14f7 Bug 1641517 - Fix logic in ShouldIgnorePropertyDefinition to really ignore cleanupSome if it's not enabled r=sfink
Disabling toSource also disabled checking for whether to ignore cleanupSome.

Differential Revision: https://phabricator.services.mozilla.com/D79298
2020-06-11 18:02:39 +00:00
Jon Coppeard ebd33b0e2f Bug 1639246 - Ship weak refs r=sfink,smaug
This renames the pref to remove 'experimental' and turns it on by default.

For integration with the CC, any DOM objects that are the target of a WeakRef or registered with a FinalizationRegistry have their wrappers preserved. WeakRef.deref() checks whether any wrapper is still preserved and returns undefined if not, to avoid giving out references to wrappers whose DOM object has been cycle collected.

Tests exercising browser integration are under js/xpconnect/tests/mochitest/.

Differential Revision: https://phabricator.services.mozilla.com/D77656
2020-06-09 11:20:45 +00:00
Masatoshi Kimura 8601daefcb Bug 1643910 - Remove ability to disable JSM global sharing. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D78602
2020-06-08 11:03:36 +00:00
Jon Coppeard c53e11c2b2 Bug 1642974 - Don't expose WeakRef targets which are DOM wrappers whose target has been collected r=smaug,sfink
WeakRef targets that are wrappers to DOM objects are preserved when the WeakRef is created.  This checks whether the wrapper is still preserved in deref() and if it is found to have been released, the target is cleared.

The patch adds a new DOMJSClass hook to deal with getting the wrapper cache for non-nsISupports objects.

Differential Revision: https://phabricator.services.mozilla.com/D78061
2020-06-06 06:58:42 +00:00
Jon Coppeard 1fa83d8c9b Bug 1642685 - Add WeakRef and FinalizationRegistry tests involving DOM objects r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D77798
2020-06-03 09:19:59 +00:00
Jon Coppeard 58b782e36e Bug 1641517 - Don't expose FinalizationRegistry.prototype.cleanupSome in the browser r=mccr8
This adds an extra pref for whether the cleanupSome method is exposed and renames the existing pref. We can turn on the pref to expose cleanupSome to get test262 coverage in the browser.

Differential Revision: https://phabricator.services.mozilla.com/D77267
2020-06-03 09:19:59 +00:00
Razvan Maries a36bb7751f Backed out 3 changesets (bug 1638153) for perma failures on cross-origin-objects.html. CLOSED TREE
Backed out changeset f7aedc92d396 (bug 1638153)
Backed out changeset 07ec713926c6 (bug 1638153)
Backed out changeset 5a656842e241 (bug 1638153)
2020-06-01 23:51:35 +03:00
Kris Maglione b3fcd970ec Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-01 17:59:01 +00:00
Masatoshi Kimura b9a2ffc214 Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-31 03:41:03 +00:00
Tom Schuster 98d62427ed Bug 1636691 - Use pending exception stack as rejection stack for Promises. r=arai<Paste>
Differential Revision: https://phabricator.services.mozilla.com/D74541
2020-05-23 11:53:48 +00:00
Mihai Alexandru Michis 37ef8a125d Backed out changeset a845717e4d10 (bug 1482279) for causing multiple failures.
CLOSED TREE
2020-05-23 02:22:20 +03:00
Masatoshi Kimura 0701e89b7e Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-22 21:46:25 +00:00
Tom Tung b66c778c91 Bug 1606624 - Changes on a xpconnect test; r=lth
Depends on D74596

Differential Revision: https://phabricator.services.mozilla.com/D74597
2020-05-18 02:22:21 +00:00
Tom Schuster 23d6a01f6d Bug 1638549 - Fix test broken by disabled asyncstacks. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75682
2020-05-17 17:58:52 +00:00
Tom Schuster a5a57442ed Bug 1636590 - Expose isPromiseRejection on nsIScriptError. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74549
2020-05-15 20:18:34 +00:00
Tom Schuster cb531f543a Bug 1636590 - Add a test suite for nsIScriptError. r=baku
This makes is easier to actually assert that we have the right exception value.
We do have similar tests already, but most of them aren't based directly
on nsIScriptError.

Differential Revision: https://phabricator.services.mozilla.com/D74528
2020-05-15 20:18:34 +00:00
Iain Ireland 9206b149be Bug 1634135: Update test_xrayToJS to handle Regexp.prototype.dotAll r=bholley
We are adding support for the dotAll (/s) RegExp flag, so the list of expected properties on the RegExp prototype has to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D74149
2020-05-13 16:23:33 +00:00
André Bargull 8642ae3db5 Bug 1629796: Replace finalization iterator with multiple callback calls. r=jonco
Implements the spec changes from: https://github.com/tc39/proposal-weakrefs/pull/187

The spec change removes the `FinalizationRegistryCleanupIterator` in favour of
calling the clean-up callback for each finalised value. It also allows to call
`cleanupSome()` within the callback function.

`FinalizationRegistryObject::cleanupQueuedRecords()` has been changed to iterate
from back to front, because this allows us to call `GCVector::popCopy()`, which
makes it more efficient to remove entries from the `records` vector.

Differential Revision: https://phabricator.services.mozilla.com/D70821
2020-05-13 15:25:24 +00:00