<?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>136635</bug_id>
          
          <creation_ts>2014-09-08 10:29:07 -0700</creation_ts>
          <short_desc>requestAnimationFrame callback is invoked with a wrong context</short_desc>
          <delta_ts>2014-09-08 23:45:44 -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>DUPLICATE</resolution>
          <dup_id>126680</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="Andrea Giammarchi">andrea.giammarchi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>dino</cc>
    
    <cc>ggaren</cc>
    
    <cc>john.david.dalton</cc>
    
    <cc>mathias</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1033889</commentid>
    <comment_count>0</comment_count>
    <who name="Andrea Giammarchi">andrea.giammarchi</who>
    <bug_when>2014-09-08 10:29:07 -0700</bug_when>
    <thetext>Steps to reproduce the problem:
1. write the following in a console 
2. requestAnimationFrame(function(){&apos;use strict&apos;;alert(this)});
3. see that `window` is alerted instead of `undefined`

What is the expected behavior?
function should be invoked with undefined context to fullfill both sloppy and strict expectations

What went wrong?
suddenly, the wild global context appears ...

Did this work before? No 

Chrome version: 39.0.2149.0  Channel: canary
OS Version: OS X 10.8.5
Flash Version: Shockwave Flash 15.0 r0

every single Chrome I could test with requestAnimationFrame out of its prefixed version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1033891</commentid>
    <comment_count>1</comment_count>
    <who name="Mathias Bynens">mathias</who>
    <bug_when>2014-09-08 10:31:40 -0700</bug_when>
    <thetext>See also: https://code.google.com/p/chromium/issues/detail?id=411959</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1033894</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-09-08 10:40:36 -0700</bug_when>
    <thetext>&gt;3. see that `window` is alerted instead of `undefined`

Not quite.  What&apos;s alerted is the function that was passed to requestAnimationFrame.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1033917</commentid>
    <comment_count>3</comment_count>
    <who name="Andrea Giammarchi">andrea.giammarchi</who>
    <bug_when>2014-09-08 12:08:04 -0700</bug_when>
    <thetext>Boris is right, it was a copy and paste from Chromium, apologies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1034082</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2014-09-08 23:45:44 -0700</bug_when>
    <thetext>

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

    </bug>

</bugzilla>