[webkit-reviews] review granted: [Bug 200817] Clarify StorageManagerSet / StorageManager threading model after r248734 : [Attachment 376508] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 16 10:35:28 PDT 2019

Geoffrey Garen <ggaren at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 200817: Clarify StorageManagerSet / StorageManager threading model after

Attachment 376508: Patch


--- Comment #5 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 376508
  --> https://bugs.webkit.org/attachment.cgi?id=376508

View in context: https://bugs.webkit.org/attachment.cgi?id=376508&action=review


> Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.cpp:279
> +	   auto originDetails = storageManager->getLocalStorageOriginDetails();
> +	   RunLoop::main().dispatch([completionHandler =
WTFMove(completionHandler), originDetails = crossThreadCopy(originDetails)]()
mutable {

Kind of unfortunate that this idiom creates a throw-away copy followed by a
cross-thread copy.

Maybe we should consider renaming getLocalStorageOriginDetails() ->
getLocalStorageOriginDetailsCrossThreadCopy(), and change the implementation to
produce a crossThreadCopy.

More information about the webkit-reviews mailing list