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

Issue 1883873002: Do not block document.written scripts in page reloads (Closed)

Created:
4 years, 8 months ago by shivanisha
Modified:
4 years, 8 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_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

To reduce the possibility of a page break by blocking a document.written script,this patch includes a check that if the user is reloading the same page then do not consider the document.written scripts on this page for blocking. BUG=602644 Committed: https://crrev.com/f6ea16af4915e7080af6ca022363e75d8d9b05f9 Cr-Commit-Position: refs/heads/master@{#389480}

Patch Set 1 #

Patch Set 2 : test modifications to include the blink setting for slow connections #

Total comments: 2

Patch Set 3 : corrected if condition #

Total comments: 10

Patch Set 4 : Feedback incorporated #

Total comments: 9

Patch Set 5 : Simplified tests, Used js-loaded with a different query parameter than other tests. #

Total comments: 4

Patch Set 6 : Feedback incorporated. #

Total comments: 14

Patch Set 7 : Feedback incorporated. #

Total comments: 15

Patch Set 8 : Feedback incorporated. #

Total comments: 16

Patch Set 9 : Removed comments from test and added spaces between parameters. #

Total comments: 3

Messages

Total messages: 35 (6 generated)
shivanisha
4 years, 8 months ago (2016-04-13 15:46:02 UTC) #2
shivanisha
https://codereview.chromium.org/1883873002/diff/20001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1883873002/diff/20001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode100 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:100: There is also a FrameLoadType value: FrameLoadTypeSame which implies ...
4 years, 8 months ago (2016-04-13 15:56:58 UTC) #3
shivanisha
https://codereview.chromium.org/1883873002/diff/20001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1883873002/diff/20001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode90 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:90: if (document.frame()) Changing this to if (!document.frame())
4 years, 8 months ago (2016-04-13 16:52:17 UTC) #4
jkarlin
https://codereview.chromium.org/1883873002/diff/40001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-no-cache.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-no-cache.html (right): https://codereview.chromium.org/1883873002/diff/40001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-no-cache.html#newcode28 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-no-cache.html:28: document.write('<scr' + 'ipt src="' + src + '" onload="loadSuccess=true" ...
4 years, 8 months ago (2016-04-13 18:38:36 UTC) #5
shivanisha
Incorporated review comments. Thanks to Josh's feedback of adding a local storage value to determine ...
4 years, 8 months ago (2016-04-14 17:59:56 UTC) #6
jkarlin
Likely the tests are running in parallel but writing to the same cache-storage object. Give ...
4 years, 8 months ago (2016-04-14 18:15:05 UTC) #7
jkarlin
https://codereview.chromium.org/1883873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/resources/testreload.js File third_party/WebKit/LayoutTests/http/tests/loading/resources/testreload.js (right): https://codereview.chromium.org/1883873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/resources/testreload.js#newcode1 third_party/WebKit/LayoutTests/http/tests/loading/resources/testreload.js:1: // This script sets the flags for blocking doc.write ...
4 years, 8 months ago (2016-04-14 18:24:39 UTC) #8
jkarlin
https://codereview.chromium.org/1883873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/60001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode7 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:7: var reloadFromCache = false; Instead, how about wrapping the ...
4 years, 8 months ago (2016-04-14 18:27:01 UTC) #9
shivanisha
Simplified tests to be in 1 file. Also used a different query parameter than other ...
4 years, 8 months ago (2016-04-14 19:15:45 UTC) #10
jkarlin
Looks good! Only a couple of comments. https://codereview.chromium.org/1883873002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js File third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js (right): https://codereview.chromium.org/1883873002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js#newcode3 third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js:3: Now that ...
4 years, 8 months ago (2016-04-15 11:21:27 UTC) #11
shivanisha
https://codereview.chromium.org/1883873002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js File third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js (right): https://codereview.chromium.org/1883873002/diff/80001/third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js#newcode3 third_party/WebKit/LayoutTests/http/tests/loading/resources/test-reload.js:3: On 2016/04/15 at 11:21:26, jkarlin wrote: > Now that ...
4 years, 8 months ago (2016-04-15 16:37:31 UTC) #12
Bryan McQuade
lgtm
4 years, 8 months ago (2016-04-18 12:34:07 UTC) #13
jkarlin
https://codereview.chromium.org/1883873002/diff/100001/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/1883873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html#newcode53 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html:53: var filePath = '/loading/resources/js-loaded.js'; For consistency, it seems this ...
4 years, 8 months ago (2016-04-18 14:00:43 UTC) #16
shivanisha
https://codereview.chromium.org/1883873002/diff/100001/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/1883873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html#newcode53 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html:53: var filePath = '/loading/resources/js-loaded.js'; On 2016/04/18 at 14:00:43, jkarlin ...
4 years, 8 months ago (2016-04-18 17:03:38 UTC) #17
shivanisha
https://codereview.chromium.org/1883873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/100001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode50 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:50: window.localStorage.setItem("blocked-on-first-load", "true") On 2016/04/18 at 14:00:43, jkarlin wrote: > ...
4 years, 8 months ago (2016-04-18 17:20:51 UTC) #18
jkarlin
Thanks, just a few more! https://codereview.chromium.org/1883873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode7 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:7: This script won't work ...
4 years, 8 months ago (2016-04-18 17:42:27 UTC) #19
jkarlin
https://codereview.chromium.org/1883873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode62 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:62: else if (succCount == 1) { On 2016/04/18 17:42:26, ...
4 years, 8 months ago (2016-04-18 17:43:38 UTC) #20
shivanisha
https://codereview.chromium.org/1883873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/120001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode7 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:7: On 2016/04/18 at 17:42:27, jkarlin wrote: > This script ...
4 years, 8 months ago (2016-04-18 19:33:43 UTC) #21
jkarlin
lgtm with comments https://codereview.chromium.org/1883873002/diff/140001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/140001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode51 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:51: assert_equals(+window.localStorage.getItem("errorCount"),1,"errorCount is not one"); What does ...
4 years, 8 months ago (2016-04-19 11:00:35 UTC) #22
jkarlin
https://codereview.chromium.org/1883873002/diff/140001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/140001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode51 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:51: assert_equals(+window.localStorage.getItem("errorCount"),1,"errorCount is not one"); no need for the comment ...
4 years, 8 months ago (2016-04-19 14:23:59 UTC) #23
shivanisha
Thanks! Modified the reload test as per feedback. https://codereview.chromium.org/1883873002/diff/140001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html File third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html (right): https://codereview.chromium.org/1883873002/diff/140001/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html#newcode51 third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload.html:51: assert_equals(+window.localStorage.getItem("errorCount"),1,"errorCount ...
4 years, 8 months ago (2016-04-20 14:14:01 UTC) #24
Bryan McQuade
LGTM. one question but it's up to you how you want to handle it. if ...
4 years, 8 months ago (2016-04-21 20:54:42 UTC) #25
shivanisha
https://codereview.chromium.org/1883873002/diff/160001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1883873002/diff/160001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode96 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:96: const FrameLoadType loadType = document.frame()->loader().loadType(); If the only purpose ...
4 years, 8 months ago (2016-04-22 15:35:34 UTC) #26
jkarlin
https://codereview.chromium.org/1883873002/diff/160001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/1883873002/diff/160001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode96 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:96: const FrameLoadType loadType = document.frame()->loader().loadType(); On 2016/04/22 15:35:34, shivanisha ...
4 years, 8 months ago (2016-04-22 15:44:47 UTC) #27
shivanisha
Nate: PTAL, thanks!
4 years, 8 months ago (2016-04-22 16:47:33 UTC) #28
Nate Chapin
lgtm
4 years, 8 months ago (2016-04-22 20:55:39 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1883873002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1883873002/160001
4 years, 8 months ago (2016-04-25 13:49:14 UTC) #32
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 8 months ago (2016-04-25 15:22:07 UTC) #33
commit-bot: I haz the power
4 years, 8 months ago (2016-04-25 15:23:50 UTC) #35
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/f6ea16af4915e7080af6ca022363e75d8d9b05f9
Cr-Commit-Position: refs/heads/master@{#389480}

Powered by Google App Engine
This is Rietveld 408576698