New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 639401 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature

Blocking:
issue 640844



Sign in to add a comment

Send a low priority GET request for doc.written blocked scripts

Project Member Reported by shivanisha@chromium.org, Aug 19 2016

Issue description

Send a low priority GET request for doc.written blocked scripts with an interventions header. This will allow the third party server to know about the intervention and also fill the resource in the http cache for subsequent uses.

See https://github.com/WICG/interventions/issues/17#issuecomment-238477265
 
Summary: Send a low priority GET request for doc.written blocked scripts (was: Send an low priority GET request for doc.written blocked scripts)
Description: Show this description
Description: Show this description
Cc: kenjibaheux@chromium.org bmcquade@chromium.org jkarlin@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57536eaf61f21cb9f6e351663ef75c3d6e09d705

commit 57536eaf61f21cb9f6e351663ef75c3d6e09d705
Author: shivanisha <shivanisha@chromium.org>
Date: Mon Sep 19 16:18:47 2016

Sending an async GET request for doc.written blocked scripts.
BUG= 639401 

While fetching the original request, ScriptLoader sets a member flag.
On receiving notifyFinished for the original request, HTMLScriptRunner
creates a new ScriptLoader instance using the original Element with
another flag set to true. It then calls ScriptLoader::prepareScript which
further calls fetchScript. prepareScript sets the defer flag as LazyLoad and
fetchScript sets the intervention info and header in the resource request.
The intervention info is used to set the priority in ResourceFetcher::requestResource.

This CL also adds a link in the dev tools console warning.

Also added internals.getResourcePriority() for
the layout test to test that the new request goes out with priority very low.

The code was tested using netlog to verify the second request is sent and has
the correct priority (net::IDLE).
One of the example sites created by jkarlin@ is:
http://www.karlin.me/test/docwrite/

Review-Url: https://codereview.chromium.org/2260303002
Cr-Commit-Position: refs/heads/master@{#419476}

[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-all-conn-types-expected.txt
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block-expected.txt
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-block.html
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-conn-type-expected.txt
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/LayoutTests/http/tests/loading/doc-write-sync-third-party-script-reload-expected.txt
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/dom/ScriptLoader.h
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/fetch/FetchRequest.h
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/testing/Internals.h
[modify] https://crrev.com/57536eaf61f21cb9f6e351663ef75c3d6e09d705/third_party/WebKit/Source/core/testing/Internals.idl

Status: Fixed (was: Started)
Blocking: 640844

Sign in to add a comment