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

Issue 2465813002: Fix content script injection for cancelled loads with PlzNavigate. (Closed)

Created:
4 years, 1 month ago by jam
Modified:
4 years, 1 month ago
Reviewers:
Devlin, Charlie Reis
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, Charlie Reis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix content script injection for cancelled loads with PlzNavigate. With PlzNavigate, the RenderFrame doesn't get OnFailedNavigation messages for requests that don't commit (204 & 205) or ones that turn into downloads. Content scripts code depend on getting this so that they can mark the initial about:blank as idle instead of begin state, otherwise content script injection never completes. The fix is to watch the OnStop message, since in these cases the navigation is always renderer initiated and the browser always sends that message to let it know that the loading stopped. This fixes ExecuteScriptApiTest.FrameWithHttp204 with PlzNavigate. BUG=504347 Committed: https://crrev.com/e24fafa52a1c44cb650444151493883906c75f50 Cr-Commit-Position: refs/heads/master@{#429031}

Patch Set 1 #

Total comments: 6

Patch Set 2 : simpler approach #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -0 lines) Patch
M extensions/renderer/script_injection_manager.cc View 1 4 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (19 generated)
jam
Charlie: content Devlin: the rest BTW I tried a few approaches to do this fix ...
4 years, 1 month ago (2016-10-31 16:35:34 UTC) #9
Charlie Reis
Interesting. What is it that content scripts need to do when a 204 occurs? Would ...
4 years, 1 month ago (2016-10-31 17:05:28 UTC) #10
Devlin
https://codereview.chromium.org/2465813002/diff/20001/extensions/common/extension_messages.h File extensions/common/extension_messages.h (right): https://codereview.chromium.org/2465813002/diff/20001/extensions/common/extension_messages.h#newcode625 extensions/common/extension_messages.h:625: IPC_MESSAGE_ROUTED0(ExtensionMsg_Set204Or205Error) On 2016/10/31 17:05:28, Charlie Reis wrote: > Again, ...
4 years, 1 month ago (2016-10-31 17:24:01 UTC) #11
Devlin
https://codereview.chromium.org/2465813002/diff/20001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (right): https://codereview.chromium.org/2465813002/diff/20001/extensions/renderer/script_injection_manager.cc#newcode239 extensions/renderer/script_injection_manager.cc:239: DidFailProvisionalLoad(blink::WebURLError()); On 2016/10/31 17:24:00, Devlin wrote: > In a ...
4 years, 1 month ago (2016-10-31 17:28:15 UTC) #12
jam
(moving Charlie to CC now with latest change, feel free to comment though) Devlin: ptal, ...
4 years, 1 month ago (2016-11-01 15:18:05 UTC) #19
Devlin
extensions lgtm assuming the test passes. On that note, should we be removing it from ...
4 years, 1 month ago (2016-11-01 16:27:20 UTC) #20
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/2465813002/40001
4 years, 1 month ago (2016-11-01 16:39:49 UTC) #23
jam
On 2016/11/01 16:27:20, Devlin wrote: > extensions lgtm assuming the test passes. On that note, ...
4 years, 1 month ago (2016-11-01 16:41:27 UTC) #24
Charlie Reis
Sounds reasonable, and I like that it requires less plumbing. LGTM.
4 years, 1 month ago (2016-11-01 16:42:06 UTC) #26
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 1 month ago (2016-11-01 17:21:59 UTC) #28
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 17:25:35 UTC) #30
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e24fafa52a1c44cb650444151493883906c75f50
Cr-Commit-Position: refs/heads/master@{#429031}

Powered by Google App Engine
This is Rietveld 408576698