gecko-dev/dom/file
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
..
ipc Bug 1570369 - Part 11: Use IPDL refcounted for PIPCBlobInputStream, r=baku 2019-08-08 16:46:46 +00:00
tests Bug 1559489, part 4 - Remote-to-local window transplanting. r=tcampbell,bzbarsky 2019-08-13 19:09:59 +00:00
uri Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE 2019-08-02 12:17:42 +03:00
BaseBlobImpl.cpp Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
BaseBlobImpl.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
Blob.cpp Bug 1014393 - Add Blob::CreateEmptyBlob. r=baku 2019-08-03 17:27:15 +00:00
Blob.h Bug 1014393 - Add Blob::CreateEmptyBlob. r=baku 2019-08-03 17:27:15 +00:00
BlobImpl.cpp
BlobImpl.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
BlobSet.cpp
BlobSet.h
EmptyBlobImpl.cpp
EmptyBlobImpl.h
File.cpp Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
File.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
FileBlobImpl.cpp Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
FileBlobImpl.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
FileCreatorHelper.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
FileCreatorHelper.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
FileList.cpp
FileList.h
FileReader.cpp Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink 2019-03-04 15:19:16 -08:00
FileReader.h
FileReaderSync.cpp Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink 2019-03-04 15:19:16 -08:00
FileReaderSync.h
MemoryBlobImpl.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
MemoryBlobImpl.h
MultipartBlobImpl.cpp Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
MultipartBlobImpl.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
MutableBlobStorage.cpp Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - TemporaryIPCBlob actors, r=qdot 2019-04-26 18:01:53 +00:00
MutableBlobStorage.h
MutableBlobStreamListener.cpp Bug 1525319 - Removing context from OnDataAvailable r=valentin 2019-02-27 23:42:27 +00:00
MutableBlobStreamListener.h
StreamBlobImpl.cpp Bug 1536154 - Make nsStringInputStream always report the full memory size of the backing string r=baku 2019-04-30 11:53:42 +01:00
StreamBlobImpl.h Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug 2019-04-26 17:53:07 +00:00
StringBlobImpl.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
StringBlobImpl.h
TemporaryFileBlobImpl.cpp Bug 1522579 - Part 3: Remove consumers of nsIContentChild, r=mccr8 2019-02-25 20:04:49 +00:00
TemporaryFileBlobImpl.h
moz.build