Bug 144187 - Map#forEach does not pass "map" argument to callback.
Summary: Map#forEach does not pass "map" argument to callback.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jordan Harband
URL: https://people.mozilla.org/~jorendorf...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-24 23:13 PDT by Jordan Harband
Modified: 2015-04-26 17:35 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.35 KB, patch)
2015-04-24 23:56 PDT, Jordan Harband
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-mavericks (584.67 KB, application/zip)
2015-04-25 00:14 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-mavericks-wk2 (559.81 KB, application/zip)
2015-04-25 00:51 PDT, Build Bot
no flags Details
Patch (4.32 KB, patch)
2015-04-26 14:48 PDT, Jordan Harband
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Harband 2015-04-24 23:13:46 PDT
Per https://people.mozilla.org/~jorendorff/es6-draft.html#sec-map.prototype.foreach step 7.a.i., the callback should be called with three arguments.

Currently, it's called with only two.
Comment 1 Jordan Harband 2015-04-24 23:56:53 PDT
Created attachment 251616 [details]
Patch
Comment 2 Build Bot 2015-04-25 00:14:17 PDT
Comment on attachment 251616 [details]
Patch

Attachment 251616 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4626865851465728

New failing tests:
js/map-foreach-calls-back-with-right-args.html
Comment 3 Build Bot 2015-04-25 00:14:21 PDT
Created attachment 251618 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 4 Build Bot 2015-04-25 00:51:15 PDT
Comment on attachment 251616 [details]
Patch

Attachment 251616 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5476904303853568

New failing tests:
js/map-foreach-calls-back-with-right-args.html
Comment 5 Build Bot 2015-04-25 00:51:17 PDT
Created attachment 251621 [details]
Archive of layout-test-results from ews106 for mac-mavericks-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-mavericks-wk2  Platform: Mac OS X 10.9.5
Comment 6 Darin Adler 2015-04-26 12:05:59 PDT
Comment on attachment 251616 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=251616&action=review

> LayoutTests/js/script-tests/map-foreach-calls-back-with-right-args.js:11
> +    print(value === 'value' ? 'PASS value is "value"' : 'FAIL value is ' + value);
> +    print(key === 'key' ? 'PASS key is "key"' : 'FAIL key is ' + key);
> +    print(map === m ? 'PASS map arg is map' : 'FAIL map arg is ' + map);
> +    print(this === receiver ? 'PASS "this" is "receiver"' : 'FAIL "this" is ' + this);

These are wrong. See the comment I added to the Set version of this patch for a tip on how to do this.
Comment 7 Jordan Harband 2015-04-26 14:48:06 PDT
Created attachment 251707 [details]
Patch
Comment 8 WebKit Commit Bot 2015-04-26 15:19:56 PDT
Comment on attachment 251707 [details]
Patch

Rejecting attachment 251707 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 251707, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/JavaScriptCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/6752778026221568
Comment 9 Jordan Harband 2015-04-26 15:41:57 PDT
Comment on attachment 251707 [details]
Patch

I forgot to set the review bit on this one first
Comment 10 WebKit Commit Bot 2015-04-26 17:35:01 PDT
Comment on attachment 251707 [details]
Patch

Clearing flags on attachment: 251707

Committed r183374: <http://trac.webkit.org/changeset/183374>
Comment 11 WebKit Commit Bot 2015-04-26 17:35:05 PDT
All reviewed patches have been landed.  Closing bug.