Bug 50892

Summary: [Qt][WK2] Crash in WebPage constructor
Product: WebKit Reporter: Balazs Kelemen <kbalazs>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ossy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch none

Balazs Kelemen
Reported 2010-12-12 06:42:23 PST
WebPage initializing it's Page with a PageClients with zero DeviceMotionClient* that leads to zero pointer dereference. This is how Page using the clients: #if ENABLE(DEVICE_ORIENTATION) , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? new DeviceMotionController(pageClients.deviceMotionClient) : 0) , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, pageClients.deviceOrientationClient) : 0) #endif That means the correct fix is to disable the device motion and orientation features at runtime. The WebPage contructor also needs a fix for consistency with the enable flags but that should be done in a different patch.
Attachments
Patch (1.81 KB, patch)
2010-12-12 06:52 PST, Balazs Kelemen
no flags
Balazs Kelemen
Comment 1 2010-12-12 06:52:34 PST
Andreas Kling
Comment 2 2010-12-12 07:13:45 PST
Comment on attachment 76326 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=76326&action=review LGTM, except one small and one big thing: > WebKit2/WebProcess/qt/WebProcessQt.cpp:47 > + // Disable runtime enabled features that has no WebKit2 implementation yet. s/has/have/ > WebKit2/WebProcess/qt/WebProcessQt.cpp:53 > + WebCore::RntimeEnabledFeatures::setSpeechInputEnabled(false); s/Rntime/Runtime/
Balazs Kelemen
Comment 3 2010-12-12 08:26:46 PST
Csaba Osztrogonác
Comment 4 2010-12-13 05:28:34 PST
(In reply to comment #3) > Committed in http://trac.webkit.org/changeset/73876. Thx for the fix.
Balazs Kelemen
Comment 5 2010-12-13 05:52:49 PST
(In reply to comment #4) > (In reply to comment #3) > > Committed in http://trac.webkit.org/changeset/73876. > > Thx for the fix. It's an honor to serve you!
Note You need to log in before you can comment on or make changes to this bug.