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

Issue 2860993002: [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching" (Closed)

Created:
3 years, 7 months ago by kouhei (in TOK)
Modified:
3 years, 7 months ago
Reviewers:
hiroshige, module-dev, domenic, neis
CC:
chromium-reviews, blink-reviews-w3ctests_chromium.org, tfarina, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

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

Patch Set 1 #

Total comments: 5

Patch Set 2 : neis #

Total comments: 1

Patch Set 3 : add comment #

Patch Set 4 : rm-wrong-test #

Patch Set 5 : update Modulator.h comment too #

Messages

Total messages: 43 (26 generated)
kouhei (in TOK)
3 years, 7 months ago (2017-05-04 16:18:45 UTC) #2
kouhei (in TOK)
https://codereview.chromium.org/2860993002/diff/1/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html File third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html (right): https://codereview.chromium.org/2860993002/diff/1/third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html#newcode1 third_party/WebKit/LayoutTests/external/wpt/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html:1: <!DOCTYPE html> W/ this CL applied, this test should ...
3 years, 7 months ago (2017-05-04 16:23:28 UTC) #3
kouhei (in TOK)
Proper fix blocked on https://github.com/whatwg/html/issues/2630 , but we might want to land something to avoid ...
3 years, 7 months ago (2017-05-04 16:30:37 UTC) #4
neis
https://codereview.chromium.org/2860993002/diff/1/third_party/WebKit/Source/core/dom/ModuleMap.cpp File third_party/WebKit/Source/core/dom/ModuleMap.cpp (right): https://codereview.chromium.org/2860993002/diff/1/third_party/WebKit/Source/core/dom/ModuleMap.cpp#newcode148 third_party/WebKit/Source/core/dom/ModuleMap.cpp:148: return it->value->GetModuleScript(); This return statement makes no sense if ...
3 years, 7 months ago (2017-05-09 08:56:37 UTC) #6
kouhei (in TOK)
I think the change makes sense to fix the crash, thus would like to proceed. ...
3 years, 7 months ago (2017-05-12 20:48:46 UTC) #8
neis
lgtm with comment https://codereview.chromium.org/2860993002/diff/20001/third_party/WebKit/Source/core/dom/ModuleMap.cpp File third_party/WebKit/Source/core/dom/ModuleMap.cpp (right): https://codereview.chromium.org/2860993002/diff/20001/third_party/WebKit/Source/core/dom/ModuleMap.cpp#newcode151 third_party/WebKit/Source/core/dom/ModuleMap.cpp:151: } In Modulator.h, the comment on ...
3 years, 7 months ago (2017-05-15 09:08:27 UTC) #17
kouhei (in TOK)
3 years, 7 months ago (2017-05-15 20:16:41 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860993002/40001
3 years, 7 months ago (2017-05-15 22:05:01 UTC) #23
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 7 months ago (2017-05-15 22:05:03 UTC) #25
neis
On 2017/05/15 20:16:41, kouhei (travelling SFO) wrote: Your message was empty, did some text get ...
3 years, 7 months ago (2017-05-16 08:35:47 UTC) #30
hiroshige
lgtm
3 years, 7 months ago (2017-05-16 16:45:07 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860993002/60001
3 years, 7 months ago (2017-05-16 16:46:11 UTC) #34
kouhei (in TOK)
On 2017/05/16 08:35:47, neis wrote: > On 2017/05/15 20:16:41, kouhei (travelling SFO) wrote: > > ...
3 years, 7 months ago (2017-05-16 16:55:25 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2860993002/80001
3 years, 7 months ago (2017-05-16 17:01:23 UTC) #38
hiroshige
still lgtm
3 years, 7 months ago (2017-05-16 17:06:11 UTC) #39
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/1f92cfbdedaecb97e8a87773deb32f98c6997351
3 years, 7 months ago (2017-05-16 19:42:11 UTC) #42
kolos1
3 years, 7 months ago (2017-05-17 09:47:36 UTC) #43
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/2886123002/ by kolos@chromium.org.

The reason for reverting is: 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....

Powered by Google App Engine
This is Rietveld 408576698