[webkit-reviews] review granted: [Bug 195563] Crash under WebCore::IDBDatabase::connectionToServerLost : [Attachment 364268] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 11 11:59:26 PDT 2019


Geoffrey Garen <ggaren at apple.com> has granted Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 195563: Crash under WebCore::IDBDatabase::connectionToServerLost
https://bugs.webkit.org/show_bug.cgi?id=195563

Attachment 364268: Patch

https://bugs.webkit.org/attachment.cgi?id=364268&action=review




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

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

r=me

> Source/WTF/wtf/CrossThreadTask.h:92
> +CrossThreadTask createCrossThreadTask(T& callee, void
(T::*method)(Parameters...), const Arguments&... arguments)
> +{
> +    return CrossThreadTask([callee = &callee, protectedCallee =
makeRefPtr(&callee), method, arguments =
std::make_tuple(crossThreadCopy<Arguments>(arguments)...)]() mutable {
> +	   callMemberFunctionForCrossThreadTask(callee, method,
WTFMove(arguments));
> +    });

I think it would be slightly nicer to write this using only one value for
callee. I think you can do that as

    return CrossThreadTask([callee = makeRefPtr(&callee)...
	callMemberFunctionForCrossThreadTask(callee.get()...


More information about the webkit-reviews mailing list