Bug 1523982 - Part 4: When WindowGlobalChild creating, update WindowGlobalParent document's URI; r=nika
authorJohn Dai <jdai@mozilla.com>
Tue, 26 Mar 2019 15:19:58 +0000
changeset 466116 54f0ce4913e043c1eddbb18704a2f0d1d4d1c4d5
parent 466115 06a189e6b675149d77a254e6e4678c9c898d3158
child 466117 7fa7d6e6dedc32fbc59e3dcae4c58cc38bb86921
push id81453
push userjdai@mozilla.com
push dateTue, 26 Mar 2019 16:52:49 +0000
treeherderautoland@54f0ce4913e0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1523982
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523982 - Part 4: When WindowGlobalChild creating, update WindowGlobalParent document's URI; r=nika Depends on D24205 Differential Revision: https://phabricator.services.mozilla.com/D24547
dom/ipc/WindowGlobalChild.cpp
--- a/dom/ipc/WindowGlobalChild.cpp
+++ b/dom/ipc/WindowGlobalChild.cpp
@@ -65,16 +65,18 @@ already_AddRefed<WindowGlobalChild> Wind
   if (!gWindowGlobalChildById) {
     gWindowGlobalChildById = new WGCByIdMap();
     ClearOnShutdown(&gWindowGlobalChildById);
   }
   auto entry = gWindowGlobalChildById->LookupForAdd(wgc->mInnerWindowId);
   MOZ_RELEASE_ASSERT(!entry, "Duplicate WindowGlobalChild entry for ID!");
   entry.OrInsert([&] { return wgc; });
 
+  // Send down our initial document URI.
+  wgc->SendUpdateDocumentURI(aWindow->GetDocumentURI());
   return wgc.forget();
 }
 
 /* static */
 already_AddRefed<WindowGlobalChild> WindowGlobalChild::GetByInnerWindowId(
     uint64_t aInnerWindowId) {
   if (!gWindowGlobalChildById) {
     return nullptr;