I'm still getting crashes there. The problem is that when setImageData() is called from IconDatabase::readFromDatabase() the shared buffer might be nullptr, because getImageDataForIconURLFromSQLDatabase() returns nullptr if the icon data is not in the database. #0 0x00007f186d4da26e in WebKit::IconDatabase::IconRecord::setImageData(WTF::RefPtr<WebCore::SharedBuffer>&&) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37 #1 0x00007f186d4dab08 in WebKit::IconDatabase::readFromDatabase() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37 #2 0x00007f186d4db112 in WebKit::IconDatabase::syncThreadMainLoop() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37 #3 0x00007f186d4db438 in WebKit::IconDatabase::iconDatabaseSyncThread() () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37 #4 0x00007f186946cb0b in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18 #5 0x00007f186949fa39 in WTF::wtfThreadEntryPoint(void*) () from /home/cgarcia/src/git/gnome/WebKit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18 #6 0x00007f1861288494 in start_thread (arg=0x7f18548fc700) at pthread_create.c:333 #7 0x00007f185fef0a8f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Created attachment 318028 [details] Patch
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
Committed r220677: <http://trac.webkit.org/changeset/220677>