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

Issue 1849223002: Blocking synchronous and third party doc.written scripts (Closed)

Created:
4 years, 8 months ago by shivanisha
Modified:
3 years, 10 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refers to doc.written scripts blocking (https://docs.google.com/document/d/1AtS83d9joGj-xmt_pZB4Uvvn_9d1aEReRg0rI_5runw/edit) This patch enhances the existing code to restrict the blocking of only synchronous and third-party scripts BUG=599875 Committed: https://crrev.com/f907a5fb93cf183c0a3f9529ede284af8f06874c Cr-Commit-Position: refs/heads/master@{#386219}

Patch Set 1 #

Total comments: 9

Patch Set 2 : default argument for DeferOption in resourceRequestCachePolicy() #

Total comments: 1

Patch Set 3 : Added layout tests and review comments incorporation #

Total comments: 9

Patch Set 4 : Tests modified as per feedback and code comments added #

Total comments: 21

Patch Set 5 : Made changes to tests as per feedback #

Patch Set 6 : feedback incorporated #

Total comments: 2

Patch Set 7 : Applied patch on latest from origin/master, review comments #

Total comments: 6

Patch Set 8 : formatting feedback on last patch, evictAllResources added in all tests #

Patch Set 9 : Resolved conflicts with latest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -130 lines) Patch
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -16 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script-expected.txt View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html View 1 2 3 4 5 6 7 8 1 chunk +59 lines, -53 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -6 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type.html View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -22 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type-expected.txt View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/loading/resources/js-loaded.js View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchContext.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchContext.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 3 chunks +20 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -9 lines 0 comments Download

Messages

Total messages: 35 (10 generated)
shivanisha
4 years, 8 months ago (2016-04-01 13:45:33 UTC) #3
shivanisha
On 2016/04/01 at 13:45:33, shivanisha wrote: > Tested this change for the following example URLs: ...
4 years, 8 months ago (2016-04-01 15:03:32 UTC) #6
jkarlin
This is looking good. A few comments. I'd really like to see layout tests in ...
4 years, 8 months ago (2016-04-01 15:23:36 UTC) #7
shivanisha
https://codereview.chromium.org/1849223002/diff/1/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1849223002/diff/1/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode213 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:213: const bool isInDocumentWrite = m_document && m_document->isInDocumentWrite(); On 2016/04/01 ...
4 years, 8 months ago (2016-04-01 16:15:14 UTC) #8
shivanisha
Added tests and review comments incorporated https://codereview.chromium.org/1849223002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcher.h File third_party/WebKit/Source/core/fetch/ResourceFetcher.h (right): https://codereview.chromium.org/1849223002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcher.h#newcode167 third_party/WebKit/Source/core/fetch/ResourceFetcher.h:167: void initializeResourceRequest(ResourceRequest&, Resource::Type, ...
4 years, 8 months ago (2016-04-04 19:18:55 UTC) #9
Bryan McQuade
Looks good, and thanks for adding the layout tests! I have a few suggestions for ...
4 years, 8 months ago (2016-04-05 12:46:11 UTC) #10
shivanisha
https://codereview.chromium.org/1849223002/diff/40001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html (right): https://codereview.chromium.org/1849223002/diff/40001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html#newcode5 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html:5: var t = async_test('Makes sure synchronous third-party scripts in ...
4 years, 8 months ago (2016-04-05 20:37:14 UTC) #11
Bryan McQuade
Great, thanks for this! Change basically looks good to me - just a few small ...
4 years, 8 months ago (2016-04-06 12:37:21 UTC) #12
shivanisha
https://codereview.chromium.org/1849223002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html (right): https://codereview.chromium.org/1849223002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html#newcode6 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html:6: var loadsuccess = false; On 2016/04/06 at 12:37:21, Bryan ...
4 years, 8 months ago (2016-04-06 14:18:37 UTC) #13
Bryan McQuade
Great, lgtm, thanks for this change! This still needs review from Nate and Josh.
4 years, 8 months ago (2016-04-06 14:49:29 UTC) #14
jkarlin
https://codereview.chromium.org/1849223002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html (right): https://codereview.chromium.org/1849223002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html#newcode1 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block1.html:1: <!DOCTYPE html> instead of ...-block1.html, how about ...-block-third-party.html so ...
4 years, 8 months ago (2016-04-06 14:55:32 UTC) #15
shivanisha
Incorporated Josh's feedback. I am looking into why blocking of sync third-party assert has stopped ...
4 years, 8 months ago (2016-04-06 20:40:10 UTC) #16
Bryan McQuade
On 2016/04/06 at 20:40:10, shivanisha wrote: > Incorporated Josh's feedback. > > I am looking ...
4 years, 8 months ago (2016-04-06 20:46:37 UTC) #17
shivanisha
I am running the test doc-write-sync-third-party-script-block.html in isolation. python Tools/Scripts/run-webkit-tests -t Default LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html hopefully the ...
4 years, 8 months ago (2016-04-06 20:52:52 UTC) #18
Nate Chapin
lgtm https://codereview.chromium.org/1849223002/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1849223002/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode209 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:209: const bool disallowFetchForDocWriteScripts = frame()->settings() && frame()->settings()->disallowFetchForDocWrittenScriptsInMainFrame(); Why ...
4 years, 8 months ago (2016-04-07 16:25:48 UTC) #19
shivanisha
https://codereview.chromium.org/1849223002/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1849223002/diff/100001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode209 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:209: const bool disallowFetchForDocWriteScripts = frame()->settings() && frame()->settings()->disallowFetchForDocWrittenScriptsInMainFrame(); On 2016/04/07 ...
4 years, 8 months ago (2016-04-08 14:54:32 UTC) #20
jkarlin
lgtm with nits https://codereview.chromium.org/1849223002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html (right): https://codereview.chromium.org/1849223002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html#newcode9 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html:9: if (window.internals){ space between ) and ...
4 years, 8 months ago (2016-04-08 17:17:59 UTC) #21
shivanisha
https://codereview.chromium.org/1849223002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html (right): https://codereview.chromium.org/1849223002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html#newcode9 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-async-third-party-script.html:9: if (window.internals){ On 2016/04/08 at 17:17:59, jkarlin wrote: > ...
4 years, 8 months ago (2016-04-08 18:41:11 UTC) #22
jkarlin
slgtm
4 years, 8 months ago (2016-04-08 18:44:27 UTC) #23
shivanisha
On 2016/04/08 at 18:44:27, jkarlin wrote: > slgtm Thanks! Waiting for https://codereview.chromium.org/1863413005 to land before ...
4 years, 8 months ago (2016-04-08 19:44:31 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1849223002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1849223002/140001
4 years, 8 months ago (2016-04-08 20:06:43 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/184701) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-08 20:08:43 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1849223002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1849223002/160001
4 years, 8 months ago (2016-04-08 21:05:37 UTC) #32
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 8 months ago (2016-04-08 22:08:13 UTC) #33
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 22:10:06 UTC) #35
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f907a5fb93cf183c0a3f9529ede284af8f06874c
Cr-Commit-Position: refs/heads/master@{#386219}

Powered by Google App Engine
This is Rietveld 408576698