Bug 153989

Summary: [GTK] WebKit2Gtk crashes when creating a webview with g_object_new.
Product: WebKit Reporter: Danilo de Paula <danilo.eu>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, cgarcia, commit-queue, gustavo, mcatanzaro, mrobinson
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch v1 none

Description Danilo 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 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.