[webkit-reviews] review granted: [Bug 225277] REGRESSION (r271119): Object methods defined with shorthand notation cannot access “caller” in non-strict mode : [Attachment 428644] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 15 15:55:14 PDT 2021


Darin Adler <darin at apple.com> has granted Alexey Shvayka
<shvaikalesh at gmail.com>'s request for review:
Bug 225277: REGRESSION (r271119): Object methods defined with shorthand
notation cannot access “caller” in non-strict mode
https://bugs.webkit.org/show_bug.cgi?id=225277

Attachment 428644: Patch

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




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

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

> Source/JavaScriptCore/runtime/JSFunction.cpp:413
> +    SourceParseMode parseMode = function->jsExecutable()->parseMode();

Dueling coding styles: This would be better with auto. We don’t want to name
the type, risking that if we named the wrong one we could cause type
conversion, just to get the function result and pass it along to predicate
functions like isGeneratorParseMode.

But you have told me that auto is less in fashion in JavaScriptCore, as coding
style and project culture subtly drifts apart.


More information about the webkit-reviews mailing list