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.

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
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

Issue description

Tracking bug for <script type="module"> work.

See also the v8-side issue: https://bugs.chromium.org/p/v8/issues/detail?id=1569
 
Showing comments 58 - 157 of 157 Older
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

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

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 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 124 by bugdroid1@chromium.org, Jun 5 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 2017

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 (was: Assigned)
Project Member

Comment 153 by bugdroid1@chromium.org, Jul 13 2017

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 2017

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

Comment 156 by neis@chromium.org, Jul 25 2017

Blockedon: 748544
Showing comments 58 - 157 of 157 Older

Sign in to add a comment