Reland "Reinitialize isolated world window proxies on navigation if needed."
This is a reland of d24a515a, which triggered false positives in the Blink leak detector. Now that isolated worlds are correctly reinitialized after a navigation, they remains live as long as the associated browsing context is live, persisting across navigations. At the end of the test, the leak detector navigates to an empty page and performs a comparison of live objects against the captured baseline, causing leak detection to incorrectly report the isolated world contexts as leaked. To address this, the web test harness now also disposes any isolated worlds created for a test when resetting the state at the end. Original change's description: > Reinitialize isolated world window proxies on navigation if needed. > > When a window proxy is initialized for a child frame, it must be > reinitialized on every subsequent navigation to correctly hook up the > window proxy (which may have cached JS references). > > Previously, this was only happening for the main world window proxy. One > visible side effect is that if an extension cached a window proxy > reference to a frame that was then navigated, the cached reference would > not work until something else forced the window proxy to be > reinitialized. > > Fixing this has an unintended side effect in an inspector protocol test > which logs context creation: since isolated world window proxies are > reinitialized in an arbitrary order (specifically, HashMap iteration > order), the expected results become arbitrary as well. Instead of hoping > that iteration order remains consistent, update the test to only log the > context creation events it actually cares about. > > Change-Id: I11d7e13f7c2810d1c662ccf40f37c880e5026db5 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2607680 > Commit-Queue: Daniel Cheng <dcheng@chromium.org> > Reviewed-by: Yuki Shiino <yukishiino@chromium.org> > Reviewed-by: Kentaro Hara <haraken@chromium.org> > Cr-Commit-Position: refs/heads/master@{#840983} Change-Id: I77c62a790566815a6e5287bdb465b374c0210bee Bug: 1163893 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616238Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#841380}
Showing
Please register or sign in to comment