WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56445
Logic error in -[WebHTMLView close]
https://bugs.webkit.org/show_bug.cgi?id=56445
Summary
Logic error in -[WebHTMLView close]
Jeff Johnson
Reported
2011-03-15 21:47:42 PDT
The following code is in -[WebHTMLView close]: [_private clear]; Page* page = core([self _webView]); if (page) page->dragController()->setDraggingImageURL(KURL()); However, -[WebHTMLViewPrivate clear] has this code: dataSource = nil; And -[WebHTMLView _webView] is as follows: - (WebView *)_webView { return [_private->dataSource _webView]; } Thus, the call to [self _webView] always returns nil after [_private clear], and page will always be nil too. The "page" code in-[WebHTMLView close] was introduced in <
https://trac.webkit.org/changeset/19104
>. I'd say it's hard to image that this section of code was ever tested. I discovered this logic error while investigating
https://bugs.webkit.org/show_bug.cgi?id=26667
Attachments
Patch
(2.84 KB, patch)
2011-03-16 20:35 PDT
,
Jeff Johnson
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-03-15 23:46:58 PDT
Would you be willing to make a patch removing the dead code?
Jeff Johnson
Comment 2
2011-03-16 00:02:19 PDT
I suppose. We know it hasn't done anything for 4 years. But shouldn't someone figure out what it was supposed to do in the first place? ;-)
Alexey Proskuryakov
Comment 3
2011-03-16 00:17:17 PDT
That would certainly be nice, but it's not really a prerequisite for removing old dead code.
Jeff Johnson
Comment 4
2011-03-16 20:35:29 PDT
Created
attachment 86023
[details]
Patch
Alexey Proskuryakov
Comment 5
2011-03-16 21:34:10 PDT
Comment on
attachment 86023
[details]
Patch Also marking cq+ for commit queue to land this patch.
WebKit Commit Bot
Comment 6
2011-03-16 23:39:35 PDT
Comment on
attachment 86023
[details]
Patch Clearing flags on attachment: 86023 Committed
r81330
: <
http://trac.webkit.org/changeset/81330
>
WebKit Commit Bot
Comment 7
2011-03-16 23:39:39 PDT
All reviewed patches have been landed. Closing bug.
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