We're getting reports of INVALID_STATE exceptions being throw from the openDatabase method. It looks like there some unsafe initialization code paths that may be the culprit.
Created attachment 109505 [details] safer
Attachment 109505 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:5: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Source/WebCore/ChangeLog:6: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Total errors found: 2 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 109508 [details] safer made some whitespace changes in the changelog file
Comment on attachment 109508 [details] safer View in context: https://bugs.webkit.org/attachment.cgi?id=109508&action=review I don't understand thread-safe string copying well enough, so leaving this for someone else (Dave Levin?) to review. > Source/WebCore/storage/AbstractDatabase.cpp:51 > +static const char versionKey[] = "WebKitDatabaseVersionKey"; Is this actually guaranteed to not use initialization, or do you need to use a pointer? > Source/WebCore/storage/AbstractDatabase.cpp:298 > + const String tableName(infoTableName); We don't use local const variables in WebKit. > Source/WebCore/storage/AbstractDatabase.cpp:396 > + const String query(String("SELECT value FROM ") + infoTableName + " WHERE key = '" + versionKey + "';"); We don't use local const variables in WebKit. > Source/WebCore/storage/AbstractDatabase.cpp:416 > + const String query(String("INSERT INTO ") + infoTableName + " (key, value) VALUES ('" + versionKey + "', ?);"); We don't use local const variables in WebKit.
Created attachment 109530 [details] safer
> Is this actually guaranteed to not use initialization, or do you need to use a pointer? Yes, no. > We don't use local const variables in WebKit. Done x 3
Comment on attachment 109530 [details] safer View in context: https://bugs.webkit.org/attachment.cgi?id=109530&action=review Looks great! > Source/WebCore/storage/AbstractDatabase.cpp:2 > + * Copyright (C) 2011 Google Inc. All rights reserved. In WebKit, we leave the year in tact, so this would become 2010, 2011. But you don't need to change this back -- just fyi for future changes.
thank you good reviewer sir!
Comment on attachment 109530 [details] safer Clearing flags on attachment: 109530 Committed r96554: <http://trac.webkit.org/changeset/96554>
All reviewed patches have been landed. Closing bug.