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

Issue 1180603002: Fix the logic that limits the number of frames in a page. (Closed)

Created:
5 years, 6 months ago by Nate Chapin
Modified:
5 years, 6 months ago
Reviewers:
dcheng
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix the logic that limits the number of frames in a page. This check apparently doesn't run soon enough, and we can create more than the intended limit of 1000 frames. Once we hit 1024, NodeRareData::m_connecetedFrameCount can overflow and we no longer fully detach Frames from their owners at teardown. BUG=493243 TEST=WebFrameTest.MaxFramesDetach Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197139

Patch Set 1 #

Total comments: 2

Patch Set 2 : Assert against maxNumberOfFrames, add unit test #

Patch Set 3 : Rebase #

Patch Set 4 : +UAF #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -6 lines) Patch
M Source/core/dom/NodeRareData.h View 1 1 chunk +1 line, -4 lines 0 comments Download
M Source/core/dom/NodeRareData.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/html/HTMLFrameOwnerElement.cpp View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
A Source/web/tests/data/max-frames-detach.html View 1 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Nate Chapin
The test case in the change description averaged 9 seconds per run on my Z620 ...
5 years, 6 months ago (2015-06-10 22:02:03 UTC) #2
dcheng
https://codereview.chromium.org/1180603002/diff/1/Source/core/dom/NodeRareData.h File Source/core/dom/NodeRareData.h (right): https://codereview.chromium.org/1180603002/diff/1/Source/core/dom/NodeRareData.h#newcode87 Source/core/dom/NodeRareData.h:87: RELEASE_ASSERT_WITH_SECURITY_IMPLICATION((m_connectedFrameCount + amount) < (1 << ConnectedFrameCountBits)); Would it ...
5 years, 6 months ago (2015-06-10 22:08:05 UTC) #3
dcheng
Also... just curious, but would a unit test run any more quickly, since we don't ...
5 years, 6 months ago (2015-06-10 22:08:37 UTC) #4
Nate Chapin
https://codereview.chromium.org/1180603002/diff/1/Source/core/dom/NodeRareData.h File Source/core/dom/NodeRareData.h (right): https://codereview.chromium.org/1180603002/diff/1/Source/core/dom/NodeRareData.h#newcode87 Source/core/dom/NodeRareData.h:87: RELEASE_ASSERT_WITH_SECURITY_IMPLICATION((m_connectedFrameCount + amount) < (1 << ConnectedFrameCountBits)); On 2015/06/10 ...
5 years, 6 months ago (2015-06-10 22:13:47 UTC) #5
Nate Chapin
On 2015/06/10 22:08:37, dcheng wrote: > Also... just curious, but would a unit test run ...
5 years, 6 months ago (2015-06-10 23:04:23 UTC) #6
dcheng
LGTM. I'm curious if calling WebLocalFrame::collectGarbage() will trigger the ASAN error. If it does, it ...
5 years, 6 months ago (2015-06-12 20:38:37 UTC) #7
Nate Chapin
On 2015/06/12 20:38:37, dcheng wrote: > LGTM. > > I'm curious if calling WebLocalFrame::collectGarbage() will ...
5 years, 6 months ago (2015-06-15 19:56:31 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180603002/60001
5 years, 6 months ago (2015-06-15 19:57:07 UTC) #11
commit-bot: I haz the power
5 years, 6 months ago (2015-06-15 21:26:48 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197139

Powered by Google App Engine
This is Rietveld 408576698