[GTK] ASSERTION FAILED: client in WebKit::IconDatabase::setClient
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jul 2017 06:49:11 +0000 (06:49 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Jul 2017 06:49:11 +0000 (06:49 +0000)
commit5fc1e29430899f5583d7c12c1f661a4dcdcc36e8
treea895a62e117ff23c64e1e49e8f55500d871c7b4b
parentcd32578197ac4c6690a28a17bd3d5b7f366e2291
[GTK] ASSERTION FAILED: client in WebKit::IconDatabase::setClient
https://bugs.webkit.org/show_bug.cgi?id=174788

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2017-07-24
Reviewed by Carlos Garcia Campos.

IconDatabase ensures that setClient is never called with nullptr, but WebKitFaviconDatabase
does exactly that. First, ensure it's safe to unset the client. Next, we can either remove
the assertions from setClient or else automatically unset the client in IconDatabase::close.
I opted to do both.

* UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::close):
(WebKit::IconDatabase::setIconDataForIconURL):
(WebKit::IconDatabase::setIconURLForPageURL):
* UIProcess/API/glib/WebKitFaviconDatabase.cpp:
(_WebKitFaviconDatabasePrivate::~_WebKitFaviconDatabasePrivate): Deleted.
(webkitFaviconDatabaseDispose): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219863 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
Source/WebKit/UIProcess/API/glib/WebKitFaviconDatabase.cpp