ES5.1-15.3.5.4. prohibits Function.caller from [[Get]]ting a strict caller
https://bugs.webkit.org/show_bug.cgi?id=80011
Reviewed by Oliver Hunt.
Also, fix getting the caller from within a bound function, for within a getter,
or setter (make our implementation match other browsers).
Source/JavaScriptCore:
* interpreter/Interpreter.cpp:
(JSC::getCallerInfo):
- Allow this to get the caller of host functions.
(JSC::Interpreter::retrieveCallerFromVMCode):
- This should use getCallerInfo, and should skip over function bindings.
* runtime/JSFunction.cpp:
(JSC::JSFunction::callerGetter):
- This should never return a strict-mode function.
LayoutTests:
* fast/js/caller-property-expected.txt:
* fast/js/script-tests/caller-property.js:
- Add test cases covering permutations of caller/callee being strict/non-strict,
And for callee being a getter/setter/bound.
* fast/js/stack-trace-expected.txt:
- Allow stack tracing over host functions.
git-svn-id: svn://svn.chromium.org/blink/trunk@109461 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed