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

Issue 384993004: Simplify WebNavigationApi by using RenderFrameHost internally. (Closed)

Created:
6 years, 5 months ago by dcheng
Modified:
6 years, 5 months ago
CC:
chromium-apps-reviews_chromium.org, chromium-reviews, extensions-reviews_chromium.org, site-isolation-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

Simplify WebNavigationApi by using RenderFrameHost internally. WebNavigationApi formerly passed around a lot of redundant state, but now it just uses RenderFrameHost. Code that needs to know the routing ID, parent, etc can just derive it from the RenderFrameHost. Since WebNavigationApi is storing raw pointers to RenderFrameHost, it also observers RFH deletions and removes them as needed. This fixes some use-after-frees when other observers are incorrectly causing the RenderFrameHost to be destroyed. BUG=391058 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283336

Patch Set 1 #

Patch Set 2 : it works! #

Patch Set 3 : Fix tests too #

Patch Set 4 : Revert WebRequest changes mostly since they run on the IO thread #

Patch Set 5 : Revert formatting too #

Total comments: 22

Patch Set 6 : Address review comments #

Patch Set 7 : Remove troublesome DCHECKs #

Messages

Total messages: 9 (0 generated)
dcheng
Note this probably collides/overlaps in functionality with https://codereview.chromium.org/380213003. Please let me know how you'd like ...
6 years, 5 months ago (2014-07-12 00:28:58 UTC) #1
jochen (gone - plz use gerrit)
lgtm please at least add all the NOTREACHED() for cases where we pass a render ...
6 years, 5 months ago (2014-07-14 09:38:36 UTC) #2
dcheng
Note that I ended up just removing the WebContentsObserver::FrameDetached override and moved the implementation completely ...
6 years, 5 months ago (2014-07-14 20:12:56 UTC) #3
Matt Perry
lgtm
6 years, 5 months ago (2014-07-14 20:31:37 UTC) #4
dcheng
Another update: it turns out the DCHECKs in FrameNavigationState::FrameDetached fire a lot in various browser ...
6 years, 5 months ago (2014-07-15 04:13:11 UTC) #5
jochen (gone - plz use gerrit)
removing the DCHECKs from FrameNavigationState::FrameDetached() only lgtm
6 years, 5 months ago (2014-07-15 11:40:41 UTC) #6
dcheng
The CQ bit was checked by dcheng@chromium.org
6 years, 5 months ago (2014-07-15 18:01:29 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dcheng@chromium.org/384993004/120001
6 years, 5 months ago (2014-07-15 18:06:36 UTC) #8
commit-bot: I haz the power
6 years, 5 months ago (2014-07-16 04:43:30 UTC) #9
Message was sent while issue was closed.
Change committed as 283336

Powered by Google App Engine
This is Rietveld 408576698