New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 145 users

Comments by non-members will not trigger notification emails to users who starred this issue.
Status: Fixed
Owner:
Closed: Jul 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature


Sign in to add a comment
Implement <script type="module">
Project Member Reported by adamk@chromium.org, Mar 14 2016 Back to list
Tracking bug for <script type="module"> work.

See also the v8-side issue: https://bugs.chromium.org/p/v8/issues/detail?id=1569
 
Comment 1 by adamk@chromium.org, Mar 14 2016
Intent to implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/uba6pMr-jec/tXdg6YYPBAAJ
Comment 2 by adamk@chromium.org, Mar 14 2016
Blockedon: v8:1569
Project Member Comment 3 by bugdroid1@chromium.org, Mar 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/5a202cce6e2b2de7b6117c9a3db796b70bf440f2

commit 5a202cce6e2b2de7b6117c9a3db796b70bf440f2
Author: adamk <adamk@chromium.org>
Date: Tue Mar 15 00:43:31 2016

Remove --harmony-modules flag and let embedder decide when modules are used

Modules already have a separate entrypoint into the engine (at the moment,
this is v8::ScriptCompiler::CompileModule, though that will change to
something like ParseModule). This meant that requiring a commandline flag
simply added an extra complexity burden on embedders. By removing the v8
flag, this lets embedders use their own flagging mechanism (such as d8's
"--module", or Blink's RuntimeEnabledFeatures) to control whether
modules are to be used.

Also remove old modules tests that were being skipped (since they test
very old, pre-ES2015 modules syntax).

R=littledan@chromium.org
BUG=v8:1569, chromium:594639
LOG=y

Review URL: https://codereview.chromium.org/1804693002

Cr-Commit-Position: refs/heads/master@{#34764}

[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/src/api.cc
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/src/bootstrapper.cc
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/src/compiler.cc
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/src/d8.cc
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/src/flag-definitions.h
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/src/parsing/parser-base.h
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/test/cctest/test-parsing.cc
[delete] https://crrev.com/f3568ca4005fb81431f74175715f34a460bba765/test/mjsunit/harmony/module-linking.js
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/test/mjsunit/harmony/module-parsing-eval.js
[delete] https://crrev.com/f3568ca4005fb81431f74175715f34a460bba765/test/mjsunit/harmony/module-recompile.js
[delete] https://crrev.com/f3568ca4005fb81431f74175715f34a460bba765/test/mjsunit/harmony/module-resolution.js
[delete] https://crrev.com/f3568ca4005fb81431f74175715f34a460bba765/test/mjsunit/harmony/regress/regress-343928.js
[modify] https://crrev.com/5a202cce6e2b2de7b6117c9a3db796b70bf440f2/test/mjsunit/mjsunit.status

Comment 4 by adamk@chromium.org, Mar 18 2016
Cc: haraken@chromium.org sigbjo...@opera.com littledan@chromium.org
Project Member Comment 5 by bugdroid1@chromium.org, Mar 18 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7e4a661dd6f79f847d878be5651d8e7bd662a7f4

commit 7e4a661dd6f79f847d878be5651d8e7bd662a7f4
Author: adamk <adamk@chromium.org>
Date: Fri Mar 18 20:55:38 2016

Add runtime flag for <script type="module">

Also exercise it in a very basic way in ScriptLoader (at the moment,
<script type="module"> is treated the same as <script>).

See intent-to-implement:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/uba6pMr-jec/tXdg6YYPBAAJ

BUG=594639

Review URL: https://codereview.chromium.org/1807293004

Cr-Commit-Position: refs/heads/master@{#382083}

[add] https://crrev.com/7e4a661dd6f79f847d878be5651d8e7bd662a7f4/third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/module-script-expected.txt
[add] https://crrev.com/7e4a661dd6f79f847d878be5651d8e7bd662a7f4/third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/module-script.html
[modify] https://crrev.com/7e4a661dd6f79f847d878be5651d8e7bd662a7f4/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/7e4a661dd6f79f847d878be5651d8e7bd662a7f4/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Comment 6 by adamk@chromium.org, Jul 14 2016
Cc: neis@chromium.org
Comment 7 by adamk@chromium.org, Oct 10 2016
Cc: dominicc@chromium.org kochi@chromium.org kouhei@chromium.org
Comment 8 by tkent@chromium.org, Oct 14 2016
Components: -Blink>HTML Blink>HTML>Modules
Project Member Comment 9 by bugdroid1@chromium.org, Jan 12 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57c86c65d60a0e5da917fa3cb6c6b374821b7984

commit 57c86c65d60a0e5da917fa3cb6c6b374821b7984
Author: adamk <adamk@chromium.org>
Date: Thu Jan 12 01:36:01 2017

Create bare-bones ScriptModule class

Provides a ScriptModule wrapper around v8::Module, as
well as primordial forms of the three basic operations
on modules:

  - compile(), a static method which takes a string and
    returns a ScriptModule
  - instantiate(), which "links" a module with its dependencies
    (the initial implementation does no actual linking)
  - evaluate(), which runs the module (and its dependencies;
    naturally this version doesn't do the latter)

Landing this in its early state makes it easier for others
working on <script type="module"> support to make progress
on other CLs, many of which will interact with this class

BUG=594639

Review-Url: https://codereview.chromium.org/2566513002
Cr-Commit-Position: refs/heads/master@{#443112}

[modify] https://crrev.com/57c86c65d60a0e5da917fa3cb6c6b374821b7984/third_party/WebKit/Source/bindings/bindings.gni
[add] https://crrev.com/57c86c65d60a0e5da917fa3cb6c6b374821b7984/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[add] https://crrev.com/57c86c65d60a0e5da917fa3cb6c6b374821b7984/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/57c86c65d60a0e5da917fa3cb6c6b374821b7984/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/57c86c65d60a0e5da917fa3cb6c6b374821b7984/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h

Comment 10 by zcorpan@gmail.com, Jan 13 2017
Blockedon: 681050
Comment 11 by adamk@chromium.org, Jan 13 2017
Cc: adamk@chromium.org
Owner: kouhei@chromium.org
Project Member Comment 12 by bugdroid1@chromium.org, Jan 18 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f8f6553f21647ef987f423bb30ed260c5133a08b

commit f8f6553f21647ef987f423bb30ed260c5133a08b
Author: kouhei <kouhei@chromium.org>
Date: Wed Jan 18 09:15:16 2017

[ES6 modules] Introduce Modulator "module map settings object"

This CL introduces Modulator class, which implements a HTML spec concept
"module map settings object". Modulator instance is owned by V8PerContextData.

BUG=594639

Review-Url: https://codereview.chromium.org/2639893003
Cr-Commit-Position: refs/heads/master@{#444308}

[modify] https://crrev.com/f8f6553f21647ef987f423bb30ed260c5133a08b/third_party/WebKit/Source/bindings/core/v8/LocalWindowProxy.cpp
[modify] https://crrev.com/f8f6553f21647ef987f423bb30ed260c5133a08b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
[modify] https://crrev.com/f8f6553f21647ef987f423bb30ed260c5133a08b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h
[modify] https://crrev.com/f8f6553f21647ef987f423bb30ed260c5133a08b/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/f8f6553f21647ef987f423bb30ed260c5133a08b/third_party/WebKit/Source/core/dom/Modulator.cpp
[add] https://crrev.com/f8f6553f21647ef987f423bb30ed260c5133a08b/third_party/WebKit/Source/core/dom/Modulator.h

Project Member Comment 13 by bugdroid1@chromium.org, Jan 19 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/605bc2f64983eba6b1f3d7a6b6e27ae72c9356c2

commit 605bc2f64983eba6b1f3d7a6b6e27ae72c9356c2
Author: kouhei <kouhei@chromium.org>
Date: Thu Jan 19 08:50:34 2017

[ES6 modules] Implement https://html.spec.whatwg.org/#resolve-a-module-specifier

BUG=594639

Review-Url: https://codereview.chromium.org/2640723002
Cr-Commit-Position: refs/heads/master@{#444684}

[modify] https://crrev.com/605bc2f64983eba6b1f3d7a6b6e27ae72c9356c2/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/605bc2f64983eba6b1f3d7a6b6e27ae72c9356c2/third_party/WebKit/Source/core/dom/Modulator.cpp
[modify] https://crrev.com/605bc2f64983eba6b1f3d7a6b6e27ae72c9356c2/third_party/WebKit/Source/core/dom/Modulator.h
[add] https://crrev.com/605bc2f64983eba6b1f3d7a6b6e27ae72c9356c2/third_party/WebKit/Source/core/dom/ModulatorTest.cpp

Cc: rbyers@chromium.org
We're going through top-starred blink bugs to better understand their status and priority.  This is currently #14.

As I understand it, modules are making active progress and getting close to something we could ship, right?  kouhei@ can you give us a summary of where you expect to get in Chrome 58 / Q1?  Do you have any particular Chrome milestone that you're targeting in hopes of shipping?
We'd like to land this feature in Q1 under the flag.

Please see the design doc for detailed status:
https://docs.google.com/document/d/1vjiWxwhg9D0GNNOYgw3AxMG0iKOC9I3jlID4GTgZsac/edit
Project Member Comment 16 by bugdroid1@chromium.org, Feb 1 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/662f25082427e46ee802aa95ed883a0132e682e5

commit 662f25082427e46ee802aa95ed883a0132e682e5
Author: kouhei <kouhei@chromium.org>
Date: Wed Feb 01 21:53:44 2017

[ES6 Modules] Introduce ModuleScriptFetchRequest

This CL introduces ModuleScriptFetchRequest, a parameter object which
will be used to represent arguments of the spec "fetch a single module script"
algorithm:
https://html.spec.whatwg.org/#fetch-a-single-module-script

For a graphical mapping to the spec concept, please see:
https://docs.google.com/spreadsheets/d/1tofYrhZrTl605CHk95VVj_1HN7lOkQ3C7D-5NRful4s/edit#gid=0

BUG=594639

Review-Url: https://codereview.chromium.org/2660663002
Cr-Commit-Position: refs/heads/master@{#447620}

[modify] https://crrev.com/662f25082427e46ee802aa95ed883a0132e682e5/third_party/WebKit/Source/core/loader/BUILD.gn
[add] https://crrev.com/662f25082427e46ee802aa95ed883a0132e682e5/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptFetchRequest.h

Project Member Comment 17 by bugdroid1@chromium.org, Feb 1 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d335c5cc47cef718bec67cded9c128acea4370b

commit 7d335c5cc47cef718bec67cded9c128acea4370b
Author: kouhei <kouhei@chromium.org>
Date: Wed Feb 01 23:47:00 2017

[ES6 modules] Introduce ModuleScript model object

This CL introduces ModuleScript model object.
A ModuleScript corresponds to "module script" spec concept.
https://html.spec.whatwg.org/multipage/webappapis.html#module-script

BUG=594639

Review-Url: https://codereview.chromium.org/2643003002
Cr-Commit-Position: refs/heads/master@{#447644}

[modify] https://crrev.com/7d335c5cc47cef718bec67cded9c128acea4370b/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/7d335c5cc47cef718bec67cded9c128acea4370b/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/7d335c5cc47cef718bec67cded9c128acea4370b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[add] https://crrev.com/7d335c5cc47cef718bec67cded9c128acea4370b/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 18 by bugdroid1@chromium.org, Feb 6 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1aae17db472fc55ba8f985957fe0171d41fe5899

commit 1aae17db472fc55ba8f985957fe0171d41fe5899
Author: kouhei <kouhei@chromium.org>
Date: Mon Feb 06 03:27:13 2017

Pass is_module flag when we V8ScriptRunner::compileModule

BUG=594639

Review-Url: https://codereview.chromium.org/2672053003
Cr-Commit-Position: refs/heads/master@{#448206}

[modify] https://crrev.com/1aae17db472fc55ba8f985957fe0171d41fe5899/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp

Re #15: Excellent, thanks for the update!  We'll check in again sometime in Q2.
Project Member Comment 20 by bugdroid1@chromium.org, Feb 22 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d509c6bcafa280cde5094762d83656fc13606aa

commit 9d509c6bcafa280cde5094762d83656fc13606aa
Author: kochi <kochi@chromium.org>
Date: Wed Feb 22 05:37:21 2017

Update bug number for ES modules WPT tests

Detach ES modules WPT tests from crbug.com/692105 and work it on
the main issue for implementing <script type="module">
(still marked as "Skip").

This doesn't change set of tests to run at all.

BUG=594639
NOTRY=true

Review-Url: https://codereview.chromium.org/2714433002
Cr-Commit-Position: refs/heads/master@{#451886}

[modify] https://crrev.com/9d509c6bcafa280cde5094762d83656fc13606aa/third_party/WebKit/LayoutTests/TestExpectations

Project Member Comment 21 by bugdroid1@chromium.org, Feb 27 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4894c4d4256b453b617346f29cfd81487dbffa56

commit 4894c4d4256b453b617346f29cfd81487dbffa56
Author: kouhei <kouhei@chromium.org>
Date: Mon Feb 27 01:47:33 2017

[ES6 modules] Introduce ModuleScriptLoaderClient

This CL introduces ModuleScriptLoaderClient interface,
which will be used to notify a single module script load completion.

BUG=594639

Review-Url: https://codereview.chromium.org/2668283003
Cr-Commit-Position: refs/heads/master@{#453135}

[modify] https://crrev.com/4894c4d4256b453b617346f29cfd81487dbffa56/third_party/WebKit/Source/core/loader/BUILD.gn
[add] https://crrev.com/4894c4d4256b453b617346f29cfd81487dbffa56/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderClient.h

Project Member Comment 22 by bugdroid1@chromium.org, Feb 27 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95773d4b1d9191b58e36e2c3b8329abf07c80a8a

commit 95773d4b1d9191b58e36e2c3b8329abf07c80a8a
Author: kouhei <kouhei@chromium.org>
Date: Mon Feb 27 03:51:55 2017

[ES6 modules] Introduce ModuleMap

This CL introduces ModuleMap, which corresponds to "module map" spec concept.
ModuleMap keeps track of every ModuleScripts loaded inside a single Modulator.
When a ModuleScript instance is needed, we query ModuleMap to find if there is
a existing instance of the ModuleScript. If there isn't an existing instance,
ModuleMap is responsible for fetching it.

See below diagram for where it stands in the stack:
https://docs.google.com/document/d/1vjiWxwhg9D0GNNOYgw3AxMG0iKOC9I3jlID4GTgZsac/edit#heading=h.47x0qrpzjbj4

BUG=594639

Review-Url: https://codereview.chromium.org/2704323002
Cr-Commit-Position: refs/heads/master@{#453141}

[modify] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/dom/Modulator.h
[add] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/dom/ModuleMap.cpp
[add] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/dom/ModuleMap.h
[add] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
[add] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h
[add] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[add] https://crrev.com/95773d4b1d9191b58e36e2c3b8329abf07c80a8a/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 23 by bugdroid1@chromium.org, Feb 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da62656d9b7a2f572f7c9d0fc634182a0903e136

commit da62656d9b7a2f572f7c9d0fc634182a0903e136
Author: kouhei <kouhei@chromium.org>
Date: Tue Feb 28 06:14:25 2017

mv FetchTestingPlatformSupport to platform/loader/testing

This CL moves FetchTestingPlatformSupport to platform/loader/testing dir and under test_support build target.
This CL prepares its usage in ModuleMapTest to be introduced in:
https://codereview.chromium.org/2704323002/

BUG=594639

Review-Url: https://codereview.chromium.org/2718943003
Cr-Commit-Position: refs/heads/master@{#453518}

[modify] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp
[modify] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp
[modify] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp
[modify] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
[rename] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp
[rename] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.h
[rename] https://crrev.com/da62656d9b7a2f572f7c9d0fc634182a0903e136/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h

Project Member Comment 24 by bugdroid1@chromium.org, Mar 23 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e125ca73f1098cb4f4b6e2226e98f9471773e1ee

commit e125ca73f1098cb4f4b6e2226e98f9471773e1ee
Author: kouhei <kouhei@chromium.org>
Date: Thu Mar 23 12:33:15 2017

[ES6 modules] Introduce ModuleScriptLoader

This CL introduces ModuleScriptLoader, which can load a new single
ModuleScript.

ModuleScriptLoader is intended to be an internal building block which
should not be used outside ES6 modules implementation.
See below diagram for where it stands in the stack:
https://docs.google.com/document/d/1vjiWxwhg9D0GNNOYgw3AxMG0iKOC9I3jlID4GTgZsac/edit#heading=h.47x0qrpzjbj4

BUG=594639

Review-Url: https://codereview.chromium.org/2697073002
Cr-Commit-Position: refs/heads/master@{#459057}

[modify] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/loader/BUILD.gn
[add] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp
[add] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
[add] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderRegistry.cpp
[add] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderRegistry.h
[add] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
[modify] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/core/testing/DummyModulator.h
[add] https://crrev.com/e125ca73f1098cb4f4b6e2226e98f9471773e1ee/third_party/WebKit/Source/web/tests/data/module.js

Project Member Comment 25 by bugdroid1@chromium.org, Mar 30 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/679a8ee1b416d892b465fc505a8e695f6788cf13

commit 679a8ee1b416d892b465fc505a8e695f6788cf13
Author: kouhei <kouhei@chromium.org>
Date: Thu Mar 30 08:33:59 2017

[ES6 modules] Make Modulator regular GCollected / not mixin

Before this CL, Modulator was a GCMixin, but there was no reason that it needed to be a mixin.
This CL changes it to a regular GarbageCollectedFinalized obj.

This CL prepares Modulator/ModuleMap/ModuleMap::Entry/ModuleScript to be converted into
TraceWrapperBase.

BUG=594639

Review-Url: https://codereview.chromium.org/2788533002
Cr-Commit-Position: refs/heads/master@{#460696}

[modify] https://crrev.com/679a8ee1b416d892b465fc505a8e695f6788cf13/third_party/WebKit/Source/core/dom/Modulator.cpp
[modify] https://crrev.com/679a8ee1b416d892b465fc505a8e695f6788cf13/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/679a8ee1b416d892b465fc505a8e695f6788cf13/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/679a8ee1b416d892b465fc505a8e695f6788cf13/third_party/WebKit/Source/core/testing/DummyModulator.h

Blockedon: 707123
Project Member Comment 27 by bugdroid1@chromium.org, Apr 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e50d7a2ae677c7a766c0a74385d367d757a4699e

commit e50d7a2ae677c7a766c0a74385d367d757a4699e
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 04 05:26:32 2017

[ES6 modules] Introduce ScriptModuleTest and test ::compile()

This CL introduce ScriptModuleTest, a unit test for ScriptModule.
ScriptModule::compile() method is now unit-tested briefly.

BUG=594639

Review-Url: https://codereview.chromium.org/2797453004
Cr-Commit-Position: refs/heads/master@{#461636}

[modify] https://crrev.com/e50d7a2ae677c7a766c0a74385d367d757a4699e/third_party/WebKit/Source/bindings/bindings.gni
[add] https://crrev.com/e50d7a2ae677c7a766c0a74385d367d757a4699e/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp

Project Member Comment 28 by bugdroid1@chromium.org, Apr 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/784c7ca7eb7a7b97cb9d4aa83536a930cec48ba0

commit 784c7ca7eb7a7b97cb9d4aa83536a930cec48ba0
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 04 08:28:06 2017

[ES6 modules] Document ScriptModule

BUG=594639

Review-Url: https://codereview.chromium.org/2792263002
Cr-Commit-Position: refs/heads/master@{#461659}

[modify] https://crrev.com/784c7ca7eb7a7b97cb9d4aa83536a930cec48ba0/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h

Project Member Comment 29 by bugdroid1@chromium.org, Apr 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be24886a5bda4deb8a19e2026533d62246101707

commit be24886a5bda4deb8a19e2026533d62246101707
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 04 10:14:11 2017

[ES6 modules] ScriptModule::instantiate with resolveModule cb and error handling

This CL replaces ScriptModule::instantiate implementation to support
HostResolveModule callback routed to Modulator and proper error handling

BUG=594639

Review-Url: https://codereview.chromium.org/2785983002
Cr-Commit-Position: refs/heads/master@{#461675}

[modify] https://crrev.com/be24886a5bda4deb8a19e2026533d62246101707/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/be24886a5bda4deb8a19e2026533d62246101707/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/be24886a5bda4deb8a19e2026533d62246101707/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
[modify] https://crrev.com/be24886a5bda4deb8a19e2026533d62246101707/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h

Project Member Comment 30 by bugdroid1@chromium.org, Apr 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/756f4ddeb12a503550c6409934a0a8ac80354276

commit 756f4ddeb12a503550c6409934a0a8ac80354276
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 04 11:43:50 2017

[ES6 modules] ScriptModule::compile() exceptions are handled via isolate's MessageListener

This CL removes a TODO comment and clarify that ScriptModule::compile errors are
routed via isolate's MessageListener.

Bonus: ScriptModule ctor w/o args is used to create null ScriptModule.

BUG=594639

Review-Url: https://codereview.chromium.org/2798533002
Cr-Commit-Position: refs/heads/master@{#461684}

[modify] https://crrev.com/756f4ddeb12a503550c6409934a0a8ac80354276/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/756f4ddeb12a503550c6409934a0a8ac80354276/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h

Project Member Comment 31 by bugdroid1@chromium.org, Apr 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f7862ecfcdcdf42328842d94b7eaf039bd2e839

commit 5f7862ecfcdcdf42328842d94b7eaf039bd2e839
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 04 13:27:22 2017

[ES6 modules] Introduce ScriptModule::moduleRequests to access record.[[RequestedModules]]

This CL introduces ScriptModule::moduleRequests, a V8 binding for v8::Module::GetModuleRequest.

BUG=594639

Review-Url: https://codereview.chromium.org/2788573002
Cr-Commit-Position: refs/heads/master@{#461693}

[modify] https://crrev.com/5f7862ecfcdcdf42328842d94b7eaf039bd2e839/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/5f7862ecfcdcdf42328842d94b7eaf039bd2e839/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/5f7862ecfcdcdf42328842d94b7eaf039bd2e839/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp

Project Member Comment 32 by bugdroid1@chromium.org, Apr 5 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41f44b42ba111f77d99f545f3a64022d28577638

commit 41f44b42ba111f77d99f545f3a64022d28577638
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 05 04:43:06 2017

[ES6 modules] Introduce ScriptModuleHash

This CL introduces ScriptModuleHash implementation, which allows ScriptModule to be used as a wtf::Hash{Table,Set,Map} key/value.

BUG=594639

Review-Url: https://codereview.chromium.org/2781303002
Cr-Commit-Position: refs/heads/master@{#461979}

[modify] https://crrev.com/41f44b42ba111f77d99f545f3a64022d28577638/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/41f44b42ba111f77d99f545f3a64022d28577638/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/41f44b42ba111f77d99f545f3a64022d28577638/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp

Project Member Comment 33 by bugdroid1@chromium.org, Apr 5 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0828110c362763556738df32990abbc38370ebc

commit e0828110c362763556738df32990abbc38370ebc
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 05 12:53:42 2017

Allow null other.m_parent in TraceWrapperMember::operator= if other is nullptr.

This CL fixes the DCHECK condition in TraceWrapperMember::operator= to allow
assignment of null TraceWrapperMember.

This CL allows TraceWrapperMember to be used in HeapHash{Set,Map}, as
HashTable::rehash operations involve assignment of empty==null TraceWrapperMembers.

BUG=594639, 707123

Review-Url: https://codereview.chromium.org/2802593002
Cr-Commit-Position: refs/heads/master@{#462044}

[modify] https://crrev.com/e0828110c362763556738df32990abbc38370ebc/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMember.h
[modify] https://crrev.com/e0828110c362763556738df32990abbc38370ebc/third_party/WebKit/Source/bindings/core/v8/TraceWrapperMemberTest.cpp

Project Member Comment 34 by bugdroid1@chromium.org, Apr 5 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b146b4e388d8a0132a0a51cda5b8ebd8237b732e

commit b146b4e388d8a0132a0a51cda5b8ebd8237b732e
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 05 13:01:02 2017

[ES6 modules] Make ModuleMap TraceWrapperBase

This CL makes ModuleMap a TraceWrapperBase so that it can trace into ModuleScript,
which will eventually keep on to its m_instantiationError via TraceWrapperV8Reference.

This CL is required for https://codereview.chromium.org/2782403002/

BUG=594639

Review-Url: https://codereview.chromium.org/2788513003
Cr-Commit-Position: refs/heads/master@{#462047}

[modify] https://crrev.com/b146b4e388d8a0132a0a51cda5b8ebd8237b732e/third_party/WebKit/Source/core/dom/ModuleMap.cpp
[modify] https://crrev.com/b146b4e388d8a0132a0a51cda5b8ebd8237b732e/third_party/WebKit/Source/core/dom/ModuleMap.h
[modify] https://crrev.com/b146b4e388d8a0132a0a51cda5b8ebd8237b732e/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 35 by bugdroid1@chromium.org, Apr 5 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ea86583949ca6e382e3e481243236619359f29c

commit 6ea86583949ca6e382e3e481243236619359f29c
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 05 16:19:19 2017

[ES6 modules] Implement #concept-module-script-instantiation-error

This CL implements the spec concept "instantiation error" as ModuleScript::m_instantiationError.
https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-instantiation-error

BUG=594639

Review-Url: https://codereview.chromium.org/2782403002
Cr-Commit-Position: refs/heads/master@{#462099}

[modify] https://crrev.com/6ea86583949ca6e382e3e481243236619359f29c/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/6ea86583949ca6e382e3e481243236619359f29c/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 36 by bugdroid1@chromium.org, Apr 6 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7

commit c8cb5f2da2acc2d2da66c9e31957c0474e9978e7
Author: hiroshige <hiroshige@chromium.org>
Date: Thu Apr 06 03:07:46 2017

Pass AccessControlStatus to compileModule()

BUG=594639

Review-Url: https://codereview.chromium.org/2774843002
Cr-Commit-Position: refs/heads/master@{#462338}

[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/loader/resource/ScriptResource.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/loader/resource/ScriptResource.h
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/core/testing/DummyModulator.h
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
[modify] https://crrev.com/c8cb5f2da2acc2d2da66c9e31957c0474e9978e7/third_party/WebKit/Source/platform/loader/fetch/Resource.h

Project Member Comment 37 by bugdroid1@chromium.org, Apr 6 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab145489a36b45789323b50bcaceab843423ec06

commit ab145489a36b45789323b50bcaceab843423ec06
Author: hiroshige <hiroshige@chromium.org>
Date: Thu Apr 06 04:24:15 2017

Introduce PendingScript::startStreamingIfPossible()

This is preparation for introducing ModulePendingScript.

As TaskType::Networking uses the loading task runner in the back,
this CL shouldn't change any behavior.

BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2800683005
Cr-Commit-Position: refs/heads/master@{#462353}

[modify] https://crrev.com/ab145489a36b45789323b50bcaceab843423ec06/third_party/WebKit/Source/core/dom/PendingScript.cpp
[modify] https://crrev.com/ab145489a36b45789323b50bcaceab843423ec06/third_party/WebKit/Source/core/dom/PendingScript.h
[modify] https://crrev.com/ab145489a36b45789323b50bcaceab843423ec06/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/ab145489a36b45789323b50bcaceab843423ec06/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp

Project Member Comment 38 by bugdroid1@chromium.org, Apr 7 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38295e6a25c1394264de81fedcde29659d03f632

commit 38295e6a25c1394264de81fedcde29659d03f632
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 07 06:18:17 2017

Move isLegacySupportedJavaScriptLanguage() to MIMETypeRegistry

This is preparation for https://codereview.chromium.org/2780463002/ that moves
callers of isLegacySupportedJavaScriptLanguage() to outside ScriptLoader.

BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2806523002
Cr-Commit-Position: refs/heads/master@{#462792}

[modify] https://crrev.com/38295e6a25c1394264de81fedcde29659d03f632/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/38295e6a25c1394264de81fedcde29659d03f632/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp
[modify] https://crrev.com/38295e6a25c1394264de81fedcde29659d03f632/third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.h

Blockedon: 709848
Project Member Comment 40 by bugdroid1@chromium.org, Apr 10 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a0158c4544b8dbf598dfb829426ab6d755843369

commit a0158c4544b8dbf598dfb829426ab6d755843369
Author: kouhei <kouhei@chromium.org>
Date: Mon Apr 10 09:44:10 2017

[ES6 modules] Introduce ScriptModuleResolverImpl

This CL introduces ScriptModuleResolverImpl, which implements
https://html.spec.whatwg.org/#hostresolveimportedmodule(referencingmodule,-specifier)

This CL also introduces Modulator::getFetchedModuleScript() to synchronously get already fetched ModuleScript from the module map.

BUG=594639

Review-Url: https://codereview.chromium.org/2790473002
Cr-Commit-Position: refs/heads/master@{#463205}

[modify] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h
[add] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
[add] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h
[add] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
[modify] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/a0158c4544b8dbf598dfb829426ab6d755843369/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 41 by bugdroid1@chromium.org, Apr 12 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7bd81a2cc4caff15e2d290591b2567a599fbe846

commit 7bd81a2cc4caff15e2d290591b2567a599fbe846
Author: hiroshige <hiroshige@chromium.org>
Date: Wed Apr 12 21:49:10 2017

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}

[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/ClassicScript.cpp
[add] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/ClassicScript.h
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/PendingScript.cpp
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/PendingScript.h
[add] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/Script.h
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/dom/ScriptLoader.h
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
[modify] https://crrev.com/7bd81a2cc4caff15e2d290591b2567a599fbe846/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp

Project Member Comment 42 by bugdroid1@chromium.org, Apr 13 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d512803299c01324b92ffd8c962da97e3bc8ccff

commit d512803299c01324b92ffd8c962da97e3bc8ccff
Author: hiroshige <hiroshige@chromium.org>
Date: Thu Apr 13 19:14:53 2017

Split PendingScript into PendingScript and ClassicPendingScript

This is preparation for introducing ModulePendingScript.

BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2653923008
Cr-Commit-Position: refs/heads/master@{#464494}

[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
[add] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/dom/PendingScript.cpp
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/dom/PendingScript.h
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/d512803299c01324b92ffd8c962da97e3bc8ccff/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp

Project Member Comment 43 by bugdroid1@chromium.org, Apr 13 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4

commit d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4
Author: hiroshige <hiroshige@chromium.org>
Date: Thu Apr 13 23:38:28 2017

Make Script non-TraceWrapperBase and add a comment about ModuleScript tracing

https://codereview.chromium.org/2780463002/ introduced Script as
TraceWrapperBase, but after discussions Script doesn't needs to be
TraceWrapperBase.

This CL makes Script non-TraceWrapperBase and adds a comments describing why.

BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2820533003
Cr-Commit-Position: refs/heads/master@{#464608}

[modify] https://crrev.com/d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4/third_party/WebKit/Source/core/dom/ClassicScript.cpp
[modify] https://crrev.com/d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4/third_party/WebKit/Source/core/dom/ClassicScript.h
[modify] https://crrev.com/d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/d1ed2867ffe879d6e1e404cb99c0a9713d7c3eb4/third_party/WebKit/Source/core/dom/Script.h

Project Member Comment 44 by bugdroid1@chromium.org, Apr 14 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5

commit 2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 14 00:36:34 2017

Introduce ModulePendingScript

BUG=594639

Review-Url: https://codereview.chromium.org/2815453006
Cr-Commit-Position: refs/heads/master@{#464627}

[modify] https://crrev.com/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5/third_party/WebKit/Source/core/dom/Modulator.h
[add] https://crrev.com/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[add] https://crrev.com/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5/third_party/WebKit/Source/core/dom/ModulePendingScript.h

Project Member Comment 45 by bugdroid1@chromium.org, Apr 14 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6da401480c4d57416ee83a92726f9d0a040588ae

commit 6da401480c4d57416ee83a92726f9d0a040588ae
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 14 04:59:51 2017

Update comments in ModuleScriptFetchRequest.h

BUG=594639

Review-Url: https://codereview.chromium.org/2817983002
Cr-Commit-Position: refs/heads/master@{#464680}

[modify] https://crrev.com/6da401480c4d57416ee83a92726f9d0a040588ae/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptFetchRequest.h

Blockedon: 711706
Project Member Comment 47 by bugdroid1@chromium.org, Apr 14 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80f482b929e1a00817069b15e78cc4473eb50c6f

commit 80f482b929e1a00817069b15e78cc4473eb50c6f
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 14 18:56:12 2017

Revert of Introduce ModulePendingScript (patchset #6 id:100001 of https://codereview.chromium.org/2815453006/ )

Reason for revert:
Reason for revert:
https://codereview.chromium.org/2653923008/ is
suspected to cause CHECK() failure (crbug.com/711703)
inside PendingScript's prefinalizer.

BUG=711703

Original issue's description:
> Introduce ModulePendingScript
>
> BUG=594639
>
> Review-Url: https://codereview.chromium.org/2815453006
> Cr-Commit-Position: refs/heads/master@{#464627}
> Committed: https://chromium.googlesource.com/chromium/src/+/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5

TBR=kouhei@chromium.org,yhirano@chromium.org,sigbjornf@opera.com,japhet@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=594639

Review-Url: https://codereview.chromium.org/2816043005
Cr-Commit-Position: refs/heads/master@{#464765}

[modify] https://crrev.com/80f482b929e1a00817069b15e78cc4473eb50c6f/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/80f482b929e1a00817069b15e78cc4473eb50c6f/third_party/WebKit/Source/core/dom/Modulator.h
[delete] https://crrev.com/eacc100de55e5b286aa8548b22c99c815cd69486/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[delete] https://crrev.com/eacc100de55e5b286aa8548b22c99c815cd69486/third_party/WebKit/Source/core/dom/ModulePendingScript.h

Project Member Comment 48 by bugdroid1@chromium.org, Apr 14 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56f27b65967e0722581b511fcd03f61d25b991c5

commit 56f27b65967e0722581b511fcd03f61d25b991c5
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 14 19:02:44 2017

Revert of Split PendingScript into PendingScript and ClassicPendingScript (patchset #37 id:720001 of https://codereview.chromium.org/2653923008/ )

Reason for revert:
Suspected to cause CHECK() failure (crbug.com/711703)
inside PendingScript's prefinalizer.

BUG=711703

Original issue's description:
> Split PendingScript into PendingScript and ClassicPendingScript
>
> This is preparation for introducing ModulePendingScript.
>
> BUG=594639, 686281
>
> Review-Url: https://codereview.chromium.org/2653923008
> Cr-Commit-Position: refs/heads/master@{#464494}
> Committed: https://chromium.googlesource.com/chromium/src/+/d512803299c01324b92ffd8c962da97e3bc8ccff

TBR=kouhei@chromium.org,sigbjornf@opera.com,japhet@chromium.org,haraken@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2820753002
Cr-Commit-Position: refs/heads/master@{#464768}

[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/core/dom/BUILD.gn
[delete] https://crrev.com/30e1e88c37b843bde2d1623b46a772f0c99b865d/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
[delete] https://crrev.com/30e1e88c37b843bde2d1623b46a772f0c99b865d/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/core/dom/PendingScript.cpp
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/core/dom/PendingScript.h
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/56f27b65967e0722581b511fcd03f61d25b991c5/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp

Project Member Comment 49 by bugdroid1@chromium.org, Apr 14 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/755670d02cf3c0bfbfdedcaaf7a34d67accaea93

commit 755670d02cf3c0bfbfdedcaaf7a34d67accaea93
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 14 23:36:46 2017

Make ModuleScript to have a reference to Modulator explicitly

This is to ensure the Modulator supplied when ModuleScript is created is also
used throughout its lifetime, especially when it is executed in
https://codereview.chromium.org/2819733002.

BUG=594639

Review-Url: https://codereview.chromium.org/2823483002
Cr-Commit-Position: refs/heads/master@{#464827}

[modify] https://crrev.com/755670d02cf3c0bfbfdedcaaf7a34d67accaea93/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
[modify] https://crrev.com/755670d02cf3c0bfbfdedcaaf7a34d67accaea93/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/755670d02cf3c0bfbfdedcaaf7a34d67accaea93/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/755670d02cf3c0bfbfdedcaaf7a34d67accaea93/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
[modify] https://crrev.com/755670d02cf3c0bfbfdedcaaf7a34d67accaea93/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp

Blocking: 711706
Blockedon: -711706
Blocking: 627945
Project Member Comment 53 by bugdroid1@chromium.org, Apr 17 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/782c68372ded66d885ebd848bace62d639998dfc

commit 782c68372ded66d885ebd848bace62d639998dfc
Author: kouhei <kouhei@chromium.org>
Date: Mon Apr 17 09:12:12 2017

[ES6 modules] Minor fixes to v8::ScriptModule

ScriptModule::Evaluate
- Make it a const method.
- Clarify a TODO that we don't currently have a codepath which use result of EvaluateModule.
-- Spec "run a module script" Step 7 currently only cares about exceptions thrown, and not about return value from successful completion.
-- https://html.spec.whatwg.org/multipage/webappapis.html#run-a-module-script

ScriptModule::Instantiate
- Call v8::TryCatch::SetVerbose(true), so that the instantiation errors will be reported to devtools console.

BUG=594639

Review-Url: https://codereview.chromium.org/2821903002
Cr-Commit-Position: refs/heads/master@{#464911}

[modify] https://crrev.com/782c68372ded66d885ebd848bace62d639998dfc/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/782c68372ded66d885ebd848bace62d639998dfc/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h

Project Member Comment 54 by bugdroid1@chromium.org, Apr 17 2017
Labels: merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/55e77d0d013c4aebd367ff67b61a113518141985

commit 55e77d0d013c4aebd367ff67b61a113518141985
Author: Hiroshige Hayashizaki <hiroshige@chromium.org>
Date: Mon Apr 17 17:41:13 2017

Revert of Introduce ModulePendingScript (patchset #6 id:100001 of https://codereview.chromium.org/2815453006/ )

Reason for revert:
Reason for revert:
https://codereview.chromium.org/2653923008/ is
suspected to cause CHECK() failure (crbug.com/711703)
inside PendingScript's prefinalizer.

BUG=711703

Original issue's description:
> Introduce ModulePendingScript
>
> BUG=594639
>
> Review-Url: https://codereview.chromium.org/2815453006
> Cr-Commit-Position: refs/heads/master@{#464627}
> Committed: https://chromium.googlesource.com/chromium/src/+/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5

TBR=kouhei@chromium.org,yhirano@chromium.org,sigbjornf@opera.com,japhet@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=594639

Review-Url: https://codereview.chromium.org/2816043005
Cr-Commit-Position: refs/heads/master@{#464765}
(cherry picked from commit 80f482b929e1a00817069b15e78cc4473eb50c6f)

Review-Url: https://codereview.chromium.org/2825523002 .
Cr-Commit-Position: refs/branch-heads/3071@{#16}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/55e77d0d013c4aebd367ff67b61a113518141985/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/55e77d0d013c4aebd367ff67b61a113518141985/third_party/WebKit/Source/core/dom/Modulator.h
[delete] https://crrev.com/6b1870ab94d85b95c9cf370e46aed8cc96e4dac6/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[delete] https://crrev.com/6b1870ab94d85b95c9cf370e46aed8cc96e4dac6/third_party/WebKit/Source/core/dom/ModulePendingScript.h

Project Member Comment 55 by bugdroid1@chromium.org, Apr 17 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f41274df3c287d68031e1453c9aeff846c6d4449

commit f41274df3c287d68031e1453c9aeff846c6d4449
Author: Hiroshige Hayashizaki <hiroshige@chromium.org>
Date: Mon Apr 17 17:45:05 2017

Revert of Split PendingScript into PendingScript and ClassicPendingScript (patchset #37 id:720001 of https://codereview.chromium.org/2653923008/ )

Reason for revert:
Suspected to cause CHECK() failure (crbug.com/711703)
inside PendingScript's prefinalizer.

BUG=711703

Original issue's description:
> Split PendingScript into PendingScript and ClassicPendingScript
>
> This is preparation for introducing ModulePendingScript.
>
> BUG=594639, 686281
>
> Review-Url: https://codereview.chromium.org/2653923008
> Cr-Commit-Position: refs/heads/master@{#464494}
> Committed: https://chromium.googlesource.com/chromium/src/+/d512803299c01324b92ffd8c962da97e3bc8ccff

TBR=kouhei@chromium.org,sigbjornf@opera.com,japhet@chromium.org,haraken@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2820753002
Cr-Commit-Position: refs/heads/master@{#464768}
(cherry picked from commit 56f27b65967e0722581b511fcd03f61d25b991c5)

Review-Url: https://codereview.chromium.org/2827473002 .
Cr-Commit-Position: refs/branch-heads/3071@{#18}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/core/dom/BUILD.gn
[delete] https://crrev.com/4ef50c3d0a9efe019b290cb28844e1506c3da623/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
[delete] https://crrev.com/4ef50c3d0a9efe019b290cb28844e1506c3da623/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/core/dom/PendingScript.cpp
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/core/dom/PendingScript.h
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/f41274df3c287d68031e1453c9aeff846c6d4449/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp

Project Member Comment 56 by bugdroid1@chromium.org, Apr 17 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4e89ee1bd9be30cc5566fa434004a763d0610c82

commit 4e89ee1bd9be30cc5566fa434004a763d0610c82
Author: hiroshige <hiroshige@chromium.org>
Date: Mon Apr 17 19:38:29 2017

Remove Modulator::ExecuteModule() temporarily

This is just to reduce dependencies between draft CLs.
ExecuteModule() will be re-introduced by
https://codereview.chromium.org/2819733002 where it is actually implemented
and used.

This doesn't change the behavior because ExecuteModule() is not used.

BUG=594639

Review-Url: https://codereview.chromium.org/2814383004
Cr-Commit-Position: refs/heads/master@{#464983}

[modify] https://crrev.com/4e89ee1bd9be30cc5566fa434004a763d0610c82/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/4e89ee1bd9be30cc5566fa434004a763d0610c82/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/4e89ee1bd9be30cc5566fa434004a763d0610c82/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 57 by bugdroid1@chromium.org, Apr 19 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/08697f894248cda25e67bd5c82565ffbc33f21fa

commit 08697f894248cda25e67bd5c82565ffbc33f21fa
Author: hiroshige <hiroshige@chromium.org>
Date: Wed Apr 19 00:40:27 2017

Introduce ScriptLoader::script_type_

This CL introduces the logic for determining the script type to ScriptLoader.
script_type_ will be used by subsequent CLs.

This CL also makes Step 6 of ScriptLoader::PrepareScript()
(IsValidScriptTypeAndLanguage()) to correspond directly to the spec.

This CL doesn't change the behavior.

BUG=594639, 686281

Review-Url: https://codereview.chromium.org/2821803002
Cr-Commit-Position: refs/heads/master@{#465443}

[modify] https://crrev.com/08697f894248cda25e67bd5c82565ffbc33f21fa/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/08697f894248cda25e67bd5c82565ffbc33f21fa/third_party/WebKit/Source/core/dom/ScriptLoader.h
[modify] https://crrev.com/08697f894248cda25e67bd5c82565ffbc33f21fa/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
[modify] https://crrev.com/08697f894248cda25e67bd5c82565ffbc33f21fa/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp

Project Member Comment 58 by bugdroid1@chromium.org, Apr 19 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/521525f8507b6525eceed9724bd9a5f66f078eda

commit 521525f8507b6525eceed9724bd9a5f66f078eda
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 19 05:57:14 2017

[ES6 modules] Introduce ModulatorImpl

This CL introduces ModulatorImpl, which is an implementation of
"settings object" spec concept + serves as a backplane for tieing
all ES6 module algorithm components together.

See below diagram for where it stands in the stack:
https://docs.google.com/document/d/1vjiWxwhg9D0GNNOYgw3AxMG0iKOC9I3jlID4GTgZsac/edit#heading=h.47x0qrpzjbj4

BUG=594639

Review-Url: https://codereview.chromium.org/2826803004
Cr-Commit-Position: refs/heads/master@{#465506}

[modify] https://crrev.com/521525f8507b6525eceed9724bd9a5f66f078eda/third_party/WebKit/Source/core/dom/BUILD.gn
[modify] https://crrev.com/521525f8507b6525eceed9724bd9a5f66f078eda/third_party/WebKit/Source/core/dom/Modulator.cpp
[add] https://crrev.com/521525f8507b6525eceed9724bd9a5f66f078eda/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[add] https://crrev.com/521525f8507b6525eceed9724bd9a5f66f078eda/third_party/WebKit/Source/core/dom/ModulatorImpl.h

Project Member Comment 59 by bugdroid1@chromium.org, Apr 19 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdc9faa632a864db68e54dc2aa9a385b8916a8e6

commit bdc9faa632a864db68e54dc2aa9a385b8916a8e6
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 19 08:00:02 2017

[ES6 modules] Introduce ModuleTreeLinker

This CL introduces ModuleTreeLinker, which implements
"internal module script graph fetching procedure":
https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure

See below diagram for where it stands in the stack:
https://docs.google.com/document/d/1vjiWxwhg9D0GNNOYgw3AxMG0iKOC9I3jlID4GTgZsac/edit#heading=h.47x0qrpzjbj4

BUG=594639

Review-Url: https://codereview.chromium.org/2823803003
Cr-Commit-Position: refs/heads/master@{#465524}

[modify] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/loader/BUILD.gn
[add] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[add] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
[add] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp
[add] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h
[add] https://crrev.com/bdc9faa632a864db68e54dc2aa9a385b8916a8e6/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp

Project Member Comment 60 by bugdroid1@chromium.org, Apr 19 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b985210b2afe0d77382b6cf818aaee56968b0e6f

commit b985210b2afe0d77382b6cf818aaee56968b0e6f
Author: kouhei <kouhei@chromium.org>
Date: Wed Apr 19 23:03:28 2017

[ES6 modules] Integrate ModuleTreeLinkerRegistry into ModulatorImpl back-plane

This CL plumbs ModulatorImpl::FetchTreeInternal() to its algorithm implementation
ModuleTreeLinker{,Registry}.

BUG=594639

Review-Url: https://codereview.chromium.org/2826903002
Cr-Commit-Position: refs/heads/master@{#465799}

[modify] https://crrev.com/b985210b2afe0d77382b6cf818aaee56968b0e6f/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/b985210b2afe0d77382b6cf818aaee56968b0e6f/third_party/WebKit/Source/core/dom/ModulatorImpl.h

Project Member Comment 61 by bugdroid1@chromium.org, Apr 24 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3df03ef75837bd7664e17fa0daab5ea2f0bef0da

commit 3df03ef75837bd7664e17fa0daab5ea2f0bef0da
Author: kouhei <kouhei@chromium.org>
Date: Mon Apr 24 02:50:27 2017

[ES6 modules] Cosmetic changes to ModuleTreeLinker

- Minor comment fixes to ModuleTreeLinker.
- Use Vector instead of HashSet for "#fetch-the-descendants-of-a-module-script"

This CL addresses review comments in
https://codereview.chromium.org/2823803003/

BUG=594639

Review-Url: https://codereview.chromium.org/2826423002
Cr-Commit-Position: refs/heads/master@{#466581}

[modify] https://crrev.com/3df03ef75837bd7664e17fa0daab5ea2f0bef0da/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/3df03ef75837bd7664e17fa0daab5ea2f0bef0da/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
[modify] https://crrev.com/3df03ef75837bd7664e17fa0daab5ea2f0bef0da/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp

Blockedon: 714521
Project Member Comment 63 by bugdroid1@chromium.org, Apr 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/702de0adbf42af51c93feabf9c46cdad25dc7862

commit 702de0adbf42af51c93feabf9c46cdad25dc7862
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 25 05:26:17 2017

[ES6 modules] Introduce ModuleScript::CreateInstantiationError

This CL introduces ModuleScript::CreateInstantiationError member func,
which serves as a getter for instantiation_error_.

This is split from hiroshige@'s CL: https://codereview.chromium.org/2819733002/

AUTHOR=hiroshige@chromium.org
BUG=594639

Review-Url: https://codereview.chromium.org/2838043002
Cr-Commit-Position: refs/heads/master@{#466887}

[modify] https://crrev.com/702de0adbf42af51c93feabf9c46cdad25dc7862/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 64 by bugdroid1@chromium.org, Apr 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac

commit 77c5ade43bf1d07f035d143ee6f3449d92b5d6ac
Author: hiroshige <hiroshige@chromium.org>
Date: Tue Apr 25 06:29:34 2017

Reland of Split PendingScript into PendingScript and ClassicPendingScript

This is preparation for introducing ModulePendingScript.

This CL shouldn't change the behavior.

This has been reverted due to crashing (Issue 711703) because
ResourceOwner's prefinalizer is called before PendingScript's prefinalizer,
causing CheckState() assertion failure.
This reland fixes this issue by registering PendingScript::Dispose() also
as the prefinalizer of ClassicPendingScript, which is called before
ResourceOwner's prefinalizer.

A unit test for the crash will be added by
https://codereview.chromium.org/2828973002/.

BUG=594639, 686281, 711703

Review-Url: https://codereview.chromium.org/2653923008
Cr-Original-Commit-Position: refs/heads/master@{#464494}
Committed: https://chromium.googlesource.com/chromium/src/+/d512803299c01324b92ffd8c962da97e3bc8ccff
Review-Url: https://codereview.chromium.org/2653923008
Cr-Commit-Position: refs/heads/master@{#466899}

[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.h
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
[add] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/dom/ClassicPendingScript.h
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/dom/PendingScript.cpp
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/dom/PendingScript.h
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/77c5ade43bf1d07f035d143ee6f3449d92b5d6ac/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp

Project Member Comment 65 by bugdroid1@chromium.org, Apr 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/11d59e51532e90c9178e541f5605f12846a4ebc5

commit 11d59e51532e90c9178e541f5605f12846a4ebc5
Author: hiroshige <hiroshige@chromium.org>
Date: Tue Apr 25 07:03:25 2017

Reland of Introduce ModulePendingScript (patchset #1 id:1 of https://codereview.chromium.org/2816043005/ )

This CL doesn't change the behavior, because ModulePendingScript is not
used at this time.

Reason for revert:
Issue 711703 is fixed on
https://codereview.chromium.org/2653923008/.

Original issue's description:
> Revert of Introduce ModulePendingScript (patchset #6 id:100001 of https://codereview.chromium.org/2815453006/ )
>
> Reason for revert:
> Reason for revert:
> https://codereview.chromium.org/2653923008/ is
> suspected to cause CHECK() failure (crbug.com/711703)
> inside PendingScript's prefinalizer.
>
> BUG=711703
>
> Original issue's description:
> > Introduce ModulePendingScript
> >
> > BUG=594639
> >
> > Review-Url: https://codereview.chromium.org/2815453006
> > Cr-Commit-Position: refs/heads/master@{#464627}
> > Committed: https://chromium.googlesource.com/chromium/src/+/2e5a5b8efccf655f183cc7ce0c59a88f77bb50f5
>
> TBR=kouhei@chromium.org,yhirano@chromium.org,sigbjornf@opera.com,japhet@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=594639
>
> Review-Url: https://codereview.chromium.org/2816043005
> Cr-Commit-Position: refs/heads/master@{#464765}
> Committed: https://chromium.googlesource.com/chromium/src/+/80f482b929e1a00817069b15e78cc4473eb50c6f

TBR=kouhei@chromium.org,yhirano@chromium.org,sigbjornf@opera.com,japhet@chromium.org
BUG=594639, 711703

Review-Url: https://codereview.chromium.org/2820703003
Cr-Commit-Position: refs/heads/master@{#466909}

[modify] https://crrev.com/11d59e51532e90c9178e541f5605f12846a4ebc5/third_party/WebKit/Source/core/dom/BUILD.gn
[add] https://crrev.com/11d59e51532e90c9178e541f5605f12846a4ebc5/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[add] https://crrev.com/11d59e51532e90c9178e541f5605f12846a4ebc5/third_party/WebKit/Source/core/dom/ModulePendingScript.h

Project Member Comment 66 by bugdroid1@chromium.org, Apr 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/060877e899403501fab7d6cf1ee6c380f54c71fe

commit 060877e899403501fab7d6cf1ee6c380f54c71fe
Author: kouhei <kouhei@chromium.org>
Date: Tue Apr 25 20:35:58 2017

[ES6 modules] Unit test ScriptModule::Evaluate

This CL introduces ScriptModuleTest.Evaluate to test ScriptModule::Evaulate().

BUG=594639

Review-Url: https://codereview.chromium.org/2835133004
Cr-Commit-Position: refs/heads/master@{#467100}

[modify] https://crrev.com/060877e899403501fab7d6cf1ee6c380f54c71fe/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp

Blockedon: 715309
Blockedon: 715369
Blockedon: 715376
Project Member Comment 70 by bugdroid1@chromium.org, Apr 26 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/47926b6e51657d2dc6d10899f00357e06825956a

commit 47926b6e51657d2dc6d10899f00357e06825956a
Author: hiroshige <hiroshige@chromium.org>
Date: Wed Apr 26 23:29:19 2017

Implement ModuleScript::RunScript()

This makes Modulator::ExecuteModule() to implement "run a module script"
https://html.spec.whatwg.org/#run-a-module-script, especially its Steps 1--5,
and calls it from ModuleScript::RunScript().

This CL doesn't change the behavior because ModuleScript::RunScript() is not
yet called from ScriptLoader.

BUG=594639

Review-Url: https://codereview.chromium.org/2819733002
Cr-Commit-Position: refs/heads/master@{#467506}

[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/47926b6e51657d2dc6d10899f00357e06825956a/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 71 by bugdroid1@chromium.org, Apr 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7da9cf91983855bf2e5861dbe33d50fc9aca9df0

commit 7da9cf91983855bf2e5861dbe33d50fc9aca9df0
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 28 03:16:01 2017

Enable module scripts in ScriptLoader

This enables module scripts in Blink behind a flag.

This CL implements module-script-related steps of "prepare a script"
in ScriptLoader and thus makes the module implementation code paths that
are committed previously to be executed, if the runtime flag is enabled.

This CL also reorganizes the test expectations for module-related tests.

BUG=594639

Review-Url: https://codereview.chromium.org/2781713003
Cr-Commit-Position: refs/heads/master@{#467866}

[modify] https://crrev.com/7da9cf91983855bf2e5861dbe33d50fc9aca9df0/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/f7b4872ff079f43bcb448dcf32d38d1901b952c6/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/execorder-expected.txt
[delete] https://crrev.com/f7b4872ff079f43bcb448dcf32d38d1901b952c6/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/imports-expected.txt
[delete] https://crrev.com/f7b4872ff079f43bcb448dcf32d38d1901b952c6/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/nomodule-set-on-external-module-script-expected.txt
[delete] https://crrev.com/f7b4872ff079f43bcb448dcf32d38d1901b952c6/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/nomodule-set-on-inline-module-script-expected.txt
[modify] https://crrev.com/7da9cf91983855bf2e5861dbe33d50fc9aca9df0/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/7da9cf91983855bf2e5861dbe33d50fc9aca9df0/third_party/WebKit/Source/core/dom/ScriptLoader.h
[modify] https://crrev.com/7da9cf91983855bf2e5861dbe33d50fc9aca9df0/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
[modify] https://crrev.com/7da9cf91983855bf2e5861dbe33d50fc9aca9df0/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp

Project Member Comment 72 by bugdroid1@chromium.org, Apr 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/498b00e062fb73064e19187b6b174f0d6ff62968

commit 498b00e062fb73064e19187b6b174f0d6ff62968
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 28 03:34:33 2017

Move "create a module script" from ModuleScriptLoader to ModuleScript

Because it will be used from outside ModuleScriptLoader when we support
inline scripts.

This CL
- Renames existing ModuleScript::Create() (which is a simple wrapper of
  the constructor) to CreateForTest(),
- Moves ModuleScriptLoader::CreateModuleScript() to new
  ModuleScript::Create(), and
- Reorders the parameters to match with the spec.

BUG=594639, 715369

Review-Url: https://codereview.chromium.org/2845743003
Cr-Commit-Position: refs/heads/master@{#467873}

[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp
[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h
[modify] https://crrev.com/498b00e062fb73064e19187b6b174f0d6ff62968/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp

Project Member Comment 73 by bugdroid1@chromium.org, Apr 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/321b6ea1a1e2f392c629e2f074ae509a3aaefc42

commit 321b6ea1a1e2f392c629e2f074ae509a3aaefc42
Author: kouhei <kouhei@chromium.org>
Date: Fri Apr 28 03:57:48 2017

[ES6 modules] Return previous error when an instantiation is reattempt.

Before this CL, when instantiation was reattempt for previously errored module,
ModuleTreeLinker::Instantiate() crashed.

This CL updates the code to follow whatwg/html update:
https://github.com/whatwg/html/pull/2559
so that we rethrow previous error when instantiation is reattempt.
TEST=webkit_unit_test --gtest_filter=ModuleTreeLinkerTest.FetchTreePreviousInstantiationFailure
BUG=594639,714521

Review-Url: https://codereview.chromium.org/2839563002
Cr-Commit-Position: refs/heads/master@{#467882}

[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/321b6ea1a1e2f392c629e2f074ae509a3aaefc42/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 74 by bugdroid1@chromium.org, Apr 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d97cc73459881aeedfb39ed40ff5e0f9aefea9aa

commit d97cc73459881aeedfb39ed40ff5e0f9aefea9aa
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 28 05:16:51 2017

Introduce ModuleScript::CreateInternal()

This is preparation for https://codereview.chromium.org/2850673002
to create a place to insert RegisterModuleScript() both for
Create() and CreateForTest().

This doesn't change the behavior.

BUG=594639, 715369

Review-Url: https://codereview.chromium.org/2844413003
Cr-Commit-Position: refs/heads/master@{#467891}

[modify] https://crrev.com/d97cc73459881aeedfb39ed40ff5e0f9aefea9aa/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/d97cc73459881aeedfb39ed40ff5e0f9aefea9aa/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 75 by bugdroid1@chromium.org, Apr 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fca892fe54b316243806c3b1cfc6cad5e23ae098

commit fca892fe54b316243806c3b1cfc6cad5e23ae098
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 28 05:42:01 2017

Move a RegisterModuleScript() call to ModuleScript::CreateInternal()

To align with the spec, and also this is needed for inline module
scripts because NotifyNewSingleModuleFinished() is not called for
inline scripts.

This CL also makes DummyModulator to ignore RegisterModuleScript()
calls where it is not tested explcitly, because this CL makes
an additional RegisterModuleScript() call for CreateForTest() which is
not coupled with NotifyNewSingleModuleFinished().

This CL doesn't change the non-test behavior, because in the non-test
code ModuleScript::Create() is always coupled with
NotifyNewSingleModuleFinished() and thus this CL just makes
RegisterModuleScript() a little earlier.

BUG=594639, 715369

Review-Url: https://codereview.chromium.org/2850673002
Cr-Commit-Position: refs/heads/master@{#467907}

[modify] https://crrev.com/fca892fe54b316243806c3b1cfc6cad5e23ae098/third_party/WebKit/Source/core/dom/ModuleMap.cpp
[modify] https://crrev.com/fca892fe54b316243806c3b1cfc6cad5e23ae098/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/fca892fe54b316243806c3b1cfc6cad5e23ae098/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/fca892fe54b316243806c3b1cfc6cad5e23ae098/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 76 by bugdroid1@chromium.org, Apr 28 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/489fa402ff6ec3e74127929820b622407e979bb5

commit 489fa402ff6ec3e74127929820b622407e979bb5
Author: hiroshige <hiroshige@chromium.org>
Date: Fri Apr 28 19:18:29 2017

Support Inline module script

This CL
- Enables inline module scripts in ScriptLoader.
- Adds ModuleTreeLinker::FetchDescendantsForInlineScript() and
  related plumbing to ModuleTreeLinkerRegistry and Modulator.
  This is not yet spec'ed and we might need revisit once the spec is
  updated. https://github.com/whatwg/html/issues/2544
- Makes ModuleScript to store its |source_text| for CSP of inline scripts.

BUG=715369, 594639

Review-Url: https://codereview.chromium.org/2842923002
Cr-Commit-Position: refs/heads/master@{#468087}

[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/489fa402ff6ec3e74127929820b622407e979bb5/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 77 by bugdroid1@chromium.org, May 1 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/40a4cdf946305d99ce988d67b17602454b01c1a3

commit 40a4cdf946305d99ce988d67b17602454b01c1a3
Author: kouhei <kouhei@chromium.org>
Date: Mon May 01 03:38:09 2017

[ES6 modules] Rethrow instantiation error when attempt to resolve instantiation failed module.

This CL resolves TODO(kouhei) in ScriptModuleResolverImpl to rethrow instantiation error when
resolved module has failed to instantiate.

TEST=ScriptModuleResolverImplTest.ResolveInstantiationFailedModule
BUG=594639

Review-Url: https://codereview.chromium.org/2837253002
Cr-Commit-Position: refs/heads/master@{#468275}

[modify] https://crrev.com/40a4cdf946305d99ce988d67b17602454b01c1a3/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/40a4cdf946305d99ce988d67b17602454b01c1a3/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
[modify] https://crrev.com/40a4cdf946305d99ce988d67b17602454b01c1a3/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp

Comment 78 by neis@chromium.org, May 1 2017
Blockedon: 716951
Project Member Comment 79 by bugdroid1@chromium.org, May 1 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/29950db433027277a61c43d8e161a8b36f5ea0d2

commit 29950db433027277a61c43d8e161a8b36f5ea0d2
Author: kouhei <kouhei@chromium.org>
Date: Mon May 01 20:41:03 2017

[ES6 modules] Enable moduleScripts under experimental-web-platform-features

BUG=594639

Review-Url: https://codereview.chromium.org/2848193002
Cr-Commit-Position: refs/heads/master@{#468401}

[modify] https://crrev.com/29950db433027277a61c43d8e161a8b36f5ea0d2/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5

Project Member Comment 80 by bugdroid1@chromium.org, May 2 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d087434ab42e298587480260ee4cafbfd002e614

commit d087434ab42e298587480260ee4cafbfd002e614
Author: kouhei <kouhei@chromium.org>
Date: Tue May 02 04:15:45 2017

[ES6 modules] ModuleTreeLinker::FetchDescendants should not assume urls isn't empty.

Before this CL, we assumed "urls" in ModuleTreeLinker::FetchDescendants() to be non-empty
if record.[[RequestedModules]] is not empty.

However, this isn't always the case, as the resolved url may be in the ancestor list.
This CL removes the DCHECK based on this assumption, and complete the algorithm in that case.

TEST=ModuleTreeLinkerTest.FetchDependencyOfCyclicGraph
BUG=594639

Review-Url: https://codereview.chromium.org/2852963002
Cr-Commit-Position: refs/heads/master@{#468554}

[modify] https://crrev.com/d087434ab42e298587480260ee4cafbfd002e614/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/d087434ab42e298587480260ee4cafbfd002e614/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp

Project Member Comment 81 by bugdroid1@chromium.org, May 2 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f6ff4cd290401c5720e534e52f7ed04544b06e58

commit f6ff4cd290401c5720e534e52f7ed04544b06e58
Author: kouhei <kouhei@chromium.org>
Date: Tue May 02 04:21:57 2017

[ES6 modules] Fix bad assert in HostResolveImportedModule

Before this CL, ScriptModuleResolverImpl::Resolve wrongly assumed that
resolved module script's instantiation state is always "instantiated".
However, this isn't always the case when instantiating module graph w/
cycles.

This CL removes the CHECK.

Corresponding spec PR: https://github.com/whatwg/html/pull/2603

BUG=594639, https://github.com/whatwg/html/issues/2596
TEST=external/wpt/html/semantics/scripting-1/the-script-element/module/imports.html shouldn't crash

Review-Url: https://codereview.chromium.org/2848213002
Cr-Commit-Position: refs/heads/master@{#468555}

[modify] https://crrev.com/f6ff4cd290401c5720e534e52f7ed04544b06e58/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/f6ff4cd290401c5720e534e52f7ed04544b06e58/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp

Not working for pages served as application/xhtml+xml
Blockedon: 717525
Blockedon: 717643
shouldn't chrome-extension: and file: pages be supported too?

on chrome-extension: pages, the module script is fetched (successfully? no errors in the console) but nothing happens

on file: pages, the module script only logs a CORS error in the console: "Invalid response. Origin 'null' is therefore not allowed access."

i attached a sample extension, you can install it and open the options page, or just open the page.html from a file: url

file: has always worked before for testing things locally, and i think chrome extension development would benefit greatly from being able to use modules
ext.zip
780 bytes Download
> #c82
Yes. Modules are currently disabled on XHTML documents due to different script run semantics: https://html.spec.whatwg.org/multipage/xhtml.html#parsing-xhtml-documents
Would you file a separate crbug for this?

> #c85
This is expected as <script type=module> requires strict MIME type checking per spec.
Please see note in https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script step 7.

However, I agree that unable to use file urls are a bit cumbersome, so we'd like to consider relaxing the constraint.
I filed issue 717643 to track XHTML support
Blockedon: 718114
Project Member Comment 89 by bugdroid1@chromium.org, May 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/880198880c77eff69100e7ec9e8f75518257397d

commit 880198880c77eff69100e7ec9e8f75518257397d
Author: kouhei <kouhei@chromium.org>
Date: Thu May 04 03:38:20 2017

[ES6 modules] mark instantiation-error-1.html as pass

They are passing now:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=instantiation-error-1.html&showExpectations=true

BUG=594639
TBR=module-dev@chromium.org

Review-Url: https://codereview.chromium.org/2858123003
Cr-Commit-Position: refs/heads/master@{#469263}

[modify] https://crrev.com/880198880c77eff69100e7ec9e8f75518257397d/third_party/WebKit/LayoutTests/TestExpectations

Comment 90 by neis@chromium.org, May 4 2017
Blockedon: 716935
Comment 91 by neis@chromium.org, May 4 2017
Blockedon: 718436
Comment 92 by neis@chromium.org, May 4 2017
Blockedon: 718442
Project Member Comment 93 by bugdroid1@chromium.org, May 4 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/78cbcd5cd4e8022b18067c522e66f2fa1d02ba8b

commit 78cbcd5cd4e8022b18067c522e66f2fa1d02ba8b
Author: hiroshige <hiroshige@chromium.org>
Date: Thu May 04 23:31:36 2017

Fix case issues in a wpt test module/execorder.html

The actual filenames are all lowercase, but src attributes in
execorder.html contains uppercase letters. This causes the scripts not
found and thus timeouts on Linux (which runs on a case-sensitive
filesystem).

This CL fixes the timeout by making the src attributes all lowercased.

BUG=594639

Review-Url: https://codereview.chromium.org/2856053005
Cr-Commit-Position: refs/heads/master@{#469519}

[modify] https://crrev.com/78cbcd5cd4e8022b18067c522e66f2fa1d02ba8b/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/78cbcd5cd4e8022b18067c522e66f2fa1d02ba8b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/execorder.html

Comment 94 by neis@chromium.org, May 9 2017
Blockedon: 717670
Comment 95 by adamk@chromium.org, May 10 2017
Blockedon: 721070
Components: Blink>HTML>Script
Components: -Blink>HTML>Modules
Blockedon: 721554
Comment 99 by neis@chromium.org, May 12 2017
Blockedon: 721560
Blockedon: 721801
Blockedon: 721914
Project Member Comment 102 by bugdroid1@chromium.org, May 15 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5835e0c757d511a695ec05a99881b73b0e4bcf2e

commit 5835e0c757d511a695ec05a99881b73b0e4bcf2e
Author: hiroshige <hiroshige@chromium.org>
Date: Mon May 15 18:07:31 2017

Fix module scripts with for/event attributes

This CL ignores for/event attributes of module scripts as the spec says.

BUG=594639

Review-Url: https://codereview.chromium.org/2877223002
Cr-Commit-Position: refs/heads/master@{#471826}

[add] https://crrev.com/5835e0c757d511a695ec05a99881b73b0e4bcf2e/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/script-for-event.html
[modify] https://crrev.com/5835e0c757d511a695ec05a99881b73b0e4bcf2e/third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Project Member Comment 103 by bugdroid1@chromium.org, May 16 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f92cfbdedaecb97e8a87773deb32f98c6997351

commit 1f92cfbdedaecb97e8a87773deb32f98c6997351
Author: kouhei <kouhei@chromium.org>
Date: Tue May 16 19:41:50 2017

[ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching"

Before this CL, we asserted that ModuleMap::GetFetchedModuleScript always queried load completed module scripts, but it was not always the case.
This CL changes the member function to return nullptr if the entry doesn't exist or the entry is being fetched.

This CL fixes a crash that happens when we early-exit module script graph fetch by a sub-graph instantiation failed, but there are still partial subgraph in flight.

BUG=718442,594639

Review-Url: https://codereview.chromium.org/2860993002
Cr-Commit-Position: refs/heads/master@{#472192}

[add] https://crrev.com/1f92cfbdedaecb97e8a87773deb32f98c6997351/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html
[add] https://crrev.com/1f92cfbdedaecb97e8a87773deb32f98c6997351/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py
[modify] https://crrev.com/1f92cfbdedaecb97e8a87773deb32f98c6997351/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/1f92cfbdedaecb97e8a87773deb32f98c6997351/third_party/WebKit/Source/core/dom/ModuleMap.cpp
[modify] https://crrev.com/1f92cfbdedaecb97e8a87773deb32f98c6997351/third_party/WebKit/Source/core/dom/ModuleMap.h

Project Member Comment 104 by bugdroid1@chromium.org, May 16 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40

commit 87dc11bdb4e1cf4ba674f3907fa1127f8839ad40
Author: kouhei <kouhei@chromium.org>
Date: Tue May 16 23:28:20 2017

[ES6 modules] ModuleTreeLinker::Instantiate shouldn't proceed on invalid context

Before this CL, ModuleTreeLinker::Instantiate assumed that it is only called for
modulator with a valid context. However, asynchronous module graph node load
completion may be triggered after the context was destroyed.

This CL fixes the issue by making ModuleTreeLinker::Instantiate fail without crashing
if the context is invalid.

BUG=594639,716935

Review-Url: https://codereview.chromium.org/2886593002
Cr-Commit-Position: refs/heads/master@{#472246}

[add] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/LayoutTests/http/tests/dom/script-module-load-incomplete-no-crash-expected.txt
[add] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/LayoutTests/http/tests/dom/script-module-load-incomplete-no-crash.html
[modify] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/87dc11bdb4e1cf4ba674f3907fa1127f8839ad40/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 105 by bugdroid1@chromium.org, May 17 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd83809aa9c5069baa191633e9be405e7cbb498c

commit bd83809aa9c5069baa191633e9be405e7cbb498c
Author: kolos <kolos@chromium.org>
Date: Wed May 17 09:48:21 2017

Revert of [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching" (patchset #5 id:80001 of https://codereview.chromium.org/2860993002/ )

Reason for revert:
This CL probably causes test failures
 external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html

The first failed build:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Trusty%20Leak/builds/4742

Original issue's description:
> [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching"
>
> Before this CL, we asserted that ModuleMap::GetFetchedModuleScript always queried load completed module scripts, but it was not always the case.
> This CL changes the member function to return nullptr if the entry doesn't exist or the entry is being fetched.
>
> This CL fixes a crash that happens when we early-exit module script graph fetch by a sub-graph instantiation failed, but there are still partial subgraph in flight.
>
> BUG=718442,594639
>
> Review-Url: https://codereview.chromium.org/2860993002
> Cr-Commit-Position: refs/heads/master@{#472192}
> Committed: https://chromium.googlesource.com/chromium/src/+/1f92cfbdedaecb97e8a87773deb32f98c6997351

TBR=domenic@chromium.org,module-dev@chromium.org,neis@chromium.org,hiroshige@chromium.org,kouhei@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=718442,594639

Review-Url: https://codereview.chromium.org/2886123002
Cr-Commit-Position: refs/heads/master@{#472402}

[delete] https://crrev.com/04936c54ed2396ae54cd824e24f11151e0e11948/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html
[delete] https://crrev.com/04936c54ed2396ae54cd824e24f11151e0e11948/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py
[modify] https://crrev.com/bd83809aa9c5069baa191633e9be405e7cbb498c/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/bd83809aa9c5069baa191633e9be405e7cbb498c/third_party/WebKit/Source/core/dom/ModuleMap.cpp
[modify] https://crrev.com/bd83809aa9c5069baa191633e9be405e7cbb498c/third_party/WebKit/Source/core/dom/ModuleMap.h

Blockedon: 725816
Blocking: 726048
kouhei@, it looks like there is active development happening on this issue. Could you please update on the latest and what the plan is? As part of predictability program, we have an OKR to resolve or have a concrete plan for highest starred bugs, and this one is #10 on the list.
Thanks!

At high-level, we are close to shipping.

The remaining implementation work that we must fix before ship:
- P0: fixing stability issues
-- We have known memory leak and crash cases we would like to fix.
- P1: getting the security primitives right.
-- Known issue w/ CORS. Other primitives seems alright (CSP/SRI/...)

We want to land before ship if possible:
- P2: Optimizations to the tree fetching algorithm which will give us 4x-10x speed-up from local testing.
- P2: Dynamic imports

CL level / daily status are actively communicated through module-dev@chromium.org.
Project Member Comment 110 by bugdroid1@chromium.org, May 25 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7fa31ddf3b196d9873d615e7aabe4285fed4cef8

commit 7fa31ddf3b196d9873d615e7aabe4285fed4cef8
Author: kouhei <kouhei@chromium.org>
Date: Thu May 25 03:33:19 2017

[ES6 modules] Fix context leak. ModuleScript should use TraceWrapperV8Reference to hold onto v8::Module.

Before this CL, ModuleScript referenced v8::Module via SharedPersistent<> in ScriptModule.
This created cycle of v8::Context -> V8PerContextData -> Modulator -> ModuleMap -> ModuleScript -(persistent)-> v8::Module -> v8::Context.

This CL breaks the cycle (partially) by making ModuleScript use TraceWrapperV8Reference to reference v8::Module, and create ScriptModule on the fly.
More CLs will follow to break other parts of the cycle graph.

BUG=594639, 725816

Review-Url: https://codereview.chromium.org/2903813002
Cr-Commit-Position: refs/heads/master@{#474543}

[add] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/LayoutTests/fast/dom/script-module-with-export-leak-expected.txt
[add] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/LayoutTests/fast/dom/script-module-with-export-leak.html
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/7fa31ddf3b196d9873d615e7aabe4285fed4cef8/third_party/WebKit/Source/core/testing/DummyModulator.h

Cc: -rbyers@chromium.org
Labels: -Pri-2 M-61 Pri-1
Are all the blockers relevant and triaged (P1, M61, in someone's queue)?
Blockedon: -721070
Blockedon: -717643
Blocking: 715376
Blockedon: -715376
Blockedon: -721554
Blockedon: 727299
Project Member Comment 119 by bugdroid1@chromium.org, May 29 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5

commit 74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon May 29 13:08:43 2017

[ES6 modules] Detach ScriptModuleResolverImpl refs when detaching context.

Before this CL, we kept around strong v8::Module refs from
ScriptModuleResolverImpl after the context is detached.
v8::Module refers to the settings object Document via Modulator, so
lead to leaks detected by Blink Leak Detector.

This CL detaches the v8::Module strong refs from ScriptModuleResolverImpl
when we detach Document from the context.

This CL is meant to be a temporary fix. Ideally, we should convert
all v8::Module refs in ScriptModuleResolverImpl to weak refs.
However, it is not trivial as we need to rework ScriptModule.

Bug: 594639, 725816, 724818
Change-Id: If5b697bc87b9cd907333be0afe713888c1be2cf9
Reviewed-on: https://chromium-review.googlesource.com/517525
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475340}
[modify] https://crrev.com/74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5/third_party/WebKit/LayoutTests/LeakExpectations
[modify] https://crrev.com/74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
[modify] https://crrev.com/74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h
[modify] https://crrev.com/74ba772e23ab732e4d4f2c2c2bcd76fbff9c78d5/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp

Project Member Comment 120 by bugdroid1@chromium.org, May 30 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d683babf566ce2579091dcf266857312628abbb

commit 6d683babf566ce2579091dcf266857312628abbb
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Tue May 30 04:20:16 2017

Reland: [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching"

The memory leak in the layout test is now addressed.

---
[ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching"

Before this CL, we asserted that ModuleMap::GetFetchedModuleScript always queried load completed module scripts, but it was not always the case.
This CL changes the member function to return nullptr if the entry doesn't exist or the entry is being fetched.

This CL fixes a crash that happens when we early-exit module script graph fetch by a sub-graph instantiation failed, but there are still partial subgraph in flight.

Bug: 718442, 594639
Change-Id: Ia99883889bff4770dc03016413ed4c94c42f8902
Reviewed-on: https://chromium-review.googlesource.com/517684
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475420}
[add] https://crrev.com/6d683babf566ce2579091dcf266857312628abbb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html
[add] https://crrev.com/6d683babf566ce2579091dcf266857312628abbb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py
[modify] https://crrev.com/6d683babf566ce2579091dcf266857312628abbb/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/6d683babf566ce2579091dcf266857312628abbb/third_party/WebKit/Source/core/dom/ModuleMap.cpp
[modify] https://crrev.com/6d683babf566ce2579091dcf266857312628abbb/third_party/WebKit/Source/core/dom/ModuleMap.h

Blockedon: -725816
Project Member Comment 122 by bugdroid1@chromium.org, May 31 2017
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb

commit db5c38ed5ffceeb949a875a17b6c3e2048b4eabb
Author: neis <neis@chromium.org>
Date: Wed May 31 02:22:16 2017

[modules] Add several new WPT tests.

BUG=594639,723841

Review-Url: https://codereview.chromium.org/2845983002
Cr-Commit-Position: refs/heads/master@{#475745}

[modify] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/compilation-error-1.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/compilation-error-2.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/export-something-nested.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/export-something.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/fetch-error-1.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/fetch-error-2.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/fetch-error-2.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-something-namespace.js
[modify] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/late-namespace-request.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/late-star-export-request.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/missing-export-nested.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/missing-export.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/nested-missing-export.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/syntaxerror.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/this-nested.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/this.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/throw-nested.js
[add] https://crrev.com/db5c38ed5ffceeb949a875a17b6c3e2048b4eabb/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/throw.js

Project Member Comment 123 by bugdroid1@chromium.org, Jun 2
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52647ef2089ff4554a6245d2a8ed9dc8699a5f44

commit 52647ef2089ff4554a6245d2a8ed9dc8699a5f44
Author: adamk <adamk@chromium.org>
Date: Fri Jun 02 15:15:56 2017

Fix crossorigin script module test assertions

The module/crossorigin.html WPT previously expected different behavior
when a "crossorigin" attribute was present on the script element vs
when it was missing. But that is incorrect per-spec. Updated the test
to expect the script load to be blocked in both cases.

BUG=594639

Review-Url: https://codereview.chromium.org/2914273002
Cr-Commit-Position: refs/heads/master@{#476655}

[modify] https://crrev.com/52647ef2089ff4554a6245d2a8ed9dc8699a5f44/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/52647ef2089ff4554a6245d2a8ed9dc8699a5f44/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/crossorigin-import-different.sub.html
[modify] https://crrev.com/52647ef2089ff4554a6245d2a8ed9dc8699a5f44/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/crossorigin-root-different.sub.html
[modify] https://crrev.com/52647ef2089ff4554a6245d2a8ed9dc8699a5f44/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/crossorigin.html

Project Member Comment 124 by bugdroid1@chromium.org, Jun 5
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24a0e2bc7d7b746b7dd98feca32812f33a8dab3f

commit 24a0e2bc7d7b746b7dd98feca32812f33a8dab3f
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jun 05 06:55:24 2017

[ES6 modules] Update SetErrorAndClearRecord to match spec

Update name to match the new
https://html.spec.whatwg.org/multipage/webappapis.html#error-a-module-script
procedure introduced in commit:
https://github.com/whatwg/html/commit/115763124a641e8814665c5014d28155f95ff441

Bug: 727299, 594639
Change-Id: I72784a71341a74135b308b06becf041db345845e
Reviewed-on: https://chromium-review.googlesource.com/523050
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476955}
[modify] https://crrev.com/24a0e2bc7d7b746b7dd98feca32812f33a8dab3f/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/24a0e2bc7d7b746b7dd98feca32812f33a8dab3f/third_party/WebKit/Source/core/dom/ModuleScript.h

Blockedon: 725654
Blockedon: 729124
Blockedon: 717477
Project Member Comment 128 by bugdroid1@chromium.org, Jun 9
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/505cc74298100f7f54cfb8d95ce6cebfc92635c7

commit 505cc74298100f7f54cfb8d95ce6cebfc92635c7
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Fri Jun 09 05:19:13 2017

[ES6 modules] Update #creating-a-module-script to record its compilation error

This CL updates Blink's impl of #creating-a-module-script to match
recent spec change: https://github.com/whatwg/html/pull/2595 .

Before this CL, ModuleScript::Create, the Blink's impl of #creating-a-module-script reported the compilation error to console.
After this CL, ModuleScript::Create records module script compilation error
to ModuleScript::error_, and stops reporting the error to console.

Tests: external/wpt/html/semantics/scripting-1/the-script-element/module/compilation-error-*.html
Bug: 727299, 594639
Change-Id: Iad166780aa93db491abe1c5185fb2da07b61b8f0
Reviewed-on: https://chromium-review.googlesource.com/526555
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478207}
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/505cc74298100f7f54cfb8d95ce6cebfc92635c7/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 129 by bugdroid1@chromium.org, Jun 12
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e123c9108586cd8386edf8df90af739ce84ae3a4

commit e123c9108586cd8386edf8df90af739ce84ae3a4
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jun 12 14:17:34 2017

[ES6 modules] Update module linking procedures to follow latest spec updates

This CL updates Blink's impl of #internal-module-script-graph-fetching-procedure
and #fetch-the-descendants-of-and-instantiate-a-module-script to match
recent spec change: https://github.com/whatwg/html/pull/2595 .

Tests: external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html
Bug: 727299, 594639
Change-Id: I022b3b380b408a6d5c75a59d161aea4fe2868f48
Reviewed-on: https://chromium-review.googlesource.com/528724
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478609}
[modify] https://crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/specifier-error.html
[modify] https://crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h

Blockedon: v8:6489
Project Member Comment 131 by bugdroid1@chromium.org, Jun 14
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9b2b6a840fc7c88f5c46b5a32d8d844d778f35e4

commit 9b2b6a840fc7c88f5c46b5a32d8d844d778f35e4
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Wed Jun 14 09:58:37 2017

[ES6 modules] Fix obsolete assertions and add missing bailout to FetchDescendants

This CL :
1. Removes oesolete assertions after
crrev.com/e123c9108586cd8386edf8df90af739ce84ae3a4

2. Adds missing !HasValidContext bailout in FetchDescendants

Bug: 732765, 594639
Change-Id: I806be731f528a1e8c1a2a9ac7f882dfaaf98e2ba
Reviewed-on: https://chromium-review.googlesource.com/535257
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479341}
[add] https://crrev.com/9b2b6a840fc7c88f5c46b5a32d8d844d778f35e4/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html
[modify] https://crrev.com/9b2b6a840fc7c88f5c46b5a32d8d844d778f35e4/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp

Project Member Comment 132 by bugdroid1@chromium.org, Jun 15
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d43d1a1a87e9db3f9ae1195b832f6638050eac98

commit d43d1a1a87e9db3f9ae1195b832f6638050eac98
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Thu Jun 15 00:12:28 2017

[ES6 modules] Add WPT for loading cyclic module graph w/ slow imports

This CL adds a layout test demonstrating the currently broken cycle handling,
which currently fails on ToT.

If a cyclic module graph node contained other edges that are not part
of the cycle, the graph does not load reliably. (To be more specific,
the graph does not load unless the other edges complete loading before
we instantiate the cycle nodes).

We expect to have the root cause fixed in the spec change PR:
https://github.com/whatwg/html/pull/2674

Bug: 594639
Change-Id: I3cf8a640a73083ad612c96fc4bbd0f01e00f6e46
Reviewed-on: https://chromium-review.googlesource.com/535413
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479551}
[modify] https://crrev.com/d43d1a1a87e9db3f9ae1195b832f6638050eac98/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/d43d1a1a87e9db3f9ae1195b832f6638050eac98/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/slow-cycle.html
[add] https://crrev.com/d43d1a1a87e9db3f9ae1195b832f6638050eac98/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/slow-module-graph-a.js
[add] https://crrev.com/d43d1a1a87e9db3f9ae1195b832f6638050eac98/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/slow-module-graph-b.js

Blocking: 736192
Blockedon: 735833
Project Member Comment 135 by bugdroid1@chromium.org, Jun 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73bb506d40e7618c72d23bb949fc37928ea68f21

commit 73bb506d40e7618c72d23bb949fc37928ea68f21
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jun 26 08:04:24 2017

[ES6 modules] TraceWrapper from ScriptLoader and ModuleTreeLinkerRegistry

Before this CL, TraceWrapperV8References on ModuleScript were relying on
trace from Modulator->ModuleMap. However, this is insufficient, as
inline module scripts would not have an entry on module map.

This CL fixes the issue by introducing wrapper tracing to ScriptLoader
and ModuleTreeLinkerRegistry->ModuleTreeLinker object graphs.

Bug: 594639, 725816, 732270
Change-Id: Id4672f3daee90ae007c1ce0c9ea3608b246b129e
Reviewed-on: https://chromium-review.googlesource.com/547157
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482212}
[add] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc-expected.txt
[add] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc.html
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/MockScriptElementBase.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModulePendingScript.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/PendingScript.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ScriptElementBase.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ScriptElementBase.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/dom/ScriptLoader.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/html/HTMLScriptElement.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/svg/SVGScriptElement.cpp
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/svg/SVGScriptElement.h
[modify] https://crrev.com/73bb506d40e7618c72d23bb949fc37928ea68f21/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.h

Project Member Comment 136 by bugdroid1@chromium.org, Jun 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4005d8973b7c0649eb0774402f2df66713ffed23

commit 4005d8973b7c0649eb0774402f2df66713ffed23
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jun 26 08:12:34 2017

[ES6 modules] Update module script error state predicate and transition.

This CL updates the following spec concepts:
"#concept-module-script-is-errored"
- Null record is now also treated as an error
"#concept-module-script-pre-instantiation-error"
- Renamed from module script's error.
"#concept-module-script-module-record"
- Implement "set its [[HostDefined]] field to undefined" step.
"#concept-module-script-set-pre-instantiation-error"
- Don't set script's state to errored.

This change is to be introduced in whatwg html spec PR:
https://github.com/whatwg/html/pull/2674

The actual implementation behavior change will be introduced in separate CLs.

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674
Change-Id: Ie9734344030f99bcdaa3d595f8dbec87d44a7c92
Reviewed-on: https://chromium-review.googlesource.com/541097
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482213}
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
[modify] https://crrev.com/4005d8973b7c0649eb0774402f2df66713ffed23/third_party/WebKit/Source/core/testing/DummyModulator.cpp

Project Member Comment 137 by bugdroid1@chromium.org, Jun 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4ef7c0fece5fdbf8d51f4a6865056a1b03298c8

commit b4ef7c0fece5fdbf8d51f4a6865056a1b03298c8
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jun 26 10:57:30 2017

[ES6 modules] Document ModuleScript TraceWrapper paths

Bug: 594639, 725816, 732270
Change-Id: I7b83a77beb3806d53adb1e15baa184646a61a4f6
Reviewed-on: https://chromium-review.googlesource.com/547380
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482235}
[modify] https://crrev.com/b4ef7c0fece5fdbf8d51f4a6865056a1b03298c8/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 138 by bugdroid1@chromium.org, Jun 28
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a209dcf6a151b0bc26aace1b49507af255b948b2

commit a209dcf6a151b0bc26aace1b49507af255b948b2
Author: Georg Neis <neis@chromium.org>
Date: Wed Jun 28 15:54:57 2017

[api] Expose a module's status and exception.

V8 now takes care of recording a module's status, as proposed
in https://github.com/tc39/ecma262/pull/916.

R=adamk@chromium.org

Bug: v8:1569, chromium:594639
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id884f1c817e1dc3eea79a5d5a7f5cd996db1dbb0
Reviewed-on: https://chromium-review.googlesource.com/548500
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46293}
[modify] https://crrev.com/a209dcf6a151b0bc26aace1b49507af255b948b2/include/v8.h
[modify] https://crrev.com/a209dcf6a151b0bc26aace1b49507af255b948b2/src/api.cc
[modify] https://crrev.com/a209dcf6a151b0bc26aace1b49507af255b948b2/test/cctest/test-modules.cc

Blockedon: 736986
Blockedon: 736943
Project Member Comment 141 by bugdroid1@chromium.org, Jun 29
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1723ce24c39c60cfea47cb4570553b461fcfe4aa

commit 1723ce24c39c60cfea47cb4570553b461fcfe4aa
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Thu Jun 29 14:11:18 2017

[ES6 modules] Add bindings for ModuleRecord.[[Status]]

This CL exposes v8::Module::Status() as ScriptModule::Status()

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674
Change-Id: If515936fe72122343b05c1bd71f86559725d80cc
Reviewed-on: https://chromium-review.googlesource.com/554531
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483354}
[modify] https://crrev.com/1723ce24c39c60cfea47cb4570553b461fcfe4aa/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/1723ce24c39c60cfea47cb4570553b461fcfe4aa/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/1723ce24c39c60cfea47cb4570553b461fcfe4aa/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp

Project Member Comment 142 by bugdroid1@chromium.org, Jun 29
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/40485cc21560912f7b2c943a4d6b5646480faa61

commit 40485cc21560912f7b2c943a4d6b5646480faa61
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Thu Jun 29 22:34:01 2017

[ES6 modules] Add bindings for module record's [[ErrorCompletion]] field's [[Value]].

This CL exposes v8::Module::GetException() as ScriptModule::ErrorCompletion().

This CL also updates ModulatorImpl::GetError(ModuleScript*) impl to match the latest "#concept-module-script-error" concept.
ModulatorImpl change will be covered by external/wpt/html/semantics/scripting-1/the-script-element/instantiation-error* once the entire module infra is updated.

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: I4d4847c2031f7456e659984b00542fdb08c68dd9
Reviewed-on: https://chromium-review.googlesource.com/554633
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483521}
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp

Project Member Comment 143 by bugdroid1@chromium.org, Jun 29
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/40485cc21560912f7b2c943a4d6b5646480faa61

commit 40485cc21560912f7b2c943a4d6b5646480faa61
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Thu Jun 29 22:34:01 2017

[ES6 modules] Add bindings for module record's [[ErrorCompletion]] field's [[Value]].

This CL exposes v8::Module::GetException() as ScriptModule::ErrorCompletion().

This CL also updates ModulatorImpl::GetError(ModuleScript*) impl to match the latest "#concept-module-script-error" concept.
ModulatorImpl change will be covered by external/wpt/html/semantics/scripting-1/the-script-element/instantiation-error* once the entire module infra is updated.

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: I4d4847c2031f7456e659984b00542fdb08c68dd9
Reviewed-on: https://chromium-review.googlesource.com/554633
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483521}
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/40485cc21560912f7b2c943a4d6b5646480faa61/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp

Project Member Comment 144 by bugdroid1@chromium.org, Jul 1
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3bd23b408727fe4991922081c9cf43d6ad594105

commit 3bd23b408727fe4991922081c9cf43d6ad594105
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Sat Jul 01 05:27:23 2017

[ES6 modules] Implement ModuleScript::RecordStatus()

This CL implements ModuleScript::RecordStatus(), which returns
module script's record's [[Status]].
Which will replace usage of ModuleScript::state_ after we switch to
the new #internal-module-script-graph-fetching procedure proposed
in the linked PRs.

The call to ScriptModule::Status routed via Modulator to allow
mock implementation in Modulator infra unit tests.

This codepath will be tested in modulator infra unit tests after
the #internal-module-script-graph-fetching update.

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: I2ca193a8c779945c9ae9b08c2b5f55de41fb1a3c
Reviewed-on: https://chromium-review.googlesource.com/558724
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483902}
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/dom/Modulator.h
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/dom/ModulatorImpl.h
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/testing/DummyModulator.cpp
[modify] https://crrev.com/3bd23b408727fe4991922081c9cf43d6ad594105/third_party/WebKit/Source/core/testing/DummyModulator.h

Project Member Comment 145 by bugdroid1@chromium.org, Jul 1
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f6a1811fa90e8873235a4d404d2cecc1c472134

commit 1f6a1811fa90e8873235a4d404d2cecc1c472134
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Sat Jul 01 06:21:57 2017

[ES6 modules] Implement #concept-module-script-has-instantiated

This CL introduces ModuleScript::HasInstantiated(), which implements
spec concept: "#concept-module-script-has-instantiated"
This will replace usage of ModuleScript::state_ comparison to kInstantiated
after we switch to the new #internal-module-script-graph-fetching procedure
proposed in the linked PRs.

This codepath will be tested in modulator infra unit tests after
the #internal-module-script-graph-fetching update.

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: Icdcc21cf00b1e47a35e747d85dd5af7907dc5a2a
Reviewed-on: https://chromium-review.googlesource.com/558166
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483904}
[modify] https://crrev.com/1f6a1811fa90e8873235a4d404d2cecc1c472134/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/1f6a1811fa90e8873235a4d404d2cecc1c472134/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 146 by bugdroid1@chromium.org, Jul 1
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6614832e3a90564cb4e24c02eea867a9666b3ca0

commit 6614832e3a90564cb4e24c02eea867a9666b3ca0
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Sat Jul 01 12:56:14 2017

[ES6 modules] ModulatorImpl::ExecuteModule should report error acquired via GetError

Before this CL, ExecuteModule reported error acquired via
ModuleScript::GetErrorInternal. This is not always correct after
40485cc21560912f7b2c943a4d6b5646480faa61. ModuleScript::GetErrorInternal only
refers to preinstantiation errors, and we may have errors stored inside
module records as [[ErrorCompletion]] field's [[Value]].

This CL corrects ExecuteModule to report the appropriate error by using error
acquired by ModulatorImpl::GetError, which correctly implements the
"#concept-module-script-error" spec concept.

This is tested by wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-*.html.
However the wpt tests don't pass until we have updated

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: I97de9762bfad58e1f1b71bedf524761e53d43158
Reviewed-on: https://chromium-review.googlesource.com/558725
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483908}
[modify] https://crrev.com/6614832e3a90564cb4e24c02eea867a9666b3ca0/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp

Project Member Comment 147 by bugdroid1@chromium.org, Jul 3
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c5330b4aab314775157dafe8adadde0f600be8b7

commit c5330b4aab314775157dafe8adadde0f600be8b7
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jul 03 03:19:02 2017

[ES6 modules] Remove usage of ModuleInstantiationState outside ModuleTreeLinker

The spec concept "module script's state" is removed from latest HTML spec.
Remove its usage outside ModuleTreeLinker.

Bonus: Introduce pretty-printer of ModuleScript.

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674
Change-Id: Ic01d729d4c2bfa546da9138e7a8248b997060c87
Reviewed-on: https://chromium-review.googlesource.com/558567
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483930}
[modify] https://crrev.com/c5330b4aab314775157dafe8adadde0f600be8b7/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
[modify] https://crrev.com/c5330b4aab314775157dafe8adadde0f600be8b7/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
[modify] https://crrev.com/c5330b4aab314775157dafe8adadde0f600be8b7/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/c5330b4aab314775157dafe8adadde0f600be8b7/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/c5330b4aab314775157dafe8adadde0f600be8b7/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
[modify] https://crrev.com/c5330b4aab314775157dafe8adadde0f600be8b7/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp

Project Member Comment 148 by bugdroid1@chromium.org, Jul 3
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb77eef767180e26c5358d1096969569ffd2ed2e

commit fb77eef767180e26c5358d1096969569ffd2ed2e
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jul 03 05:30:18 2017

[ES6 modules] Update ModuleScript::IsErrored to match latest spec.

This CL updates ModuleScript::IsErrored so that it would also consider
its record's [[Status]].

This behavior change will be tested in
wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-*.html
once we update ModuleTreeLinker to latest #internal-module-script-graph-fetching
procedure

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: I575001a44ca1cc2ad5c9208c93c0b628a09086dd
Reviewed-on: https://chromium-review.googlesource.com/558825
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483945}
[modify] https://crrev.com/fb77eef767180e26c5358d1096969569ffd2ed2e/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/fb77eef767180e26c5358d1096969569ffd2ed2e/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/fb77eef767180e26c5358d1096969569ffd2ed2e/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp

Project Member Comment 149 by bugdroid1@chromium.org, Jul 3
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec49f96b9874e4e0006805872601ffdbd792fda7

commit ec49f96b9874e4e0006805872601ffdbd792fda7
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Mon Jul 03 08:01:04 2017

[ES6 modules] Update #internal-module-script-graph-fetching procedure

This CL implements the changes introduced in whatwg html spec PR:
https://github.com/whatwg/html/pull/2674

Summary:
- "final result" is now simply the "module script", instead of previous
  "descendant module script" which was used to report where error occurred.
- "#fetch-the-descendants-of-a-module-script" assumes (actually asserts)
  that all module specifiers are valid, as now it is guaranteed that their
  failure is handled at ModuleScript::Create.
- ModuleTreeLinker::NotifyOneDescendantFinished now waits for all descendants
  fetch to complete, even in error cases.
-- This matches spec procedure precisely, but we can optimize here later
   while keeping the behavior.
- ModuleScriptLinker now only triggers instantiate on module tree root.
  (iff ModuleGraphLevel == kTopLevelModuleFetch)
-- V8 is now responsible for instantiating the descendant tree +
   keeping their instantiation status as module script's record's
   [[Status]] (accessible via ModuleScript::RecordStatus() in Blink)
-- UninstantiatedInclusiveDescendants() is removed, as it is no longer used.

With this change, Blink now conforms to all module script WPTs!

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674
Change-Id: I7354e00820dd222f30b4a4eba1d3cf8c1b319798
Reviewed-on: https://chromium-review.googlesource.com/540960
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483957}
[modify] https://crrev.com/ec49f96b9874e4e0006805872601ffdbd792fda7/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/ec49f96b9874e4e0006805872601ffdbd792fda7/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
[modify] https://crrev.com/ec49f96b9874e4e0006805872601ffdbd792fda7/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
[modify] https://crrev.com/ec49f96b9874e4e0006805872601ffdbd792fda7/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp

Project Member Comment 150 by bugdroid1@chromium.org, Jul 4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6760a4421363e77cbe529a1835737be69f06a521

commit 6760a4421363e77cbe529a1835737be69f06a521
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Tue Jul 04 00:47:23 2017

[ES6 modules] Remove ModuleScript::SetInstantiationSuccess()

The member function is no longer used.

Bug: 594639, 727299
Change-Id: Ibf33ad4da2c0a863afe3951d0c7229ad9930a204
Reviewed-on: https://chromium-review.googlesource.com/558746
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484033}
[modify] https://crrev.com/6760a4421363e77cbe529a1835737be69f06a521/third_party/WebKit/Source/core/dom/ModuleScript.cpp
[modify] https://crrev.com/6760a4421363e77cbe529a1835737be69f06a521/third_party/WebKit/Source/core/dom/ModuleScript.h

Project Member Comment 151 by bugdroid1@chromium.org, Jul 4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52965d2d823717cd3d4feb67d424138c767c510a

commit 52965d2d823717cd3d4feb67d424138c767c510a
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Tue Jul 04 06:53:30 2017

[ES6 modules] TraceWrapper ModuleScript via HTMLParserScriptRunner

This CL adds another TraceWrapper path to ModuleScript to cover case where:
- Module script is an inline script
- <script> element for the inline script is removed at the time of execution

Bug: 594639, 725816, 732270, 737086
Change-Id: I5e8d00df55ae992f272aaac1b8890c120a32f3be
Reviewed-on: https://chromium-review.googlesource.com/558536
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484060}
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/dom/DocumentParser.h
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/dom/ModuleScript.h
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
[modify] https://crrev.com/52965d2d823717cd3d4feb67d424138c767c510a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h

Status: Fixed
Project Member Comment 153 by bugdroid1@chromium.org, Jul 13
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2

commit ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Thu Jul 13 10:05:03 2017

[ES6 modules] Log to console if module script load failed due to invalid MIME type.

Before this CL, module script load of invalid mime type has silently failed.
This CL aims to help web developer by notifying this tricky failure to DevTools console.

Bug: 594639
Change-Id: I9533fdb325fcecccedbf24b9819e65f116a17c11
Reviewed-on: https://chromium-review.googlesource.com/566746
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486331}
[add] https://crrev.com/ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2/third_party/WebKit/LayoutTests/http/tests/loading/module-script-wrong-mime-expected.txt
[add] https://crrev.com/ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2/third_party/WebKit/LayoutTests/http/tests/loading/module-script-wrong-mime.html
[add] https://crrev.com/ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2/third_party/WebKit/LayoutTests/http/tests/loading/resources/module-script-wrong-mime.txt
[modify] https://crrev.com/ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.cpp
[modify] https://crrev.com/ecf1fe5f9d91a20ec6b6ac615e919174b78a4db2/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoader.h

Project Member Comment 154 by bugdroid1@chromium.org, Jul 18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8085fd3c32969645407d70c5e2839984047dc52f

commit 8085fd3c32969645407d70c5e2839984047dc52f
Author: Kouhei Ueno <kouhei@chromium.org>
Date: Tue Jul 18 10:28:24 2017

[ES6 modules] Add UseCounter for preparing a module script

Bug: 594639
Change-Id: Iabb2f3780d21c0f896073e6cad6178deced61e83
Reviewed-on: https://chromium-review.googlesource.com/575797
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487432}
[modify] https://crrev.com/8085fd3c32969645407d70c5e2839984047dc52f/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/8085fd3c32969645407d70c5e2839984047dc52f/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/8085fd3c32969645407d70c5e2839984047dc52f/tools/metrics/histograms/enums.xml

Blockedon: -721914
Blockedon: 748544
Sign in to add a comment