WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
116253
Replace WebFrameLoaderClient static_casts with a function that might return null
https://bugs.webkit.org/show_bug.cgi?id=116253
Summary
Replace WebFrameLoaderClient static_casts with a function that might return null
Brady Eidson
Reported
2013-05-16 17:10:14 PDT
Replace WebFrameLoaderClient static_casts with a function that might return null Spun off from
https://bugs.webkit.org/show_bug.cgi?id=115917
This bug is about WebKit2. We should handle WebKit1 separately.
Attachments
Patch v1
(31.97 KB, patch)
2013-05-16 17:15 PDT
,
Brady Eidson
ap
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2013-05-16 17:15:03 PDT
Created
attachment 202006
[details]
Patch v1
Brady Eidson
Comment 2
2013-05-17 12:12:07 PDT
Somethings clearly off in the weeds on the EWS bot. Landing soon.
Brady Eidson
Comment 3
2013-05-17 12:15:23 PDT
http://trac.webkit.org/changeset/150282
Andreas Kling
Comment 4
2013-05-17 12:44:59 PDT
Comment on
attachment 202006
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=202006&action=review
> Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp:182 > void WebChromeClient::focusedFrameChanged(Frame* frame) > { > - WebFrame* webFrame = frame ? static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame() : 0; > + WebFrameLoaderClient* webFrameLoaderClient = toWebFrameLoaderClient(frame->loader()->client()); > + WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0;
This function no longer null-checks the 'frame' argument. Just got this crash on ToT: 0 com.apple.WebKit2 0x000000010e7e1e0e WebKit::WebChromeClient::focusedFrameChanged(WebCore::Frame*) + 18 (FrameLoader.h:197) 1 com.apple.WebCore 0x000000010f5d4dce WebCore::FocusController::setFocusedFrame(WTF::PassRefPtr<WebCore::Frame>) + 590 (FocusController.cpp:201) 2 com.apple.WebCore 0x000000010f5f6b8d WebCore::Frame::willDetachPage() + 221 (PassRefPtr.h:67) 3 com.apple.WebCore 0x000000010f6032c7 WebCore::FrameLoader::detachFromParent() + 471 (FrameLoader.cpp:2402) 4 com.apple.WebKit2 0x000000010e82ada3 WebKit::WebPage::close() + 393 (WebPage.cpp:855)
Brady Eidson
Comment 5
2013-05-17 12:49:03 PDT
(In reply to
comment #4
)
> (From update of
attachment 202006
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=202006&action=review
> > > Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp:182 > > void WebChromeClient::focusedFrameChanged(Frame* frame) > > { > > - WebFrame* webFrame = frame ? static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame() : 0; > > + WebFrameLoaderClient* webFrameLoaderClient = toWebFrameLoaderClient(frame->loader()->client()); > > + WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : 0; > > This function no longer null-checks the 'frame' argument. > > Just got this crash on ToT: > 0 com.apple.WebKit2 0x000000010e7e1e0e WebKit::WebChromeClient::focusedFrameChanged(WebCore::Frame*) + 18 (FrameLoader.h:197) > 1 com.apple.WebCore 0x000000010f5d4dce WebCore::FocusController::setFocusedFrame(WTF::PassRefPtr<WebCore::Frame>) + 590 (FocusController.cpp:201) > 2 com.apple.WebCore 0x000000010f5f6b8d WebCore::Frame::willDetachPage() + 221 (PassRefPtr.h:67) > 3 com.apple.WebCore 0x000000010f6032c7 WebCore::FrameLoader::detachFromParent() + 471 (FrameLoader.cpp:2402) > 4 com.apple.WebKit2 0x000000010e82ada3 WebKit::WebPage::close() + 393 (WebPage.cpp:855)
Yikes. Fixed in
http://trac.webkit.org/changeset/150288
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