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

Issue 99283: Add a BeforeDestroyFrame notification method to WebViewDelegate (Closed)

Created:
11 years, 7 months ago by Marshall Greenblatt
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

There are cases where a Frame may outlive its associated Page. Get the WebViewImpl by accessing it indirectly through the Frame's Page so that we don't have to worry about cleaning up the WebFrameImpl -> WebViewImpl pointer. WebCore already clears the Frame's Page pointer when the Page is destroyed by the WebViewImpl.

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -63 lines) Patch
M webkit/glue/webframe_impl.h View 5 6 7 8 2 chunks +1 line, -6 lines 0 comments Download
M webkit/glue/webframe_impl.cc View 7 8 14 chunks +29 lines, -16 lines 0 comments Download
M webkit/glue/webframeloaderclient_impl.cc View 1 2 3 4 5 6 7 8 31 chunks +38 lines, -37 lines 0 comments Download
M webkit/glue/webplugin_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webkit/glue/webview_impl.cc View 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/webworkerclient_impl.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (0 generated)
Marshall Greenblatt
Please review this patch.
11 years, 7 months ago (2009-05-01 17:41:05 UTC) #1
Aaron Boodman
On 2009/05/01 17:41:05, Marshall Greenblatt wrote: > Please review this patch. LGTM, but waiting for ...
11 years, 7 months ago (2009-05-01 18:34:25 UTC) #2
darin (slow to review)
http://codereview.chromium.org/99283/diff/5/1005 File webkit/glue/webview_delegate.h (right): http://codereview.chromium.org/99283/diff/5/1005#newcode192 Line 192: virtual void BeforeDestroyFrame(WebFrame* webframe) { I think this ...
11 years, 7 months ago (2009-05-04 17:03:39 UTC) #3
Marshall Greenblatt
Changed BeforeDestroyFrame() to WillDestroyFrame(). Please review.
11 years, 7 months ago (2009-05-04 17:11:34 UTC) #4
darin (slow to review)
LGTM
11 years, 7 months ago (2009-05-04 17:48:12 UTC) #5
darin (slow to review)
Committed as: http://src.chromium.org/viewvc/chrome?view=rev&revision=15223
11 years, 7 months ago (2009-05-04 17:53:34 UTC) #6
darin (slow to review)
Reverted as r15230 since it looks like this might explain the new CRASH of http/tests/security/aboutBlank/security-context-with-base-tag.html ...
11 years, 7 months ago (2009-05-04 18:50:30 UTC) #7
Marshall Greenblatt
On 2009/05/04 18:50:30, darin wrote: > Reverted as r15230 since it looks like this might ...
11 years, 7 months ago (2009-05-04 19:05:28 UTC) #8
Marshall Greenblatt
The crash was due to the WebViewImpl object being destroyed before the attached WebFrameImpl objects ...
11 years, 7 months ago (2009-05-05 17:05:28 UTC) #9
darin (slow to review)
Question: This solution means that the WebViewDelegate will not get notified for some frames. Won't ...
11 years, 7 months ago (2009-05-05 17:19:57 UTC) #10
darin (slow to review)
Also, I wonder why it is possible for a WebViewImpl to die before its frames. ...
11 years, 7 months ago (2009-05-05 17:20:31 UTC) #11
Marshall Greenblatt
On 2009/05/05 17:19:57, darin wrote: > Question: This solution means that the WebViewDelegate will not ...
11 years, 7 months ago (2009-05-05 17:53:15 UTC) #12
Marshall Greenblatt
On 2009/05/05 17:53:15, Marshall Greenblatt wrote: > On 2009/05/05 17:19:57, darin wrote: > > Question: ...
11 years, 7 months ago (2009-05-05 17:58:57 UTC) #13
Marshall Greenblatt
On 2009/05/05 17:20:31, darin wrote: > Also, I wonder why it is possible for a ...
11 years, 7 months ago (2009-05-05 18:16:02 UTC) #14
darin (slow to review)
OK, yeah... I think there are definitely cases where a Frame may outlive its associated ...
11 years, 7 months ago (2009-05-05 18:19:30 UTC) #15
Marshall Greenblatt
I've made the change that Darin suggested to retrieve the WebViewImpl pointer via the Page. ...
11 years, 7 months ago (2009-05-05 21:06:13 UTC) #16
darin (slow to review)
I think trying to keep the WebViewDelegate alive past the lifetime of the WebView is ...
11 years, 7 months ago (2009-05-05 21:37:38 UTC) #17
Marshall Greenblatt
The patch has been updated for just the WebFrameImpl -> WebViewImpl pointer changes. In WebFrameLoaderClient ...
11 years, 7 months ago (2009-05-06 18:51:59 UTC) #18
darin (slow to review)
LGTM I agree that it would be nice to be consistent with the null checking. ...
11 years, 7 months ago (2009-05-06 20:31:09 UTC) #19
Marshall Greenblatt
On 2009/05/06 20:31:09, darin wrote: > LGTM > > I agree that it would be ...
11 years, 7 months ago (2009-05-06 20:56:18 UTC) #20
darin (slow to review)
11 years, 7 months ago (2009-05-06 21:08:47 UTC) #21
Committed as r15458

Powered by Google App Engine
This is Rietveld 408576698