From c0a3b2db7dc38b96fe4497b77faf73615febae51 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Tue, 14 Jun 2016 15:26:12 -0400 Subject: [PATCH] Relax test for forbidden extension According to ES2015, functions created using the FunctionDeclaration syntax may define "own" properties named "caller" and "arguments" as long as this is done using the AddRestrictedFunctionProperties abstract operation. Remove the assertions that prohibit this extension. --- .../Function/StrictFunction_restricted-properties.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/built-ins/Function/StrictFunction_restricted-properties.js b/test/built-ins/Function/StrictFunction_restricted-properties.js index a1e412c3eb..37f7945d4a 100644 --- a/test/built-ins/Function/StrictFunction_restricted-properties.js +++ b/test/built-ins/Function/StrictFunction_restricted-properties.js @@ -5,16 +5,14 @@ description: > ECMAScript Function objects defined using syntactic constructors in strict mode code do not have own properties "caller" or - "arguments", but inherit them from %FunctionPrototype%. + "arguments" other than those that are created by applying the + AddRestrictedFunctionProperties abstract operation to the function. flags: [onlyStrict] es6id: 16.1 ---*/ function func() {} -assert.sameValue(func.hasOwnProperty('caller'), false, 'Functions defined using syntactic constructors in strict mode code do not have own property "caller"'); -assert.sameValue(func.hasOwnProperty('arguments'), false, 'Functions defined using syntactic constructors in strict mode code do not have own property "arguments"'); - assert.throws(TypeError, function() { return func.caller; });