Bug 62264 - reduce and reduceRight bind callback's this to null rather than undefined
Summary: reduce and reduceRight bind callback's this to null rather than undefined
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Trivial
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 22:02 PDT by Mark S. Miller
Modified: 2011-07-26 23:03 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.96 KB, patch)
2011-07-25 15:10 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark S. Miller 2011-06-07 22:02:35 PDT
Both
    [2,3].reduce(function(){'use strict';return this;})
and
    [2,3].reduceRight(function(){'use strict';return this;})
return null rather than undefined. This violates step 9.c.ii of sections 15.4.4.21 and 15.4.4.22 of ES5.1.
Comment 1 Mark S. Miller 2011-06-07 22:02:58 PDT
See http://code.google.com/p/v8/issues/detail?id=1436
Comment 2 Mark Hahnenberg 2011-07-25 15:10:19 PDT
Created attachment 101921 [details]
Patch
Comment 3 WebKit Review Bot 2011-07-26 23:03:07 PDT
Comment on attachment 101921 [details]
Patch

Clearing flags on attachment: 101921

Committed r91824: <http://trac.webkit.org/changeset/91824>
Comment 4 WebKit Review Bot 2011-07-26 23:03:11 PDT
All reviewed patches have been landed.  Closing bug.