gecko-dev/js
Andrew McCreight c706a636a8 Bug 1559489, part 4 - Remote-to-local window transplanting. r=tcampbell,bzbarsky
This patch cleans up remote outer window proxies when we navigate back
into the process.

It adds a flag to mDanglingRemoteOuterProxies that is set in between
BrowsingContext::SetDocShell(), where we can tell that the browsing
context is going from being remote to being local, to
nsGlobalWindowOuter::SetNewDocument(), where the local outer window
proxy is actually created. Once the outer window is created, the
remote window proxies can be cleaned up in
CleanUpDanglingRemoteOuterWindowProxies().

The clean up is done by a process that is similar to object
transplanting, except that instead of looking in the cross-compartment
wrapper table for each compartment to find objects to be turned into
CCWs to the new object, it looks in the remote proxy map for each
compartment. SpiderMonkey doesn't know about the proxy maps, so this
has to be done by a new callback object CompartmentTransplantCallback.

Now that this cleanup is being done, it shouldn't be possible to wrap
a remote outer window proxy when the browsing context is local, so
MaybeWrapWindowProxy() can be simplified. I had to drop the assert
here that the browsing context has a window proxy because during clean
up we call wrap on a local outer window proxy before the BC gets the
window proxy set on it. I had the assert because my original plan was
to implicitly fix remote proxies during wrapping, but that is no
longer necessary.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 19:09:59 +00:00
..
ductwork/debugger Backed out changeset 781d092114da (bug 1564168) for failures on test_onGarbageCollection.html 2019-08-08 05:12:21 +03:00
examples Backed out changeset 781d092114da (bug 1564168) for failures on test_onGarbageCollection.html 2019-08-08 05:12:21 +03:00
ipc Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
public Bug 1559489, part 2 - Split out the back half of RemapWrapper into a new method. r=tcampbell 2019-08-13 19:09:46 +00:00
rust Bug 1569331 - Update bindgen to 0.51. r=froydnj 2019-07-27 00:36:18 +00:00
src Bug 1559489, part 4 - Remote-to-local window transplanting. r=tcampbell,bzbarsky 2019-08-13 19:09:59 +00:00
xpconnect Bug 1559489, part 4 - Remote-to-local window transplanting. r=tcampbell,bzbarsky 2019-08-13 19:09:59 +00:00
app.mozbuild Bug 1569197 - Backed out changeset 2a053de2828f;r=arai 2019-08-07 09:17:11 +00:00
ffi.configure
moz.build
moz.configure Bug 1568026 - move LTO/PGO configure bits to a new file; r=dmajor 2019-07-30 16:38:39 +00:00
sub.configure