WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
126680
Incorrect this value for callbacks (like requestAnimationFrame)
https://bugs.webkit.org/show_bug.cgi?id=126680
Summary
Incorrect this value for callbacks (like requestAnimationFrame)
Boris Zbarsky
Reported
2014-01-08 21:57:13 PST
Steps to reproduce: Load this testcase: <script> function f() { "use strict"; alert(this + ""); } requestAnimationFrame(f); </script> Expected result: Alert saying either "null" or "undefined", preferably the latter. Actual result: Alert saying 'function f() { "use strict"; alert(this + ""); }' Additional information: Per WebIDL spec, the callback this value is set to null, by default, though it should probably be undefined instead (see <
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24248
>). The requestAnimationFrame specification doesn'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.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2014-09-08 23:45:44 PDT
***
Bug 136635
has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 2
2022-09-03 06:42:29 PDT
I am not able to reproduce this bug in Safari Technology Preview 152 and it shows "undefined' 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 "RESOLVED CONFIGURATION CHANGED" since all browsers are matching and showing "Expected Results". Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug