WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
61311
REGRESSION (86992): World leak when all windows closed
https://bugs.webkit.org/show_bug.cgi?id=61311
Summary
REGRESSION (86992): World leak when all windows closed
Jer Noble
Reported
2011-05-23 14:50:51 PDT
REGRESSION (
r86990
:86992): World leak when all windows closed
Attachments
Patch
(4.33 KB, patch)
2011-05-23 14:57 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
Patch
(4.87 KB, patch)
2011-05-23 15:52 PDT
,
Jer Noble
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2011-05-23 14:57:04 PDT
Created
attachment 94495
[details]
Patch
Jer Noble
Comment 2
2011-05-23 14:57:24 PDT
<
rdar://problem/9486740
>
Jer Noble
Comment 3
2011-05-23 14:57:42 PDT
Caused by
http://trac.webkit.org/changeset/86992
.
Darin Adler
Comment 4
2011-05-23 15:03:08 PDT
Comment on
attachment 94495
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=94495&action=review
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:-141 > - [webView retain]; > - [_webView release];
Are you sure this is necessary? The way this cycle is broken is by calling setWebView:0. Can we leave out this change please? Does the world leak go away if you leave this in?
Jer Noble
Comment 5
2011-05-23 15:12:23 PDT
Comment on
attachment 94495
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=94495&action=review
>> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:-141 >> - [_webView release]; > > Are you sure this is necessary? The way this cycle is broken is by calling setWebView:0. Can we leave out this change please? Does the world leak go away if you leave this in?
I think either this, or the "_data->_fullScreenWindowController = nullptr;" change in [WKView closeFullScreenWindowController] would be sufficient to fix this leak. However, the retain-cycle would still be there, and there may still be an unfound leak because of it. For safety's sake, we could add a call in [WKView dealloc] which explicitly called [_data->_fullScreenWindowController.get() setWebVIew:nil], and that would be enough to ensure that WKFullScreenWindowController was never pointing to a deleted object.
Jer Noble
Comment 6
2011-05-23 15:52:30 PDT
Created
attachment 94508
[details]
Patch
Darin Adler
Comment 7
2011-05-23 16:53:29 PDT
(In reply to
comment #5
)
> For safety's sake, we could add a call in [WKView dealloc] which explicitly called [_data->_fullScreenWindowController.get() setWebVIew:nil], and that would be enough to ensure that WKFullScreenWindowController was never pointing to a deleted object.
Except under GC.
Darin Adler
Comment 8
2011-05-23 16:54:34 PDT
Comment on
attachment 94508
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=94508&action=review
> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:-141 > - [webView retain]; > - [_webView release];
I still don’t think it was best to remove these. A retain cycle is not intrinsically incorrect, as long as something breaks the cycle.
Jer Noble
Comment 9
2011-05-23 16:58:02 PDT
Comment on
attachment 94508
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=94508&action=review
>> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:-141 >> - [_webView release]; > > I still don’t think it was best to remove these. A retain cycle is not intrinsically incorrect, as long as something breaks the cycle.
Okay, I'll upload a new patch that puts these back in.
Jer Noble
Comment 10
2011-05-23 16:58:28 PDT
(In reply to
comment #9
)
> (From update of
attachment 94508
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=94508&action=review
> > >> Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm:-141 > >> - [_webView release]; > > > > I still don’t think it was best to remove these. A retain cycle is not intrinsically incorrect, as long as something breaks the cycle. > > Okay, I'll upload a new patch that puts these back in.
Oh! r+! In that case, I'll check-in a patch that puts these back in. Thanks!
Jer Noble
Comment 11
2011-05-23 18:02:46 PDT
Committed
r87113
: <
http://trac.webkit.org/changeset/87113
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug