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

Issue 2706243006: Check that PendingScript::m_streamer is always null when resource() is null (Closed)

Created:
3 years, 10 months ago by hiroshige
Modified:
3 years, 10 months ago
Reviewers:
sof, kouhei (in TOK)
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check that PendingScript::m_streamer is always null when resource() is null PendingScript::errorOccurred() is written as if |m_streamer| can be non-null even when resource() is null. However, |m_streamer| can be (and should be) set to non-null only if resource() is non-null, and resource() is not cleared unless PendingScript::dispose()d. This CL adds checkState() that asserts |m_streamer| is never non-null when resource() is null, and rewrites PendingScript::errorOccurred() and PendingScript::isReady() based on this assumption, and now these methods are clearly splitted into non-inline and inline script cases. This CL also adds other assertions to hold and more checkState() calls. BUG=686281 Review-Url: https://codereview.chromium.org/2706243006 Cr-Commit-Position: refs/heads/master@{#452515} Committed: https://chromium.googlesource.com/chromium/src/+/edef4982396f33e6038ba37df5f200921bc63f79

Patch Set 1 #

Total comments: 3

Patch Set 2 : Do not checkState() when dispose() -- it might be already disposed(). #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -8 lines) Patch
M third_party/WebKit/Source/core/dom/PendingScript.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/PendingScript.cpp View 1 8 chunks +25 lines, -8 lines 1 comment Download

Dependent Patchsets:

Messages

Total messages: 17 (11 generated)
hiroshige
PTAL.
3 years, 10 months ago (2017-02-23 01:46:39 UTC) #7
kouhei (in TOK)
lgtm https://codereview.chromium.org/2706243006/diff/1/third_party/WebKit/Source/core/dom/PendingScript.cpp File third_party/WebKit/Source/core/dom/PendingScript.cpp (right): https://codereview.chromium.org/2706243006/diff/1/third_party/WebKit/Source/core/dom/PendingScript.cpp#newcode76 third_party/WebKit/Source/core/dom/PendingScript.cpp:76: checkState(); Doesn't have to be this CL, but ...
3 years, 10 months ago (2017-02-23 01:54:18 UTC) #8
hiroshige
https://codereview.chromium.org/2706243006/diff/1/third_party/WebKit/Source/core/dom/PendingScript.cpp File third_party/WebKit/Source/core/dom/PendingScript.cpp (right): https://codereview.chromium.org/2706243006/diff/1/third_party/WebKit/Source/core/dom/PendingScript.cpp#newcode76 third_party/WebKit/Source/core/dom/PendingScript.cpp:76: checkState(); On 2017/02/23 01:54:17, kouhei wrote: > Doesn't have ...
3 years, 10 months ago (2017-02-23 01:58:51 UTC) #9
sof
lgtm https://codereview.chromium.org/2706243006/diff/1/third_party/WebKit/Source/core/dom/PendingScript.cpp File third_party/WebKit/Source/core/dom/PendingScript.cpp (right): https://codereview.chromium.org/2706243006/diff/1/third_party/WebKit/Source/core/dom/PendingScript.cpp#newcode76 third_party/WebKit/Source/core/dom/PendingScript.cpp:76: checkState(); On 2017/02/23 01:58:51, hiroshige wrote: > On ...
3 years, 10 months ago (2017-02-23 07:26:23 UTC) #12
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/2706243006/20001
3 years, 10 months ago (2017-02-23 16:27:37 UTC) #14
commit-bot: I haz the power
3 years, 10 months ago (2017-02-23 16:33:39 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/edef4982396f33e6038ba37df5f2...

Powered by Google App Engine
This is Rietveld 408576698