[webkit-reviews] review granted: [Bug 173105] WebAssembly: add support for stream APIs : [Attachment 418585] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 27 15:13:34 PST 2021
Keith Miller <keith_miller at apple.com> has granted Yusuke Suzuki
<ysuzuki at apple.com>'s request for review:
Bug 173105: WebAssembly: add support for stream APIs
https://bugs.webkit.org/show_bug.cgi?id=173105
Attachment 418585: Patch
https://bugs.webkit.org/attachment.cgi?id=418585&action=review
--- Comment #51 from Keith Miller <keith_miller at apple.com> ---
Comment on attachment 418585
--> https://bugs.webkit.org/attachment.cgi?id=418585
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=418585&action=review
r=me with some comments.
> Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp:89
> + ensureWorklist().enqueue(WTFMove(plan));
Wait, why does the ChangeLog say you don't use the WasmWorklist? is
`ensureWorklist()` not the Wasm one?
> Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp:139
> + auto* promise = std::exchange(m_promise, nullptr);
Why is this needed? Isn't the promise retained by the DeferredWorkTimer?
> Source/JavaScriptCore/wasm/WasmStreamingPlan.h:53
> + // For some reason friendship doesn't extend to parent classes...
Heh, I read this and thought to myself... This doesn't seem like something
Yusuke would right. Turns out I wrote it and you copied it here, lol
> Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:319
> + bool isResponseCorsSameOrigin = inputResponse->type() ==
ResourceResponse::Type::Basic || inputResponse->type() ==
ResourceResponse::Type::Cors || inputResponse->type() ==
ResourceResponse::Type::Default;
I feel like this should be a member function on JSFetchResponse. It's a bit
magical here but wouldn't need a comment if the condition of the if was `if
(inputResponse->isCorsSameOrigin())`
> Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:326
> + auto contentType =
inputResponse->headers().fastGet(HTTPHeaderName::ContentType);
Ditto but less important.
> Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:347
> + inputResponse->consumeBodyReceivedByChunk([globalObject, compiler =
WTFMove(compiler)](auto&& result) mutable {
Does this happen on the main thread out of curiosity or can it happen
elsewhere?
More information about the webkit-reviews
mailing list