Bug 58988 - [GTK] flaky crash storage/open-database-set-empty-version.html
Summary: [GTK] flaky crash storage/open-database-set-empty-version.html
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-20 07:05 PDT by Philippe Normand
Modified: 2011-04-26 17:07 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.64 KB, patch)
2011-04-20 11:26 PDT, Martin Robinson
xan.lopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2011-04-20 07:05:35 PDT
WebKitWebDatabase* webkit_security_origin_get_web_database(WebKitSecurityOrigin*, const gchar*): assertion `WEBKIT_IS_SECURITY_ORIGIN(securityOrigin)' failed
ASSERTION FAILED: database
../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp(964) : void databaseQuotaExceeded(WebKitWebView*, WebKitWebFrame*, WebKitWebDatabase*)


#0  0x00000000004221b9 in databaseQuotaExceeded (view=0x68a030, frame=0x696360, database=0x0) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:964
964	    ASSERT(database);

Thread 1 (Thread 13409):
#0  0x00000000004221b9 in databaseQuotaExceeded (view=0x68a030, frame=0x696360, database=0x0) at ../../Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:964
#1  0x00002b571dde8f22 in webkit_marshal_VOID__OBJECT_OBJECT (closure=0x6f0c20, return_value=0x0, n_param_values=3, param_values=0xc89f20, invocation_hint=0x7fff486b8630, marshal_data=0x0) at DerivedSources/webkit/webkitmarshal.cpp:841
#2  0x00002b572232d33e in g_closure_invoke (closure=0x6f0c20, return_value=0x0, n_param_values=3, param_values=0xc89f20, invocation_hint=0x7fff486b8630) at /tmp/buildd/glib2.0-2.27.91/./gobject/gclosure.c:767
#3  0x00002b57223463b9 in signal_emit_unlocked_R (node=0x634900, detail=<value optimized out>, instance=<value optimized out>, emission_return=<value optimized out>, instance_and_params=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:3252
#4  0x00002b5722347b36 in g_signal_emit_valist (instance=0x68a030, signal_id=<value optimized out>, detail=0, var_args=0x7fff486b8850) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:2983
#5  0x00002b5722347e32 in g_signal_emit_by_name (instance=0x68a030, detailed_signal=<value optimized out>) at /tmp/buildd/glib2.0-2.27.91/./gobject/gsignal.c:3077
#6  0x00002b571dd96297 in WebKit::ChromeClient::exceededDatabaseQuota (this=0x688510, frame=0x69c400, databaseName=...) at ../../Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:595
#7  0x00002b571e0bf07c in WebCore::Document::databaseExceededQuota (this=0x478a000, name=...) at ../../Source/WebCore/dom/Document.cpp:4496
#8  0x00002b571e7b5624 in WebCore::DatabaseTracker::canEstablishDatabase (this=0x65ed70, context=0x478a1e0, name=..., displayName=..., estimatedSize=0) at ../../Source/WebCore/storage/DatabaseTracker.cpp:178
#9  0x00002b571e7a870c in WebCore::Database::openDatabase (context=0x478a1e0, name=..., expectedVersion=..., displayName=..., estimatedSize=0, creationCallback=..., e=@0x7fff486b8dfc) at ../../Source/WebCore/storage/Database.cpp:93
#10 0x00002b571e485cd0 in WebCore::DOMWindow::openDatabase (this=0x4300750, name=..., version=..., displayName=..., estimatedSize=0, creationCallback=..., ec=@0x7fff486b8dfc) at ../../Source/WebCore/page/DOMWindow.cpp:1348
#11 0x00002b571e9d0153 in WebCore::jsDOMWindowPrototypeFunctionOpenDatabase (exec=0x2b5770dfc108) at DerivedSources/WebCore/JSDOMWindow.cpp:10573

In exceededDatabaseQuota(), webkit_web_frame_get_security_origin() returns a NULL origin, so webkit_security_origin_get_web_database() also returns NULL.
What should we do in that case? don't emit the database-quota-exceeded signal?
Comment 1 Philippe Normand 2011-04-20 07:07:21 PDT
FTR Qt emits the signal with the databaseName as argument. Should we do the same?
Comment 2 Philippe Normand 2011-04-20 07:07:51 PDT
Will skip the test until a course of action is decided :)
Comment 3 Martin Robinson 2011-04-20 11:25:55 PDT
It seems like the only way that can happen is if the frame is in some inconsistent state. It's safer here just to create the origin directly. I've attached a patch which does that.
Comment 4 Martin Robinson 2011-04-20 11:26:33 PDT
Created attachment 90372 [details]
Patch
Comment 5 Philippe Normand 2011-04-21 03:10:15 PDT
storage/quota-tracking.html is also affected by this issue.
Comment 6 Xan Lopez 2011-04-26 12:04:41 PDT
Comment on attachment 90372 [details]
Patch

Please explain briefly in the ChangeLog why are you doing this.
Comment 7 Martin Robinson 2011-04-26 17:07:58 PDT
Committed r84987: <http://trac.webkit.org/changeset/84987>