Bug 50892 - [Qt][WK2] Crash in WebPage constructor
Summary: [Qt][WK2] Crash in WebPage constructor
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2010-12-12 06:42 PST by Balazs Kelemen
Modified: 2010-12-13 05:52 PST (History)
1 user (show)

See Also:

Patch (1.81 KB, patch)
2010-12-12 06:52 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 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:
    , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? new DeviceMotionController(pageClients.deviceMotionClient) : 0)
    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, pageClients.deviceOrientationClient) : 0)

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.
Comment 1 Balazs Kelemen 2010-12-12 06:52:34 PST
Created attachment 76326 [details]
Comment 2 Andreas Kling 2010-12-12 07:13:45 PST
Comment on attachment 76326 [details]

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.


> WebKit2/WebProcess/qt/WebProcessQt.cpp:53
> +    WebCore::RntimeEnabledFeatures::setSpeechInputEnabled(false);

Comment 3 Balazs Kelemen 2010-12-12 08:26:46 PST
Committed in http://trac.webkit.org/changeset/73876.
Comment 4 Csaba Osztrogonác 2010-12-13 05:28:34 PST
(In reply to comment #3)
> Committed in http://trac.webkit.org/changeset/73876.

Thx for the fix.
Comment 5 Balazs Kelemen 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!