Update Blink-side module script implementation according to the spec PRs 2971/2991 |
||||
Issue descriptionHTML spec side change: - https://github.com/whatwg/html/pull/2971 - https://github.com/whatwg/html/pull/2991 These are basis for - "flattening" the ModuleTreeLinker, i.e. use a single MTL and a kind of an async loop to track the all fetching of a module graph, instead of multiple MTLs (each for one root or descendant module script), and - Make error handling deterministic and cleaner. I'll first refactor the structure of MTL without behavior changes (*): https://chromium-review.googlesource.com/c/chromium/src/+/583552 And later apply the changes of PR 2991 that causes behavior changes. (*) Strictly speaking, this causes behavior changes in the choice of error reported, but anyway the old spec has nondeterministic behavior there and thus these behavior changes are not significant.
,
Sep 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e81cbfd9f8b19631241e926ebfe66aabedc0ef53 commit e81cbfd9f8b19631241e926ebfe66aabedc0ef53 Author: Kouhei Ueno <kouhei@chromium.org> Date: Wed Sep 20 05:22:13 2017 Revert "Flatten ModuleTreeLinker" This reverts commit 5a168dfca798f0088b3257f21781a66b4132ba7b. Reason for revert: find-it says this bloke the linux build Original change's description: > Flatten ModuleTreeLinker > > 1. This CL applies the spec change by > https://github.com/whatwg/html/pull/2971. > Since [1], the code has already been behaving like the spec PR 2971, and this CL > makes the code align with PR 2971 more completely, by removing AncestorList > and adding spec comments. > > 2. This CL also flattens the code structure of ModuleTreeLinker, which is > enabled by the spec PR 2971, to make the code simpler to make further > optimizations easy. > That is, instead of creating a ModuleTreeLinker for each module script > (i.e. for each "fetch the descendants" call) in a module graph, this CL > creates a single ModuleTreeLinker that corresponds to a top-level module graph > script. > > Most of fetching-related classes/methods, including > - ModuleTreeLinker::DependencyModuleClient > - ModuleTreeLinker::FetchDescendants() > - ModuleTreeLinker::NotifyOneDescendantFinished() > are merged into the single method NotifyModuleLoadFinished() that implements > the main body of "fetch the descendants" and > "internal module script graph fetching procedure". > > This also removes ModuleTreeReachedUrlSet and instead uses HashSet<KURL> > directly, as we no longer have to share it across multiple ModuleTreeLinkers. > Modulator::FetchTreeInternal() is removed as we no longer create > ModuleTreeLinkers for subtree fetching via Modulator. > > 3. This CL applies a part of > https://github.com/whatwg/html/pull/2991, particularly introduces > FindFirstParseError() that corresponds to "find the first parse error" and > use it to find the error to be reported, instead of propagating errors > based on Step 6.1 and 6.2 of "fetch the descendants". > > (*) In some subtle cases, this might cause behavior changes in error reporting, > but these changes shouldn't be significant, because anyway the spec before > PR 2991 (and thus the previous implementation) behaves nondeterministically > in some similarly subtle cases. > > This CL is an intermediate step to apply spec PRs 2971 and 2991. > This CL refactors largely ModuleTreeLinker with keeping the existing behavior > mostly (except for (*)), and subsequent CLs will apply the behavior changes > and remaining code structure changes introduced by PR 2991. > > Bug: 763597 > Change-Id: I0ef38c5ebf462fa7f02093f1725ea0014b80585d > Reviewed-on: https://chromium-review.googlesource.com/583552 > Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> > Reviewed-by: Kouhei Ueno <kouhei@chromium.org> > Cr-Commit-Position: refs/heads/master@{#503034} TBR=hiroshige@chromium.org,ksakamoto@chromium.org,kouhei@chromium.org,nhiroki@chromium.org Change-Id: I297bca8d91c91f49e4ef1e46a01a1af90a7e67ef No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 763597 Reviewed-on: https://chromium-review.googlesource.com/674784 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#503059} [add] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/dom/AncestorList.h [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/dom/BUILD.gn [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/dom/Modulator.h [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/dom/ModulatorImplBase.cpp [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/dom/ModulatorImplBase.h [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/BUILD.gn [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp [add] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeReachedUrlSet.h [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/testing/DummyModulator.cpp [modify] https://crrev.com/e81cbfd9f8b19631241e926ebfe66aabedc0ef53/third_party/WebKit/Source/core/testing/DummyModulator.h
,
Sep 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9369ded6b34c601980ee2ce94cfd0c8c97df8215 commit 9369ded6b34c601980ee2ce94cfd0c8c97df8215 Author: calamity <calamity@chromium.org> Date: Wed Sep 20 05:47:33 2017 Revert "Flatten ModuleTreeLinker" This reverts commit 5a168dfca798f0088b3257f21781a66b4132ba7b. Reason for revert: Seems to be breaking ModuleTreeLinkerTest.FetchTreeWith3Deps1Fail on: https://uberchromegw.corp.google.com/i/chromium.memory/builders/Linux%20TSan%20Tests/builds/11696 Original change's description: > Flatten ModuleTreeLinker > > 1. This CL applies the spec change by > https://github.com/whatwg/html/pull/2971. > Since [1], the code has already been behaving like the spec PR 2971, and this CL > makes the code align with PR 2971 more completely, by removing AncestorList > and adding spec comments. > > 2. This CL also flattens the code structure of ModuleTreeLinker, which is > enabled by the spec PR 2971, to make the code simpler to make further > optimizations easy. > That is, instead of creating a ModuleTreeLinker for each module script > (i.e. for each "fetch the descendants" call) in a module graph, this CL > creates a single ModuleTreeLinker that corresponds to a top-level module graph > script. > > Most of fetching-related classes/methods, including > - ModuleTreeLinker::DependencyModuleClient > - ModuleTreeLinker::FetchDescendants() > - ModuleTreeLinker::NotifyOneDescendantFinished() > are merged into the single method NotifyModuleLoadFinished() that implements > the main body of "fetch the descendants" and > "internal module script graph fetching procedure". > > This also removes ModuleTreeReachedUrlSet and instead uses HashSet<KURL> > directly, as we no longer have to share it across multiple ModuleTreeLinkers. > Modulator::FetchTreeInternal() is removed as we no longer create > ModuleTreeLinkers for subtree fetching via Modulator. > > 3. This CL applies a part of > https://github.com/whatwg/html/pull/2991, particularly introduces > FindFirstParseError() that corresponds to "find the first parse error" and > use it to find the error to be reported, instead of propagating errors > based on Step 6.1 and 6.2 of "fetch the descendants". > > (*) In some subtle cases, this might cause behavior changes in error reporting, > but these changes shouldn't be significant, because anyway the spec before > PR 2991 (and thus the previous implementation) behaves nondeterministically > in some similarly subtle cases. > > This CL is an intermediate step to apply spec PRs 2971 and 2991. > This CL refactors largely ModuleTreeLinker with keeping the existing behavior > mostly (except for (*)), and subsequent CLs will apply the behavior changes > and remaining code structure changes introduced by PR 2991. > > Bug: 763597 > Change-Id: I0ef38c5ebf462fa7f02093f1725ea0014b80585d > Reviewed-on: https://chromium-review.googlesource.com/583552 > Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> > Reviewed-by: Kouhei Ueno <kouhei@chromium.org> > Cr-Commit-Position: refs/heads/master@{#503034} TBR=hiroshige@chromium.org,ksakamoto@chromium.org,kouhei@chromium.org,nhiroki@chromium.org Change-Id: I84c8f8f443bdbb1d5fbe8cb52d2cb513c7890d2c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 763597 Reviewed-on: https://chromium-review.googlesource.com/674510 Reviewed-by: calamity <calamity@chromium.org> Commit-Queue: calamity <calamity@chromium.org> Cr-Commit-Position: refs/heads/master@{#503063}
,
Sep 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd commit b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Wed Sep 20 13:57:42 2017 Reland "Flatten ModuleTreeLinker" This CL relands https://chromium-review.googlesource.com/c/chromium/src/+/583552 with a fix for test failure in release builds: Move FindFirstParseError() call out of DCHECK(). Original CL description: 1. This CL applies the spec change by https://github.com/whatwg/html/pull/2971. Since [1], the code has already been behaving like the spec PR 2971, and this CL makes the code align with PR 2971 more completely, by removing AncestorList and adding spec comments. 2. This CL also flattens the code structure of ModuleTreeLinker, which is enabled by the spec PR 2971, to make the code simpler to make further optimizations easy. That is, instead of creating a ModuleTreeLinker for each module script (i.e. for each "fetch the descendants" call) in a module graph, this CL creates a single ModuleTreeLinker that corresponds to a top-level module graph script. Most of fetching-related classes/methods, including - ModuleTreeLinker::DependencyModuleClient - ModuleTreeLinker::FetchDescendants() - ModuleTreeLinker::NotifyOneDescendantFinished() are merged into the single method NotifyModuleLoadFinished() that implements the main body of "fetch the descendants" and "internal module script graph fetching procedure". This also removes ModuleTreeReachedUrlSet and instead uses HashSet<KURL> directly, as we no longer have to share it across multiple ModuleTreeLinkers. Modulator::FetchTreeInternal() is removed as we no longer create ModuleTreeLinkers for subtree fetching via Modulator. 3. This CL applies a part of https://github.com/whatwg/html/pull/2991, particularly introduces FindFirstParseError() that corresponds to "find the first parse error" and use it to find the error to be reported, instead of propagating errors based on Step 6.1 and 6.2 of "fetch the descendants". (*) In some subtle cases, this might cause behavior changes in error reporting, but these changes shouldn't be significant, because anyway the spec before PR 2991 (and thus the previous implementation) behaves nondeterministically in some similarly subtle cases. This CL is an intermediate step to apply spec PRs 2971 and 2991. This CL refactors largely ModuleTreeLinker with keeping the existing behavior mostly (except for (*)), and subsequent CLs will apply the behavior changes and remaining code structure changes introduced by PR 2991. Bug: 763597 Change-Id: I4136db0db4bc8a0cdc7f5c23b18787b405d8c98f Reviewed-on: https://chromium-review.googlesource.com/674748 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#503126} [delete] https://crrev.com/07ea99d7e17fb423850453e72795646d9c9bc82c/third_party/WebKit/Source/core/dom/AncestorList.h [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/dom/BUILD.gn [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/dom/Modulator.h [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/dom/ModulatorImplBase.cpp [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/dom/ModulatorImplBase.h [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/loader/BUILD.gn [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp [delete] https://crrev.com/07ea99d7e17fb423850453e72795646d9c9bc82c/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeReachedUrlSet.h [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/testing/DummyModulator.cpp [modify] https://crrev.com/b2ca65cb5a61eb6f69a573a336cbd1f9ea794fcd/third_party/WebKit/Source/core/testing/DummyModulator.h
,
Sep 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e35c1229109f3eb213a4f62ebb27b1b864e5ba10 commit e35c1229109f3eb213a4f62ebb27b1b864e5ba10 Author: Kouhei Ueno <kouhei@chromium.org> Date: Thu Sep 21 01:04:04 2017 [ES6 modules] WPT: mark error test cases as flaky The web platform tests testing module script errors are not deterministic until we have the new algorithm being proposed at HTML PRs below: - https://github.com/whatwg/html/pull/2971 - https://github.com/whatwg/html/pull/2991 This CL marks the test as flaky until we land the new algorithm. TBR=hiroshige@chromium.org Bug: 767093 , 763597 Change-Id: I9ef17f2ae6dc51acbef4dbab1f7f7c7438d17eb7 Reviewed-on: https://chromium-review.googlesource.com/676403 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#503304} [modify] https://crrev.com/e35c1229109f3eb213a4f62ebb27b1b864e5ba10/third_party/WebKit/LayoutTests/TestExpectations
,
Sep 27 2017
,
Oct 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56367281f9b94f9e151770e0a5da5f74623690e5 commit 56367281f9b94f9e151770e0a5da5f74623690e5 Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Fri Oct 06 01:50:56 2017 Reduce usage of ModuleScript::IsErrored() and HasInstantiated() in tests IsErrored() and HasInstantiated() are to be removed because they are removed from the HTML spec in https://github.com/whatwg/html/pull/2991. This CL - Replaces IsErrored() calls in unit tests with checks for Instantiate() results or with HasEmptyRecord(), depending on whether instantiation errors or parse errors are tested, and - Removes EXPECT_FALSE(HasInstantiated()) from ModuleMapTest.cpp, because instantiation is already prohibited by NOTREACHED() in DummyModulator::InstantiateModule(). Bug: 763597 Change-Id: I272a03f3d5ce8ddf6ea645a3d0d1a1ae7543f2be Reviewed-on: https://chromium-review.googlesource.com/703483 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#506947} [modify] https://crrev.com/56367281f9b94f9e151770e0a5da5f74623690e5/third_party/WebKit/Source/core/dom/DynamicModuleResolverTest.cpp [modify] https://crrev.com/56367281f9b94f9e151770e0a5da5f74623690e5/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp [modify] https://crrev.com/56367281f9b94f9e151770e0a5da5f74623690e5/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1009aff2d6d032b8a819b48409ffcea6f089323d commit 1009aff2d6d032b8a819b48409ffcea6f089323d Author: Kouhei Ueno <kouhei@chromium.org> Date: Wed Oct 11 04:17:37 2017 [ES6 modules] HRIM may return errored module until V8 forgets instantiation errors Today, we are in somewhat stale state where new module tree fetching algorithm [1][2] is partially applied. This CL (temporarily) disables an assert which exists in the final algorithm, but doesn't hold today. Specifically, the assert in HostResolveImportedModule (HRIM [3]) Step 7 currently doesn't hold, as the instantiation may have failed for a module script node, and current V8 implementation records the instantiation error as an error. See the attached test case for an example. [1] https://github.com/whatwg/html/pull/2991 [2] https://github.com/tc39/ecma262/pull/1006 [3] https://html.spec.whatwg.org/multipage/webappapis.html#hostresolveimportedmodule(referencingscriptormodule,-specifier) Test: external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html Bug: 772750 , 763597 Change-Id: Ida600598b658c74cdbda5937219f1e62a41f2a16 Reviewed-on: https://chromium-review.googlesource.com/708078 Reviewed-by: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#507888} [add] https://crrev.com/1009aff2d6d032b8a819b48409ffcea6f089323d/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html [modify] https://crrev.com/1009aff2d6d032b8a819b48409ffcea6f089323d/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b2f553ded0e6e4b194910cf33247c7e81e1f06b2 commit b2f553ded0e6e4b194910cf33247c7e81e1f06b2 Author: Kouhei Ueno <kouhei@chromium.org> Date: Wed Oct 11 07:03:59 2017 [ES6 modules] update run-a-module-script algorithm and fix import() error crash This CL updates ModuleImplBase::ExecuteModule to match the latest spec text. The change also fix crash when dynamic import() is attempt on module tree w/ instantiation error. Test: external/wpt/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-error.html Bug: 763597 Change-Id: Icae37257492d3b2a0885fd571ac745f9de49cc6e Reviewed-on: https://chromium-review.googlesource.com/711634 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#507916} [add] https://crrev.com/b2f553ded0e6e4b194910cf33247c7e81e1f06b2/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-error.html [add] https://crrev.com/b2f553ded0e6e4b194910cf33247c7e81e1f06b2/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/throw-error.js [modify] https://crrev.com/b2f553ded0e6e4b194910cf33247c7e81e1f06b2/third_party/WebKit/Source/core/dom/ModulatorImplBase.cpp
,
Nov 6 2017
,
Nov 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d5d0b245c0c1765f92c57814d4956b3c52ab8931 commit d5d0b245c0c1765f92c57814d4956b3c52ab8931 Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Mon Nov 27 06:34:20 2017 Do not report the error inside ScriptModule::Evaluate() Instead of reporting the error inside ScriptModule::Evaluate(), this CL makes ScriptModule::Evaluate() always return the exception without reporting (i.e. the same as the kCapture behavior), and makes ModulatorImplBase::ExecuteModule() handle and rethrow that returned exception. This is to - Determine whether ScriptModule::Evaluate() succeeded or not. After this CL, evaluation succeeds iff |!Evaluate().IsEmpty()|. This is preparation for https://chromium-review.googlesource.com/698467, because methods such as IsErrored() will be removed and thus an explicit way to check an evaluation error will be needed. - Remove duplicated "report the error" code paths around Modulator::ExecuteModule(): - One implemented by v8::TryCatch::SetVerbose(true) inside ScriptModule::Evaluate(), that is removed by this CL, and - One implemented by a ScriptModule::ReportException() call in ModulatorImplBase::ExecuteModule(). This CL doesn't change non-test behavior, because - ScriptModule::Evaluate() is called with kCapture from all non-test code except for ModulatorImplBase::ExecuteModule(), and - ModulatorImplBase::ExecuteModule() handles the error returned from Evaluate() and report it if |capture_error| is |kReport|. Clean up: this CL - Removes CaptureEvalErrorFlag argument from ScriptModule::Evaluate(). - Moves CaptureEvalErrorFlag to Modulator. - Removes Modulator::ExecuteModule()'s CaptureEvalErrorFlag argument's default value to make the flag value explicit. Bug: 763597 Change-Id: I31580b1c6b254b5d6b94e037dfa837ba5ae595fb Reviewed-on: https://chromium-review.googlesource.com/754333 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#519229} [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/core/dom/DynamicModuleResolver.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/core/dom/DynamicModuleResolverTest.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/core/dom/Modulator.h [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/core/dom/ModulatorImplBase.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/core/dom/ModuleScript.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletGlobalScopeTest.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/modules/animationworklet/AnimationWorkletThreadTest.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScopeTest.cpp [modify] https://crrev.com/d5d0b245c0c1765f92c57814d4956b3c52ab8931/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
,
Nov 30 2017
,
Dec 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/960460d86dcd0d20f9c382ec82924ce1a2e7940f commit 960460d86dcd0d20f9c382ec82924ce1a2e7940f Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Tue Dec 05 17:13:11 2017 Fire load event for link modulepreload with non-fetch errors According to the spec comment, load events (instead of error events) should be fired for modules with non-fetch errors such as parse errors. Bug: 740886 , 763597 Change-Id: I6074b36631e1299b90d52bc01e42c5ddeb957b31 Reviewed-on: https://chromium-review.googlesource.com/802251 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#521726} [modify] https://crrev.com/960460d86dcd0d20f9c382ec82924ce1a2e7940f/third_party/WebKit/LayoutTests/external/wpt/preload/modulepreload.html [modify] https://crrev.com/960460d86dcd0d20f9c382ec82924ce1a2e7940f/third_party/WebKit/Source/core/loader/LinkLoader.cpp
,
Dec 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6be1eccf7c32b6c0e830798991e7457f83e8442b commit 6be1eccf7c32b6c0e830798991e7457f83e8442b Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Tue Dec 19 22:46:25 2017 [ES6 Module] Reflect Spec PR 2991 to make error handling deterministic Spec update: https://github.com/whatwg/html/pull/2991 V8-side change: https://chromium-review.googlesource.com/763369 Data members for errors are restructured: Removed module script's "is errored" #concept-module-script-is-errored => Removed ModuleScript::IsErrored(). Removed module script's "error" #concept-module-script-error => Removed Modulator::GetError(), ModuleScript::CreateError(), and ModuleScript::CreateErrorInternal(). Removed "set the pre-instantiation error" #concept-module-script-set-pre-instantiation-error => Removed ModuleScript::SetErrorAndClearRecord(). Introduced script's "error to rethrow" #concept-script-error-to-rethrow => Added ModuleScript::error_to_rethrow_ and its accessors. Also renamed ModuleScript::preinstantiation_error_ to parse_error_, and added its accessors, HTML/Blink no longer checks modules' status: Removed references to [[Status]] and [[ErrorCompletion]] field. => Removed Modulator::GetRecordStatus(), ModuleScript::RecordStatus(), and calls to ScriptModule::ErrorCompletion(). Removed module script's "has instantiated" #concept-module-script-has-instantiated => Removed ModuleScript::HasInstantiated(). A subsequent CL will do further cleanup: https://chromium-review.googlesource.com/802465 Error handling algorithms in the HTML spec were updated: - #creating-a-module-script - #run-a-module-script - [FFPE] #finding-the-first-parse-error - [IMSGF] #internal-module-script-graph-fetching-procedure - [FD] #fetch-the-descendants-of-a-module-script - [FDaI] #fetch-the-descendants-of-and-instantiate-a-module-script - #hostresolveimportedmodule(referencingscriptormodule,-specifier) And thus this CL updates the following accordingly: - ModuleScript::Create() - ModulatorImplBase::ExecuteModule() - ModuleTreeLinker.cpp - ScriptModuleResolverImpl::Resolve() The behavior changes are: - User-facing: the error reported (to window.onerror etc.) is changed and made deterministic, as intended by the spec update. - V8-facing: this CL - invokes module instantiation of a module graph with existing instantiation/evaluation errors. - invokes evaluation of a module graph with existing evaluation errors. These cases already occur, but this CL does these intentionally. Bug: 763597 Change-Id: Ia02bb484290c5c07ab27e9c966db19a6e8d2596f Reviewed-on: https://chromium-review.googlesource.com/698467 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#525168} [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-1a.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-1b.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-2.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-2a.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-2b.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-3.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-3a.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/choice-of-error-3b.js [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-type-1.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-type-1.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-type-2.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-type-2.js [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-type-3.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/error-type-3.js [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html [delete] https://crrev.com/5cce023721315702e4e5d475859ef5951d391731/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-5-expected.txt [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html [add] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/throw2.js [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/DynamicModuleResolver.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/DynamicModuleResolverTest.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/Modulator.h [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ModulatorImplBase.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ModulatorImplBase.h [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ModuleScript.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ModuleScript.h [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/testing/DummyModulator.cpp [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/testing/DummyModulator.h [modify] https://crrev.com/6be1eccf7c32b6c0e830798991e7457f83e8442b/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.cpp
,
Dec 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d0118cdf372f3cbc9eccfb024e3eb0d0287a3945 commit d0118cdf372f3cbc9eccfb024e3eb0d0287a3945 Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Wed Dec 20 02:39:23 2017 Remove ScriptModule::Status()/ErrorCompletion() They should be no longer used in Blink, as the spec update https://github.com/whatwg/html/pull/2991 removes the references them from the HTML spec. Bug: 763597 Change-Id: I515b12a36a8e6f97b72ef6695a05da2f89ecfa8e Reviewed-on: https://chromium-review.googlesource.com/802465 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#525235} [modify] https://crrev.com/d0118cdf372f3cbc9eccfb024e3eb0d0287a3945/third_party/WebKit/Source/bindings/core/v8/ScriptModule.cpp [modify] https://crrev.com/d0118cdf372f3cbc9eccfb024e3eb0d0287a3945/third_party/WebKit/Source/bindings/core/v8/ScriptModule.h [modify] https://crrev.com/d0118cdf372f3cbc9eccfb024e3eb0d0287a3945/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp [modify] https://crrev.com/d0118cdf372f3cbc9eccfb024e3eb0d0287a3945/third_party/WebKit/Source/core/dom/ScriptModuleResolverImplTest.cpp
,
Jan 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/493a404fb9a975817a8c8962225380219e82ae40 commit 493a404fb9a975817a8c8962225380219e82ae40 Author: Hiroshige Hayashizaki <hiroshige@chromium.org> Date: Tue Jan 02 05:17:34 2018 [ES6 Modules] Fix test expectations for Issue 763597 As both of Blink-side and v8-side changes have landed: - Blink: https://chromium-review.googlesource.com/698467 - V8: https://chromium-review.googlesource.com/763369 (Auto-roll: https://chromium-review.googlesource.com/845221) This CL re-enables the tests that were disabled for the transitioning. Bug: 763597 , v8:1569 Change-Id: I27a407bac3ab8f60100ded0b7f842f9bf648620d Reviewed-on: https://chromium-review.googlesource.com/843011 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#526440} [modify] https://crrev.com/493a404fb9a975817a8c8962225380219e82ae40/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/493a404fb9a975817a8c8962225380219e82ae40/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
,
Jan 2 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Sep 20 2017