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

Issue 684143002: Invalidate the previous frame when the window object is cleared. (Closed)

Created:
6 years, 1 month ago by robwu
Modified:
6 years, 1 month ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Invalidate the previous frame when the window object is cleared. When a javascript:-URLs is loaded and returns a non-void value, then Blink replaces the previously loaded document with the result, which replaces the existing document and view. These events do not trigger any document load notifications, which resulted in an invalid frame-> content script mapping. This patch resolves this problem by invalidating the previous frame when the document is created instead of at provisional load). This patch depends on https://codereview.chromium.org/710443002. BUG=416907 R=kalman@chromium.org Committed: https://crrev.com/5ef11ff1b68256eb46ce90f5f14a7bd8cacb51a8 Cr-Commit-Position: refs/heads/master@{#304522}

Patch Set 1 #

Total comments: 4

Patch Set 2 : add missing files + tests #

Total comments: 4

Patch Set 3 : Nits + make sure that we test what we want (javascript:'' iframe) #

Patch Set 4 : rebase #

Patch Set 5 : Use RenderViewObserver::WillReleaseScriptContext #

Total comments: 1

Patch Set 6 : Use didCreateNewDocument notification #

Total comments: 2

Patch Set 7 : rebase #

Patch Set 8 : DCHECK_EQ(frame_, frame) #

Patch Set 9 : Only invalidate at DidCreateNewDocument if the frame is known #

Patch Set 10 : DCHECK_EQ(frame_, frame) -> DCHECK again #

Total comments: 1

Messages

Total messages: 51 (9 generated)
robwu
6 years, 1 month ago (2014-10-29 11:25:50 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/684143002/diff/1/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json File chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json (right): https://codereview.chromium.org/684143002/diff/1/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json#newcode34 chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json:34: "js": ["end.js"], Am I missing something? where is start.js ...
6 years, 1 month ago (2014-10-29 17:36:04 UTC) #2
robwu
https://codereview.chromium.org/684143002/diff/1/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json File chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json (right): https://codereview.chromium.org/684143002/diff/1/chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json#newcode34 chrome/test/data/extensions/api_test/content_scripts/about_blank_iframes/manifest.json:34: "js": ["end.js"], On 2014/10/29 17:36:04, kalman wrote: > Am ...
6 years, 1 month ago (2014-10-29 18:43:12 UTC) #3
not at google - send to devlin
Looks fine I guess, but does the test you added actually fail without the patch? ...
6 years, 1 month ago (2014-10-29 19:27:27 UTC) #4
robwu
On 2014/10/29 19:27:27, kalman wrote: > Looks fine I guess, but does the test you ...
6 years, 1 month ago (2014-10-29 21:19:48 UTC) #6
not at google - send to devlin
lgtm
6 years, 1 month ago (2014-10-29 21:22:25 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684143002/60001
6 years, 1 month ago (2014-10-29 21:24:02 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel/builds/6683) linux_chromium_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel/builds/4751)
6 years, 1 month ago (2014-10-29 22:50:13 UTC) #11
robwu
On 2014/10/29 22:50:13, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 1 month ago (2014-10-30 00:14:09 UTC) #12
not at google - send to devlin
Dealing with script contexts isn't right either. Are there not other methods on RenderViewOberver which ...
6 years, 1 month ago (2014-10-30 00:20:57 UTC) #13
robwu
On 2014/10/30 00:20:57, kalman wrote: > Dealing with script contexts isn't right either. Are there ...
6 years, 1 month ago (2014-10-30 00:34:58 UTC) #14
not at google - send to devlin
I'll think through your comments tomorrow, but +creis on the OOP issue.
6 years, 1 month ago (2014-10-30 00:40:05 UTC) #16
not at google - send to devlin
On 2014/10/30 00:34:58, robwu wrote: > On 2014/10/30 00:20:57, kalman wrote: > > Dealing with ...
6 years, 1 month ago (2014-10-30 14:57:43 UTC) #17
Charlie Reis
[+japhet,dcheng for Blink question] On 2014/10/30 14:57:43, kalman wrote: > On 2014/10/30 00:34:58, robwu wrote: ...
6 years, 1 month ago (2014-10-30 18:38:10 UTC) #19
dcheng
"These events do not trigger any document load notifications" Nate, will your load refactoring stuff ...
6 years, 1 month ago (2014-10-30 21:48:56 UTC) #20
Nate Chapin
On 2014/10/30 21:48:56, dcheng wrote: > "These events do not trigger any document load notifications" ...
6 years, 1 month ago (2014-10-30 22:09:41 UTC) #21
robwu
On 2014/10/30 14:57:43, kalman wrote: > On 2014/10/30 00:34:58, robwu wrote: > > On 2014/10/30 ...
6 years, 1 month ago (2014-10-30 22:15:06 UTC) #22
not at google - send to devlin
You just need to be careful because script lifetime != frame lifetime, and the invalidation ...
6 years, 1 month ago (2014-10-30 22:19:46 UTC) #23
robwu
Is ScriptInjectionManager designed using the assumption that every frame is within the same renderer process? ...
6 years, 1 month ago (2014-11-01 00:15:09 UTC) #24
dcheng
On 2014/11/01 at 00:15:09, rob wrote: > Is ScriptInjectionManager designed using the assumption that every ...
6 years, 1 month ago (2014-11-01 00:19:57 UTC) #25
robwu
On 2014/11/01 00:19:57, dcheng wrote: > Before you do this conversion, I still don't understand ...
6 years, 1 month ago (2014-11-01 00:29:04 UTC) #26
robwu
+jam In this CL, I added the WillReleaseScriptContext notification to RenderViewObserver, because I need this ...
6 years, 1 month ago (2014-11-04 17:00:06 UTC) #28
dcheng
Do we still need to call InvalidateFrame in DidStartProvisionalLoad with this change? It seems redundant ...
6 years, 1 month ago (2014-11-04 22:40:45 UTC) #29
robwu
On 2014/11/04 22:40:45, dcheng wrote: > Do we still need to call InvalidateFrame in DidStartProvisionalLoad ...
6 years, 1 month ago (2014-11-04 22:46:42 UTC) #30
jam
content lgtm
6 years, 1 month ago (2014-11-06 03:13:25 UTC) #31
dcheng
On 2014/11/06 03:13:25, jam wrote: > content lgtm It still feels unfortunate: having this here ...
6 years, 1 month ago (2014-11-06 03:20:15 UTC) #32
robwu
On 2014/11/06 03:20:15, dcheng wrote: > On 2014/11/06 03:13:25, jam wrote: > > content lgtm ...
6 years, 1 month ago (2014-11-06 15:00:45 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684143002/120001
6 years, 1 month ago (2014-11-11 14:48:29 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/4647) win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel/builds/11695)
6 years, 1 month ago (2014-11-11 15:45:06 UTC) #37
dcheng
https://codereview.chromium.org/684143002/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/684143002/diff/120001/content/renderer/render_frame_impl.cc#newcode2361 content/renderer/render_frame_impl.cc:2361: DCHECK(!frame_ || frame_ == frame); This assert should be ...
6 years, 1 month ago (2014-11-11 16:50:16 UTC) #38
robwu
https://codereview.chromium.org/684143002/diff/120001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/684143002/diff/120001/content/renderer/render_frame_impl.cc#newcode2361 content/renderer/render_frame_impl.cc:2361: DCHECK(!frame_ || frame_ == frame); On 2014/11/11 16:50:16, dcheng ...
6 years, 1 month ago (2014-11-11 21:43:59 UTC) #39
dcheng
On 2014/11/11 at 21:43:59, rob wrote: > https://codereview.chromium.org/684143002/diff/120001/content/renderer/render_frame_impl.cc > File content/renderer/render_frame_impl.cc (right): > > https://codereview.chromium.org/684143002/diff/120001/content/renderer/render_frame_impl.cc#newcode2361 ...
6 years, 1 month ago (2014-11-11 22:07:02 UTC) #40
robwu
On 2014/11/11 22:07:02, dcheng wrote: > I'm saying that the check should be: > DCHECK(frame_ ...
6 years, 1 month ago (2014-11-11 22:26:30 UTC) #41
dcheng
On 2014/11/11 at 22:26:30, rob wrote: > On 2014/11/11 22:07:02, dcheng wrote: > > I'm ...
6 years, 1 month ago (2014-11-11 22:28:45 UTC) #42
robwu
kalman: Do you approve of patch set 9? This change is needed because calling chrome.tabs.update({url: ...
6 years, 1 month ago (2014-11-15 00:48:42 UTC) #43
robwu
On 2014/11/11 22:28:45, dcheng wrote: > On 2014/11/11 at 22:26:30, rob wrote: > > On ...
6 years, 1 month ago (2014-11-15 10:04:17 UTC) #44
not at google - send to devlin
lgtm https://codereview.chromium.org/684143002/diff/200001/extensions/renderer/script_injection_manager.cc File extensions/renderer/script_injection_manager.cc (right): https://codereview.chromium.org/684143002/diff/200001/extensions/renderer/script_injection_manager.cc#newcode110 extensions/renderer/script_injection_manager.cc:110: InvalidateFrame(frame); Let's just call InvalidateFrame(frame) and forget about ...
6 years, 1 month ago (2014-11-17 22:20:05 UTC) #45
not at google - send to devlin
(when dcheng is happy)
6 years, 1 month ago (2014-11-17 22:20:17 UTC) #46
dcheng
On 2014/11/17 at 22:20:17, kalman wrote: > (when dcheng is happy) Given that the DCHECK ...
6 years, 1 month ago (2014-11-17 22:28:20 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684143002/200001
6 years, 1 month ago (2014-11-17 22:37:28 UTC) #49
commit-bot: I haz the power
Committed patchset #10 (id:200001)
6 years, 1 month ago (2014-11-17 23:56:32 UTC) #50
commit-bot: I haz the power
6 years, 1 month ago (2014-11-17 23:57:32 UTC) #51
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/5ef11ff1b68256eb46ce90f5f14a7bd8cacb51a8
Cr-Commit-Position: refs/heads/master@{#304522}

Powered by Google App Engine
This is Rietveld 408576698