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

Issue 2715533007: Use ScriptLoader::errorOccurred() instead of Resource in ScriptLoader (Closed)

Created:
3 years, 10 months ago by hiroshige
Modified:
3 years, 9 months ago
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use ScriptLoader::errorOccurred() instead of Resource in ScriptLoader https://codereview.chromium.org/2716543002/ made ScriptLoader::errorOccurred() and PendingScript::errorOccurred() inconsistent and thus causes the following issue: If the integrity check fails for a script that falls into 3rd Clause of Step 23 of "prepare a script", then notifyScriptReady() is called because Resource::errorOccurred() is false, but execution of the script and the subsequent scripts are blocked forever by ScriptRunner::scheduleReadyInOrderScripts() because ScriptLoader::errorOccurred() is true. This CL fixes it and add a layout test for this case. BUG=686281 Review-Url: https://codereview.chromium.org/2715533007 Cr-Commit-Position: refs/heads/master@{#453056} Committed: https://chromium.googlesource.com/chromium/src/+/bb1b87fb08ec4407a2cf1cdcf6d9e400e253e578

Patch Set 1 #

Patch Set 2 : Tests. #

Patch Set 3 : Test #

Patch Set 4 : Use ScriptLoader::errorOccurred() #

Total comments: 12

Patch Set 5 : fix comments in test #

Patch Set 6 : Move DCHECK_EQ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -10 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html View 1 2 3 4 1 chunk +30 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptLoader.cpp View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 33 (25 generated)
hiroshige
PTAL. I think we should modify other tests under third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/ to comprehensively tests the script ...
3 years, 10 months ago (2017-02-23 20:41:04 UTC) #9
sof
https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html File third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html (right): https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html#newcode10 third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html:10: var test1 = async_test('1st Clause, Step 23 of prepare ...
3 years, 10 months ago (2017-02-24 07:29:22 UTC) #14
hiroshige
https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html File third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html (right): https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html#newcode10 third_party/WebKit/LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html:10: var test1 = async_test('1st Clause, Step 23 of prepare ...
3 years, 10 months ago (2017-02-24 18:16:57 UTC) #16
sof
lgtm https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode855 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:855: DCHECK_EQ(pendingScript->resource(), m_resource); On 2017/02/24 18:16:57, hiroshige wrote: > ...
3 years, 10 months ago (2017-02-24 18:26:44 UTC) #19
hiroshige
https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp File third_party/WebKit/Source/core/dom/ScriptLoader.cpp (right): https://codereview.chromium.org/2715533007/diff/60001/third_party/WebKit/Source/core/dom/ScriptLoader.cpp#newcode855 third_party/WebKit/Source/core/dom/ScriptLoader.cpp:855: DCHECK_EQ(pendingScript->resource(), m_resource); On 2017/02/24 18:26:43, sof wrote: > On ...
3 years, 10 months ago (2017-02-25 00:31:50 UTC) #23
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/2715533007/100001
3 years, 10 months ago (2017-02-25 01:45:53 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/bb1b87fb08ec4407a2cf1cdcf6d9e400e253e578
3 years, 10 months ago (2017-02-25 03:12:39 UTC) #32
kouhei (in TOK)
3 years, 9 months ago (2017-02-27 00:03:39 UTC) #33
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698