<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>148681</bug_id>
          
          <creation_ts>2015-09-01 10:11:12 -0700</creation_ts>
          <short_desc>Functions with non-simple parameter list should have poisoned arguments.callee and arguments.caller (even outside strict mode)</short_desc>
          <delta_ts>2020-12-11 22:24:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>217574</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Claude Pache">claude.pache</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1122563</commentid>
    <comment_count>0</comment_count>
    <who name="Claude Pache">claude.pache</who>
    <bug_when>2015-09-01 10:11:12 -0700</bug_when>
    <thetext>For example:

    (function (x = 1) { return arguments.callee })() // should throw, even in sloppy mode

For reference, see step 22 of: http://www.ecma-international.org/ecma-262/6.0/#sec-functiondeclarationinstantiation

In short, the spec recognizes two types of Arguments objects:
* mapped Arguments object, used for sloppy-mode simple-parameter-list functions;
* unmapped Arguments object with poisoned `callee`/`caller`, used for anything else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1714236</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2020-12-11 22:24:53 -0800</bug_when>
    <thetext>`arguments.caller` poisoned getter was removed from the spec: please see note 5 of https://tc39.es/ecma262/#sec-arguments-exotic-objects.
`arguments.callee` poisoned getter for sloppy functions with non-simple parameter list was implemented in r268323.
  ^ test262 case: https://test262.report/browse/built-ins/ThrowTypeError/unique-per-realm-non-simple.js.

*** This bug has been marked as a duplicate of bug 217574 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>