Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Issue 1052993006: Refactor frame navigation/detach state cleanup to be more sane. (Closed)

Created:
5 years, 8 months ago by dcheng
Modified:
5 years, 8 months ago
Reviewers:
Nate Chapin
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin, site-isolation-reviews_chromium.org, tyoshino+watch_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Refactor frame navigation/detach state cleanup to be more sane. Prior to this patch, cleaning up state for a navigating or detaching frame was ad hoc: often times, code to do the same thing (e.g. detach child frames) was present in multiple locations just to "be sure" that the cleanup would happen no matter what code path was taken. This logic has been reorganized so that the state cleanup always follows a similar flow for both navigation and detach. There are now 4 common steps: 1. FrameLoader::dispatchUnloadEvent() 2. Frame::detachChildren() 3. Document::prepareForDestruction() 4. FrameLoader::clear() BUG=464764 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193157 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=193227

Patch Set 1 #

Patch Set 2 : Not sure if better or worse #

Patch Set 3 : More hm #

Patch Set 4 : shuffle #

Total comments: 11

Patch Set 5 : Compile fixes and an assert #

Patch Set 6 : Consolidate ScriptForbiddenScope #

Total comments: 2

Patch Set 7 : Fix AXObject cache issues #

Patch Set 8 : Address japhet@ comments and moar asserts #

Patch Set 9 : Port comment over #

Total comments: 5

Patch Set 10 : More feedback #

Patch Set 11 : Fix unit tests... again. #

Patch Set 12 : Revert prepareForDestruction to be called after DocumentLoader::detachFromFrame #

Patch Set 13 : Add rebaseline expectation #

Patch Set 14 : Minor test cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -69 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/MediaQueryEvaluatorTest.cpp View 1 2 3 4 1 chunk +6 lines, -7 lines 0 comments Download
M Source/core/dom/ActiveDOMObjectTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -3 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 2 3 4 1 chunk +1 line, -9 lines 0 comments Download
M Source/core/frame/LocalFrame.h View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +3 lines, -24 lines 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +11 lines, -3 lines 0 comments Download
M Source/core/testing/DummyPageHolder.cpp View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/xml/XSLTProcessor.cpp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/tests/FrameTestHelpers.h View 1 2 3 1 chunk +11 lines, -3 lines 0 comments Download
M Source/web/tests/FrameTestHelpers.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +13 lines, -0 lines 0 comments Download
M Source/web/tests/PinchViewportTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 10 chunks +20 lines, -12 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (12 generated)
dcheng
So after trying to document how frame state changes across navigation/detach, I came to the ...
5 years, 8 months ago (2015-04-03 14:35:45 UTC) #2
Nate Chapin
This seems pretty reasonable, just a stylistic nit. Let me know when you've got the ...
5 years, 8 months ago (2015-04-03 19:27:31 UTC) #3
dcheng
https://codereview.chromium.org/1052993006/diff/100001/Source/core/loader/DocumentLoader.cpp File Source/core/loader/DocumentLoader.cpp (right): https://codereview.chromium.org/1052993006/diff/100001/Source/core/loader/DocumentLoader.cpp#newcode751 Source/core/loader/DocumentLoader.cpp:751: if (frame->document()) { On 2015/04/03 19:27:31, Nate Chapin wrote: ...
5 years, 8 months ago (2015-04-03 20:37:21 UTC) #4
Nate Chapin
LGTM w/nits https://codereview.chromium.org/1052993006/diff/160001/Source/core/loader/FrameLoader.cpp File Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/1052993006/diff/160001/Source/core/loader/FrameLoader.cpp#newcode969 Source/core/loader/FrameLoader.cpp:969: m_frame->detachChildren(); It's clear to me why detachChildren() ...
5 years, 8 months ago (2015-04-03 20:42:33 UTC) #5
dcheng
https://codereview.chromium.org/1052993006/diff/160001/Source/core/loader/FrameLoader.cpp File Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/1052993006/diff/160001/Source/core/loader/FrameLoader.cpp#newcode969 Source/core/loader/FrameLoader.cpp:969: m_frame->detachChildren(); On 2015/04/03 20:42:32, Nate Chapin wrote: > It's ...
5 years, 8 months ago (2015-04-03 20:47:20 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052993006/150016
5 years, 8 months ago (2015-04-03 20:47:58 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052993006/190001
5 years, 8 months ago (2015-04-03 21:17:18 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052993006/210001
5 years, 8 months ago (2015-04-04 02:26:45 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052993006/230001
5 years, 8 months ago (2015-04-04 04:34:08 UTC) #19
commit-bot: I haz the power
Committed patchset #13 (id:230001) as https://src.chromium.org/viewvc/blink?view=rev&revision=193157
5 years, 8 months ago (2015-04-04 06:01:59 UTC) #20
dcheng
A revert of this CL (patchset #13 id:230001) has been created in https://codereview.chromium.org/1058403002/ by dcheng@chromium.org. ...
5 years, 8 months ago (2015-04-04 13:36:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1052993006/250001
5 years, 8 months ago (2015-04-06 22:11:37 UTC) #24
commit-bot: I haz the power
5 years, 8 months ago (2015-04-06 23:42:11 UTC) #25
Message was sent while issue was closed.
Committed patchset #14 (id:250001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=193227

Powered by Google App Engine
This is Rietveld 408576698