gecko-dev/layout
Timothy Nikkel fbbb775ffc Bug 1582653. Need to clear any associated display items of a nsSubDocumentFrame when the frame loader changes. r=mattwoodrow
parser/htmlparser/tests/crashtests/515533-1.html most cleanly creates this crash if you repeat it many times.

It contains an iframe to a local file (so it's a same process iframe). The document in the iframe has an inline script that does

  window.location.replace("data:text/plain,");

since crashtests have the pref browser.tabs.remote.dataUriInDefaultWebProcess set (to get more testing of fission) this makes the iframe now in a different process from it's parent.

When the bug happens we create the retained nsDisplaySubDocument before the process change, the document inside the iframe has a presshell, and importantly, it does not yet have a root frame. Then the remoteness change happens on the iframe, ResetFrameLoader is called on the nsSubDocumentFrame to remove the old frame loader. So now the nsSubDocumentFrame can't find a presshell (either via views or the frameloader).

The reason that the document in the iframe not having a root frame when the nsDisplaySubDocument is created is important is because if we had a root frame then the root frame would be the mFrame of the nsDisplaySubDocument and when the root frame got destroyed for the remoteness change that frame destruction would make sure that the nsDisplaySubDocument cannot be re-used. The nsSubDocumentFrame sticks around though, so the nsDisplaySubDocument doesn't think anything changed.

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

--HG--
extra : moz-landing-system : lando
2020-03-08 22:17:27 +00:00
..
base Bug 1620694 - Prevent inlining of nsFrameConstructorState::ProcessFrameInsertions r=dholbert 2020-03-09 14:22:34 +00:00
build Bug 1607356 - Move OTS sanitization to background thread. r=KrisWright 2020-03-04 18:25:08 +00:00
doc
forms Backed out 8 changesets (bug 1618202) for mochitest failures on test_sanityEventUtils.html . CLOSED TREE 2020-03-10 02:39:47 +02:00
generic Bug 1582653. Need to clear any associated display items of a nsSubDocumentFrame when the frame loader changes. r=mattwoodrow 2020-03-08 22:17:27 +00:00
inspector Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop 2020-03-07 10:09:44 +00:00
ipc Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
mathml Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
media
painting Bug 1616444 - Ensure gradients are properly color managed with WebRender. r=jrmuizel 2020-03-09 17:11:54 +00:00
printing Bug 1619403. Merge nsPrintJob's GetDisplayTitleAndURL and GetDocumentTitleAndURL. r=nordzilla 2020-03-03 20:08:53 +00:00
reftests Backed out 8 changesets (bug 1618202) for mochitest failures on test_sanityEventUtils.html . CLOSED TREE 2020-03-10 02:39:47 +02:00
style Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku 2020-03-09 23:36:39 +00:00
svg Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
tables Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
tools Bug 1325207 - [reftest] Stop treating 'skip/skip-if' as a failure type in the manifests r=kats 2020-03-09 15:20:11 +00:00
xul Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel 2020-03-09 14:16:17 +00:00
moz.build