RESOLVED FIXED 116346
WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
https://bugs.webkit.org/show_bug.cgi?id=116346
Summary WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the...
Anders Carlsson
Reported 2013-05-17 13:17:45 PDT
WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
Attachments
Patch (12.47 KB, patch)
2013-05-17 13:21 PDT, Anders Carlsson
kling: review+
Anders Carlsson
Comment 1 2013-05-17 13:21:42 PDT
WebKit Commit Bot
Comment 2 2013-05-17 13:24:17 PDT
Attachment 202144 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/Forward.h', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.cpp', u'Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h', u'Source/WebKit2/UIProcess/Storage/StorageManager.cpp', u'Source/WebKit2/UIProcess/Storage/StorageManager.h', u'Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp']" exit_code: 1 Source/WebKit2/UIProcess/Storage/StorageManager.h:64: Missing spaces around >> [whitespace/operators] [3] Source/WebKit2/UIProcess/Storage/StorageManager.h:96: Missing spaces around >> [whitespace/operators] [3] Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp:86: Missing spaces around >> [whitespace/operators] [3] Source/WebKit2/UIProcess/Storage/StorageManager.cpp:384: Missing spaces around >> [whitespace/operators] [3] Source/WebKit2/UIProcess/Storage/StorageManager.cpp:569: Missing spaces around >> [whitespace/operators] [3] Source/WebKit2/UIProcess/Storage/StorageManager.cpp:575: Missing spaces around >> [whitespace/operators] [3] Source/WebKit2/UIProcess/Storage/StorageManager.cpp:577: Missing spaces around >> [whitespace/operators] [3] Total errors found: 7 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andreas Kling
Comment 3 2013-05-17 13:38:02 PDT
Comment on attachment 202144 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202144&action=review r=me with some itches.. > Source/WebKit2/UIProcess/Storage/LocalStorageDatabaseTracker.h:56 > + Vector<RefPtr<WebCore::SecurityOrigin>> origins(); This method should be const. > Source/WebKit2/UIProcess/Storage/StorageManager.cpp:340 > + // Make sure the encoding is initialized before we start dispatching things to the queue. > + UTF8Encoding(); This looks somewhat arbitrary. Are we sure this is the only encoding that will ever be needed? > Source/WebKit2/UIProcess/Storage/StorageManager.cpp:571 > +static void callCallbackFunction(void* context, void (*callbackFunction)(const Vector<RefPtr<WebCore::SecurityOrigin>>& securityOrigins, void* context), Vector<RefPtr<WebCore::SecurityOrigin>>* securityOriginsPtr) > +{ > + OwnPtr<Vector<RefPtr<WebCore::SecurityOrigin>>> securityOrigins = adoptPtr(securityOriginsPtr); I wish we could pass securityOriginsPtr as a PassOwnPtr instead here. > Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp:93 > + for (size_t i = 0; i < securityOrigins.size(); ++i) I prefer to use 'unsigned' to iterate over Vectors in new code, as we're planning to move away from size_t there eventually.
Anders Carlsson
Comment 4 2013-05-17 13:41:19 PDT
Alexey Proskuryakov
Comment 5 2013-05-17 21:46:09 PDT
Comment on attachment 202144 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=202144&action=review >> Source/WebKit2/UIProcess/Storage/StorageManager.cpp:340 >> + UTF8Encoding(); > > This looks somewhat arbitrary. Are we sure this is the only encoding that will ever be needed? It's a nice catch. Shouldn't we have ASSERT(isMainThread()) in all those functions? Or better yet, have a dispatch_once? I agree with Andreas that this looks a bit troubling even if it's 100% correct.
Note You need to log in before you can comment on or make changes to this bug.