Ignore:
Timestamp:
Apr 15, 2018, 10:38:01 AM (7 years ago)
Author:
[email protected]
Message:

Function.prototype.caller shouldn't return generator bodies
https://bugs.webkit.org/show_bug.cgi?id=184630

Reviewed by Yusuke Suzuki.
JSTests:

  • stress/function-caller-async-arrow-function-body.js: Added.
  • stress/function-caller-async-function-body.js: Added.
  • stress/function-caller-async-generator-body.js: Added.
  • stress/function-caller-generator-body.js: Added.
  • stress/function-caller-generator-method-body.js: Added.

Source/JavaScriptCore:


Function.prototype.caller no longer returns generator bodies. Those are meant to be
private.

Also added some builtin debugging tools so that it's easier to do the investigation that I
did.

  • builtins/BuiltinNames.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::callerGetter):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncBuiltinDescribe):

  • runtime/JSGlobalObjectFunctions.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.