<?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>126680</bug_id>
          
          <creation_ts>2014-01-08 21:57:13 -0800</creation_ts>
          <short_desc>Incorrect this value for callbacks (like requestAnimationFrame)</short_desc>
          <delta_ts>2022-09-03 06:42:29 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://jsfiddle.net/3BLzU/2/</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="Boris Zbarsky">bzbarsky</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>andrea.giammarchi</cc>
    
    <cc>ap</cc>
    
    <cc>dbates</cc>
    
    <cc>dino</cc>
    
    <cc>ggaren</cc>
    
    <cc>john.david.dalton</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>965779</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-01-08 21:57:13 -0800</bug_when>
    <thetext>Steps to reproduce: Load this testcase:

  &lt;script&gt;
    function f() { &quot;use strict&quot;; alert(this + &quot;&quot;); }
    requestAnimationFrame(f);
  &lt;/script&gt;

Expected result:  Alert saying either &quot;null&quot; or &quot;undefined&quot;, preferably the latter.

Actual result: Alert saying &apos;function f() { &quot;use strict&quot;; alert(this + &quot;&quot;); }&apos;

Additional information:

Per WebIDL spec, the callback this value is set to null, by default, though it should probably be undefined instead (see &lt;https://www.w3.org/Bugs/Public/show_bug.cgi?id=24248&gt;).  The requestAnimationFrame specification doesn&apos;t say to pass any special this value.  So in this case the this value should be undefined, or at worst null, not the function object being called.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1034083</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-09-08 23:45:44 -0700</bug_when>
    <thetext>*** Bug 136635 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896027</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-03 06:42:29 -0700</bug_when>
    <thetext>I am not able to reproduce this bug in Safari Technology Preview 152 and it shows &quot;undefined&apos; for JSFiddle from URL field in all other browsers (Chrome Canary 107, Firefox Nightly 106) as well and also in STP 152.

I am going to mark this as &quot;RESOLVED CONFIGURATION CHANGED&quot; since all browsers are matching and showing &quot;Expected Results&quot;. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>