Bug 78104 - [GTK] Fix a crash when WebKitWebView is created without a WebContext
Summary: [GTK] Fix a crash when WebKitWebView is created without a WebContext
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Keywords: Gtk
Depends on:
Reported: 2012-02-08 04:50 PST by Carlos Garcia Campos
Modified: 2012-02-08 08:31 PST (History)
3 users (show)

See Also:

Patch (1.62 KB, patch)
2012-02-08 04:52 PST, Carlos Garcia Campos
pnormand: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-02-08 04:50:00 PST
WebContext is a construct only property of WebKitWebView. webkit_web_view_new() passes the default web context as g_object_new parameter. If a web view is created with g_object_new without passing the web context parameter (which is a normal situation when creating objects derived from WebKitWebView), the default value for GObject propetrties is set (NULL). In webkitWebViewConstructed we assume the view already has a web context and it crashes if it hasn't.
Comment 1 Carlos Garcia Campos 2012-02-08 04:52:10 PST
Created attachment 126060 [details]
Comment 2 WebKit Review Bot 2012-02-08 04:55:34 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Garcia Campos 2012-02-08 08:31:33 PST
Committed r107092: <http://trac.webkit.org/changeset/107092>