[webkit-reviews] review granted: [Bug 202574] Implement [Transferable] property of OffscreenCanvas : [Attachment 388978] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 28 06:26:54 PST 2020


Antti Koivisto <koivisto at iki.fi> has granted Chris Lord <clord at igalia.com>'s
request for review:
Bug 202574: Implement [Transferable] property of OffscreenCanvas
https://bugs.webkit.org/show_bug.cgi?id=202574

Attachment 388978: Patch

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




--- Comment #10 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 388978
  --> https://bugs.webkit.org/attachment.cgi?id=388978
Patch

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

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:3153
> +#if ENABLE(OFFSCREEN_CANVAS)
> +		   { },
> +#endif
>  #if ENABLE(WEBASSEMBLY)
>		   nullptr,
>  #endif

Maybe CloneDeserializer could have default argument values to avoid these?

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:3574
>      return adoptRef(*new SerializedScriptValue(WTFMove(buffer), blobURLs,
nullptr, nullptr, { }
> +#if ENABLE(OFFSCREEN_CANVAS)
> +	   , { }
> +#endif
>  #if ENABLE(WEBASSEMBLY)
>	   , nullptr
>  #endif

Maybe SerializedScriptValue could have default argument values to avoid these?

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:3589
> +static bool offscreenCanvasesCanDetach(const
Vector<RefPtr<OffscreenCanvas>>& offscreenCanvases)

The usual style is to start boolean functions with verb like is/are/has etc.,
maybe areAllOffscreenCanvasesDetachable or something like that.

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:3596
> +	   if (!visited.add(offscreenCanvas.get()))
> +	       return false;

What is this test about? Maybe add a comment?


More information about the webkit-reviews mailing list