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

Issue 2821553002: Refactor code around ScriptLoader::FetchScript() according to the spec (Closed)

Created:
3 years, 8 months ago by hiroshige
Modified:
3 years, 8 months ago
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor code around ScriptLoader::FetchScript() according to the spec This CL renames FetchScript() into FetchClassicScript(), and moves most of spec'ed logic to PrepareScript(). This makes the code structure to correspond to the spec more directly, e.g. - FetchClassicScript() now directly corresponds to "fetch a classic script" https://html.spec.whatwg.org/#fetch-a-classic-script and works just as a bridge between PrepareScript() (dominated by HTML spec) and the Blink loading interface. - Empty/invalid URLs are handled explicitly, independently from script type, and in the steps that directly correspond to the spec, while previously they are handled as the cases where ScriptResource::Fetch() returns null. This also makes it easier to implement module script supports. This CL shouldn't change the behavior. BUG=686281 Review-Url: https://codereview.chromium.org/2821553002 Cr-Commit-Position: refs/heads/master@{#465485} Committed: https://chromium.googlesource.com/chromium/src/+/b8d842d9a8a6d837901ce9ef4629c6ebdaef5694

Patch Set 1 #

Patch Set 2 : refine #

Patch Set 3 : refine #

Patch Set 4 : refine #

Total comments: 16

Patch Set 5 : fix FetchClassicScript() == false case #

Patch Set 6 : DCHECK #

Patch Set 7 : Revert behavior change #

Patch Set 8 : Rebase #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -121 lines) Patch
M third_party/WebKit/Source/core/dom/ScriptLoader.h View 1 2 3 4 5 6 7 8 9 3 chunks +21 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +151 lines, -114 lines 0 comments Download

Messages

Total messages: 41 (35 generated)
hiroshige
PTAL. https://codereview.chromium.org/2821553002/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (left): https://codereview.chromium.org/2821553002/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#oldcode270 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:270: // 14. "If the script element has a ...
3 years, 8 months ago (2017-04-14 00:13:29 UTC) #15
kouhei (in TOK)
lgtm
3 years, 8 months ago (2017-04-14 05:12:47 UTC) #24
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/2821553002/180001
3 years, 8 months ago (2017-04-19 01:02:43 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/392335)
3 years, 8 months ago (2017-04-19 01:08:49 UTC) #35
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/2821553002/200001
3 years, 8 months ago (2017-04-19 01:18:40 UTC) #38
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 03:37:42 UTC) #41
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/b8d842d9a8a6d837901ce9ef4629...

Powered by Google App Engine
This is Rietveld 408576698