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

Issue 2440803002: Filter out data urls in the preload scanner (Closed)

Created:
4 years, 2 months ago by Charlie Harrison
Modified:
4 years, 1 month ago
Reviewers:
Yoav Weiss
CC:
chromium-reviews, blink-reviews-html_chromium.org, loading-reviews+parser_chromium.org, dglazkov+blink, blink-reviews, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Filter out data urls in the preload scanner Previously, we happily constructed PreloadRequests with data URLs, only to cancel them once they reached the HTMLResourcePreloader. This entails a whole song and dance including copying the resource url. Since data URLs are huge this is not ideal. BUG=657978 Committed: https://crrev.com/ac38e9cdd60cf37902e040d78f8749b0e35c52a5 Cr-Commit-Position: refs/heads/master@{#427349}

Patch Set 1 #

Patch Set 2 : also block ref urls #

Total comments: 1

Patch Set 3 : fix up #

Total comments: 9

Patch Set 4 : yoav comments #

Total comments: 9

Patch Set 5 : nits and test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -15 lines) Patch
M third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp View 1 2 3 4 1 chunk +6 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp View 1 chunk +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLResourcePreloaderTest.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/PreloadRequest.h View 1 2 3 2 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 34 (20 generated)
Charlie Harrison
Yoav, am I missing something here? When could a base url override result in a ...
4 years, 2 months ago (2016-10-20 20:37:32 UTC) #4
Yoav Weiss
On 2016/10/20 20:37:32, Charlie Harrison wrote: > Yoav, am I missing something here? When could ...
4 years, 2 months ago (2016-10-21 15:31:59 UTC) #7
Charlie Harrison
Actually, some of the test failures are related. Mostly the DCHECK I added is triggering. ...
4 years, 2 months ago (2016-10-21 15:48:06 UTC) #8
Charlie Harrison
So it looks like we're making preload requests for ref urls (i.e. src="#") which parse ...
4 years, 2 months ago (2016-10-21 21:38:55 UTC) #11
Charlie Harrison
Yoav, would you mind taking another looks, since the implementation has changed a bit since ...
4 years, 1 month ago (2016-10-24 14:28:29 UTC) #16
Yoav Weiss
https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (left): https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#oldcode234 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:234: if (!url.isEmpty()) { Why create a request for empty ...
4 years, 1 month ago (2016-10-24 14:43:54 UTC) #17
Charlie Harrison
Thanks https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (left): https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#oldcode234 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:234: if (!url.isEmpty()) { On 2016/10/24 14:43:54, Yoav Weiss ...
4 years, 1 month ago (2016-10-24 14:49:31 UTC) #18
Yoav Weiss
https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (left): https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#oldcode234 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:234: if (!url.isEmpty()) { On 2016/10/24 14:49:31, Charlie Harrison wrote: ...
4 years, 1 month ago (2016-10-24 15:00:32 UTC) #19
Charlie Harrison
Addressed all comments. PTAL thanks! https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/PreloadRequest.h File third_party/WebKit/Source/core/html/parser/PreloadRequest.h (left): https://codereview.chromium.org/2440803002/diff/40001/third_party/WebKit/Source/core/html/parser/PreloadRequest.h#oldcode33 third_party/WebKit/Source/core/html/parser/PreloadRequest.h:33: static std::unique_ptr<PreloadRequest> create( On ...
4 years, 1 month ago (2016-10-24 17:39:48 UTC) #23
Yoav Weiss
LGTM % nits and test case Can you add a test to HTMLPreloadScannerTest to see ...
4 years, 1 month ago (2016-10-25 04:34:14 UTC) #27
Charlie Harrison
Thanks for the reviews! https://codereview.chromium.org/2440803002/diff/60001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (right): https://codereview.chromium.org/2440803002/diff/60001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#newcode236 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:236: std::unique_ptr<PreloadRequest> request = PreloadRequest::createIfNeeded( On ...
4 years, 1 month ago (2016-10-25 13:32:48 UTC) #28
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/2440803002/80001
4 years, 1 month ago (2016-10-25 13:33:12 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-10-25 14:47:54 UTC) #32
commit-bot: I haz the power
4 years, 1 month ago (2016-10-25 14:51:52 UTC) #34
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ac38e9cdd60cf37902e040d78f8749b0e35c52a5
Cr-Commit-Position: refs/heads/master@{#427349}

Powered by Google App Engine
This is Rietveld 408576698