Strict mode Function.caller accessor undefined

UNCONFIRMED
Unassigned

Status

()

Core
JavaScript Engine
UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: James Keane, Unassigned)

Tracking

34 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141127111021

Steps to reproduce:

var fn = function() { "use strict"; };
var throwTypeError = Object.getOwnPropertyDescriptor(fn, 'caller').get;


Actual results:

Object.getOwnPropertyDescriptor(fn, 'caller') is null.


Expected results:

As per https://bugzilla.mozilla.org/show_bug.cgi?id=514581 and "js/src/tests/test262/ch13/13.2/S13.2.3_A1.js" _and_ http://people.mozilla.org/~jorendorff/es6-draft.html#sec-%throwtypeerror%

Function.caller should be [[ThrowTypeError]]

Comment 1

3 years ago
I think this is intended to be compat with expected ES6.
(Reporter)

Comment 2

3 years ago
"The spec doesn't really anticipate this approach, but what you're implementing here seems clearly better than the spec --- Web compat permitting."

https://bugzilla.mozilla.org/show_bug.cgi?id=969478

Comment 3

3 years ago
See https://bugs.ecmascript.org/show_bug.cgi?id=3113
You need to log in before you can comment on or make changes to this bug.