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

Issue 2780463002: Introduce blink::Script (Closed)

Created:
3 years, 8 months ago by hiroshige
Modified:
3 years, 8 months ago
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-bindings_chromium.org, blink-reviews, blink-reviews-frames_chromium.org, kinuko+watch, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce blink::Script This CL introduces blink::Script and ClassicScript that correspond to https://html.spec.whatwg.org/#concept-script and https://html.spec.whatwg.org/#classic-script, respectively. This CL moves classic-script-only logic in ScriptLoader::DoExecuteScript() (AccessControlStatus and MIME type check) to ClassicScript. In the rest of this CL, we replace ScriptSourceCode with Script and wrap ScriptSourceCode by ClassicScript where needed. Although this CL makes ScriptLoader to handle blink::Script, currently module scripts are not actually processed because all the call sites supply ClassicScript, and thus this CL shouldn't change the behavior. BUG=594639, 686281 Review-Url: https://codereview.chromium.org/2780463002 Cr-Commit-Position: refs/heads/master@{#464161} Committed: https://chromium.googlesource.com/chromium/src/+/7bd81a2cc4caff15e2d290591b2567a599fbe846

Patch Set 1 #

Patch Set 2 : add classic guard #

Patch Set 3 : Rebase #

Patch Set 4 : refine #

Patch Set 5 : refine #

Patch Set 6 : include #

Patch Set 7 : Make ScriptController classic-only again #

Patch Set 8 : Remove classicScriptSourceCode() from Script #

Patch Set 9 : fix #

Patch Set 10 : style #

Total comments: 4

Patch Set 11 : Make Script TraceWrapperBase #

Patch Set 12 : TRACE_WRAPPERS #

Patch Set 13 : Rebase #

Patch Set 14 : Rebase after renaming (temp) #

Patch Set 15 : Restyle #

Patch Set 16 : restyle #

Patch Set 17 : fix ScriptSourceCode() bug #

Patch Set 18 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+335 lines, -139 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +25 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/core/dom/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/ClassicScript.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +45 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/dom/ClassicScript.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +122 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ModuleScript.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +10 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ModuleScript.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +27 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/PendingScript.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/PendingScript.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -6 lines 0 comments Download
A third_party/WebKit/Source/core/dom/Script.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +50 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +28 lines, -95 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +5 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 75 (59 generated)
hiroshige
PTAL. I'm not so sure about the places of classes, especially ClassicScript (bindings/core/v8 i.e. the ...
3 years, 8 months ago (2017-04-05 23:12:33 UTC) #16
hiroshige
On 2017/04/05 23:12:33, hiroshige wrote: > PTAL. > > I'm not so sure about the ...
3 years, 8 months ago (2017-04-06 00:34:55 UTC) #17
hiroshige
I changed the code structure so that the execution goes core->bindings (ScriptLoader::doExecuteScript() -> Script::runScript() -> ...
3 years, 8 months ago (2017-04-06 02:04:42 UTC) #23
hiroshige
+japhet@.
3 years, 8 months ago (2017-04-06 02:55:08 UTC) #27
kouhei (in TOK)
Wow. I think this makes a lot of sense. Please update desc. https://codereview.chromium.org/2780463002/diff/200001/third_party/WebKit/Source/core/dom/ModuleScript.h File third_party/WebKit/Source/core/dom/ModuleScript.h ...
3 years, 8 months ago (2017-04-06 09:42:35 UTC) #30
hiroshige
https://codereview.chromium.org/2780463002/diff/200001/third_party/WebKit/Source/core/dom/ModuleScript.h File third_party/WebKit/Source/core/dom/ModuleScript.h (right): https://codereview.chromium.org/2780463002/diff/200001/third_party/WebKit/Source/core/dom/ModuleScript.h#newcode30 third_party/WebKit/Source/core/dom/ModuleScript.h:30: class CORE_EXPORT ModuleScript final : public Script, public TraceWrapperBase ...
3 years, 8 months ago (2017-04-06 17:36:30 UTC) #34
kouhei (in TOK)
lgtm
3 years, 8 months ago (2017-04-06 22:33:53 UTC) #39
hiroshige
Rebased after renaming. Could you take a look? Also, this CL introduces class Script, while ...
3 years, 8 months ago (2017-04-10 22:36:03 UTC) #55
Nate Chapin
LGTM. Agreed that it might be wise to rename Script->GetScript() first.
3 years, 8 months ago (2017-04-10 23:48:15 UTC) #56
hiroshige
On 2017/04/10 23:48:15, Nate Chapin wrote: > LGTM. Agreed that it might be wise to ...
3 years, 8 months ago (2017-04-11 00:54:56 UTC) #57
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/2780463002/340001
3 years, 8 months ago (2017-04-12 17:27:19 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/189520) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago (2017-04-12 17:30:35 UTC) #64
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/2780463002/360001
3 years, 8 months ago (2017-04-12 17:56:07 UTC) #67
commit-bot: I haz the power
Prior attempt to commit was detected, but we were not able to check whether the ...
3 years, 8 months ago (2017-04-12 21:08:53 UTC) #70
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/2780463002/360001
3 years, 8 months ago (2017-04-12 21:24:39 UTC) #72
commit-bot: I haz the power
3 years, 8 months ago (2017-04-12 21:50:14 UTC) #75
Message was sent while issue was closed.
Committed patchset #18 (id:360001) as
https://chromium.googlesource.com/chromium/src/+/7bd81a2cc4caff15e2d290591b25...

Powered by Google App Engine
This is Rietveld 408576698