[webkit-reviews] review granted: [Bug 209121] [JSC] Rename ArrayBuffer::slice to ArrayBuffer::trySlice and insert appropriate checks : [Attachment 393614] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 15 12:21:08 PDT 2020


Mark Lam <mark.lam at apple.com> has granted Yusuke Suzuki <ysuzuki at apple.com>'s
request for review:
Bug 209121: [JSC] Rename ArrayBuffer::slice to ArrayBuffer::trySlice and insert
appropriate checks
https://bugs.webkit.org/show_bug.cgi?id=209121

Attachment 393614: Patch

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




--- Comment #2 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 393614
  --> https://bugs.webkit.org/attachment.cgi?id=393614
Patch

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

r=me with fix.

> Source/WebCore/bindings/js/StructuredClone.cpp:62
> +	       return JSValue::encode(JSC::throwOutOfMemoryError(globalObject,
scope));

/globalObject/lexicalGlobalObject/

> Source/WebCore/bindings/js/StructuredClone.cpp:63
> +	   return
JSValue::encode(JSArrayBuffer::create(lexicalGlobalObject->vm(),
lexicalGlobalObject->arrayBufferStructure(ArrayBufferSharingMode::Default),
WTFMove(slicedBuffer)));

Not due to your change, but can you jut use vm here instead of
lexicalGlobalObject->vm()?  We've already pre-computed it above.


More information about the webkit-reviews mailing list