mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 12:05:22 +00:00
c706a636a8
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 |
||
---|---|---|
.. | ||
ipc | ||
tests | ||
uri | ||
BaseBlobImpl.cpp | ||
BaseBlobImpl.h | ||
Blob.cpp | ||
Blob.h | ||
BlobImpl.cpp | ||
BlobImpl.h | ||
BlobSet.cpp | ||
BlobSet.h | ||
EmptyBlobImpl.cpp | ||
EmptyBlobImpl.h | ||
File.cpp | ||
File.h | ||
FileBlobImpl.cpp | ||
FileBlobImpl.h | ||
FileCreatorHelper.cpp | ||
FileCreatorHelper.h | ||
FileList.cpp | ||
FileList.h | ||
FileReader.cpp | ||
FileReader.h | ||
FileReaderSync.cpp | ||
FileReaderSync.h | ||
MemoryBlobImpl.cpp | ||
MemoryBlobImpl.h | ||
moz.build | ||
MultipartBlobImpl.cpp | ||
MultipartBlobImpl.h | ||
MutableBlobStorage.cpp | ||
MutableBlobStorage.h | ||
MutableBlobStreamListener.cpp | ||
MutableBlobStreamListener.h | ||
StreamBlobImpl.cpp | ||
StreamBlobImpl.h | ||
StringBlobImpl.cpp | ||
StringBlobImpl.h | ||
TemporaryFileBlobImpl.cpp | ||
TemporaryFileBlobImpl.h |