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

Issue 2694943002: DCHECK: load event is dispatched after executeScript() iff m_isExternalScript

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

Description

DCHECK: load event is dispatched after executeScript() iff m_isExternalScript Currently, ScriptLoader::executeScript() mostly corresponds to "execute a script block" in the spec. https://html.spec.whatwg.org/#execute-the-script-block However, its Steps 2 and 8 (dispatching error and load events, respectively) are handled in the caller of executeScript(). As a preparation for moving the code for Steps 2 and 8 into executeScript(), this CL adds DCHECK()s that confirms all the callers of executeScript() dispatches a load event if and only if the script is from an external file, as the spec says. BUG=686281

Patch Set 1 #

Patch Set 2 : Add more DCHECK #

Total comments: 1

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -0 lines) Patch
M third_party/WebKit/Source/core/dom/ScriptLoader.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp View 1 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (12 generated)
hiroshige
PTAL. (I expect the actual refactoring will be after ES6 module implementation though)
3 years, 10 months ago (2017-02-14 01:42:21 UTC) #7
kouhei (in TOK)
https://codereview.chromium.org/2694943002/diff/20001/third_party/WebKit/Source/core/dom/ScriptLoader.h File third_party/WebKit/Source/core/dom/ScriptLoader.h (right): https://codereview.chromium.org/2694943002/diff/20001/third_party/WebKit/Source/core/dom/ScriptLoader.h#newcode121 third_party/WebKit/Source/core/dom/ScriptLoader.h:121: #if DCHECK_IS_ON() Can we remove #if here? as m_isExternalScript ...
3 years, 10 months ago (2017-02-14 01:50:54 UTC) #8
kouhei (in TOK)
lgtm
3 years, 10 months ago (2017-02-14 01:51:01 UTC) #9
hiroshige
3 years, 10 months ago (2017-02-23 02:07:24 UTC) #14
On 2017/02/14 01:51:01, kouhei wrote:
> lgtm

Assertion fails :(
I'll investigate why later.

Powered by Google App Engine
This is Rietveld 408576698