[webkit-reviews] review granted: [Bug 225032] [JSC] Remove defaultValue() from the method table : [Attachment 427040] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 27 11:07:38 PDT 2021


Darin Adler <darin at apple.com> has granted Alexey Shvayka
<shvaikalesh at gmail.com>'s request for review:
Bug 225032: [JSC] Remove defaultValue() from the method table
https://bugs.webkit.org/show_bug.cgi?id=225032

Attachment 427040: Patch

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




--- Comment #6 from Darin Adler <darin at apple.com> ---
Comment on attachment 427040
  --> https://bugs.webkit.org/attachment.cgi?id=427040
Patch

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

> Source/JavaScriptCore/API/JSCallbackObjectFunctions.h:238
> +    JSCallbackObject* thisObject = jsDynamicCast<JSCallbackObject*>(vm,
callFrame->thisValue());
> +    if (!thisObject)
> +	   return throwVMTypeError(globalObject, scope,
"JSCallbackObject[Symbol.toPrimitive] method called on incompatible |this|
value."_s);
> +    PreferredPrimitiveType hint = toPreferredPrimitiveType(globalObject,
callFrame->argument(0));

As someone who has been here with JavaScriptCore and WebCore all along, quite
sad that the coding styles are diverging on minor stylistic questions like how
we use auto.


More information about the webkit-reviews mailing list