DescriptionCheck 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
Dependent Patchsets: Messages
Total messages: 17 (11 generated)
|