Bug 153989 - [GTK] WebKit2Gtk crashes when creating a webview with g_object_new.
Summary: [GTK] WebKit2Gtk crashes when creating a webview with g_object_new.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-08 09:29 PST by Danilo Cesar Lemes de Paula
Modified: 2016-02-08 10:43 PST (History)
7 users (show)

See Also:


Attachments
patch v1 (2.73 KB, patch)
2016-02-08 09:33 PST, Danilo Cesar Lemes de Paula
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danilo Cesar Lemes de Paula 2016-02-08 09:29:10 PST
WebKit2Gtk crashes when creating a WebView with g_object_new(WEBKIT_TYPE_WEB_VIEW, NULL).

It happens because _WebViewBasePrivate is initialized with a call to RunLoop::main(), but it has never been initialized (as it's only initialized when we get a context, like the webkit_get_default_context() call).
Initializing only the RunLoop causes other issue, so I realized that a full call to WebKit2Initialize should be made.

Patch is coming next...
Comment 1 Danilo Cesar Lemes de Paula 2016-02-08 09:33:29 PST
Created attachment 270858 [details]
patch v1
Comment 2 WebKit Commit Bot 2016-02-08 09:36:06 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 2016-02-08 09:53:39 PST
Comment on attachment 270858 [details]
patch v1

Thanks!
Comment 4 WebKit Commit Bot 2016-02-08 10:43:21 PST
Comment on attachment 270858 [details]
patch v1

Clearing flags on attachment: 270858

Committed r196257: <http://trac.webkit.org/changeset/196257>
Comment 5 WebKit Commit Bot 2016-02-08 10:43:26 PST
All reviewed patches have been landed.  Closing bug.