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

Issue 2720683003: Clear pointers to PendingScript when dispose()d in pendingScriptFinished() (Closed)

Created:
3 years, 9 months ago by hiroshige
Modified:
3 years, 9 months ago
CC:
chromium-reviews, blink-reviews, dglazkov+blink, kinuko+watch, blink-reviews-html_chromium.org, loading-reviews+parser_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clear pointers to PendingScript when dispose()d in pendingScriptFinished() In HTMLParserScriptRunner, |pendingScript| is dispose()d but the corresponding pointer to it is not cleared and thus causing the use of PendingScript that is already dispose()d, causing CHECK() failure in PendingScript::element(). There can be two cases, where (1) |pendingScript| is |m_parserBlockingScript| (Clusterfuzz found a test case at Issue 695730), or (2) |pendingScript| is |m_scriptsToExecuteAfterParsing.first()| (no test case found so far). This CL fixes these cases by clearing |m_parserBlockingScript| or removing |m_scriptsToExecuteAfterParsing.first()|. This CL also adds CHECK(false) for (2), which should be removed shortly, hoping clusterfuzz find a test case for (2). This is a regression since https://codereview.chromium.org/2693423002. Before that, when |m_parserBlockingScript| was already disposed, then it was considered as not having a parser blocking script, and thus calling PendingScript::dispose() was sufficient. BUG=695730, 696775, 686281 Review-Url: https://codereview.chromium.org/2720683003 Cr-Commit-Position: refs/heads/master@{#453564} Committed: https://chromium.googlesource.com/chromium/src/+/a08766e7f8ec19cc09341d18b91107377ccfbcd6

Patch Set 1 #

Total comments: 2

Patch Set 2 : Merge the fix for (2). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (21 generated)
hiroshige
PTAL.
3 years, 9 months ago (2017-02-28 00:24:58 UTC) #10
kouhei (in TOK)
lgtm https://codereview.chromium.org/2720683003/diff/1/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp File third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp (right): https://codereview.chromium.org/2720683003/diff/1/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp#newcode370 third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp:370: // |m_parserBlockingScript == m_scriptsToExecuteAfterParsing.first()|. I'm not sure if ...
3 years, 9 months ago (2017-02-28 00:41:48 UTC) #17
kouhei (in TOK)
still lgtm
3 years, 9 months ago (2017-02-28 00:43:36 UTC) #18
hiroshige
Sorry, I just uploaded Patch Set 2 because I thought fixing (1) and (2) in ...
3 years, 9 months ago (2017-02-28 00:44:37 UTC) #19
hiroshige
https://codereview.chromium.org/2720683003/diff/1/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp File third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp (right): https://codereview.chromium.org/2720683003/diff/1/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp#newcode370 third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp:370: // |m_parserBlockingScript == m_scriptsToExecuteAfterParsing.first()|. On 2017/02/28 00:41:48, kouhei wrote: ...
3 years, 9 months ago (2017-02-28 00:48:55 UTC) #20
kouhei (in TOK)
lgtm On 2017/02/28 00:48:55, hiroshige wrote: > https://codereview.chromium.org/2720683003/diff/1/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp > File third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp > (right): > > ...
3 years, 9 months ago (2017-02-28 00:59:40 UTC) #22
sof
lgtm
3 years, 9 months ago (2017-02-28 07:13:35 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2720683003/20001
3 years, 9 months ago (2017-02-28 10:23:34 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 10:28:46 UTC) #30
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/a08766e7f8ec19cc09341d18b911...

Powered by Google App Engine
This is Rietveld 408576698