WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 144253
Map#entries and Map#keys error for non-Maps is swapped
https://bugs.webkit.org/show_bug.cgi?id=144253
Summary
Map#entries and Map#keys error for non-Maps is swapped
Jordan Harband
Reported
2015-04-27 01:56:28 PDT
Map.prototype.entries.call({}) gives an error about a "key iterator", and Map.prototype.keys.call({}) gives an error about an "entry iterator".
Attachments
Patch
(3.28 KB, patch)
2015-04-27 01:59 PDT
,
Jordan Harband
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jordan Harband
Comment 1
2015-04-27 01:59:56 PDT
Created
attachment 251729
[details]
Patch
Joseph Pecoraro
Comment 2
2015-04-27 11:01:33 PDT
Good fix. Can we have a test for these? var nonMapObject = {}; Map.prototype.entries.call(nonMapObject);
Jordan Harband
Comment 3
2015-04-27 11:07:00 PDT
(In reply to
comment #2
)
> Good fix. Can we have a test for these? > > var nonMapObject = {}; > Map.prototype.entries.call(nonMapObject);
Sure, I'll do that in a followup. Where would you recommend I create them? It looks like `Source/JavaScriptCore/tests/stress/iterators-other-receivers` might be a good filename?
WebKit Commit Bot
Comment 4
2015-04-27 11:37:42 PDT
Comment on
attachment 251729
[details]
Patch Clearing flags on attachment: 251729 Committed
r183402
: <
http://trac.webkit.org/changeset/183402
>
WebKit Commit Bot
Comment 5
2015-04-27 11:38:33 PDT
All reviewed patches have been landed. Closing bug.
Joseph Pecoraro
Comment 6
2015-04-27 14:52:07 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Good fix. Can we have a test for these? > > > > var nonMapObject = {}; > > Map.prototype.entries.call(nonMapObject); > > Sure, I'll do that in a followup. Where would you recommend I create them? > It looks like `Source/JavaScriptCore/tests/stress/iterators-other-receivers` > might be a good filename?
Yeah, that sounds fine. Feel free to CC me!
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