Bug 125732 - Some Set and Map prototype functions have incorrect function lengths
Summary: Some Set and Map prototype functions have incorrect function lengths
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 21:42 PST by Joseph Pecoraro
Modified: 2013-12-13 23:50 PST (History)
3 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.63 KB, patch)
2013-12-13 21:43 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (7.12 KB, patch)
2013-12-13 22:02 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2013-12-13 21:42:55 PST
Caught while reading through SetPrototype.cpp. Looks like a few of the prototype functions have an unexpected function length. `add` should be 1 since it takes a param, `clear` should be 0 since it doesn't take a param.
Comment 1 Joseph Pecoraro 2013-12-13 21:43:57 PST
Created attachment 219235 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2013-12-13 21:51:08 PST
Looking through JSC_NATIVE_FUNCTION calls, these are suspect as well:

runtime/MapPrototype.cpp
67:    JSC_NATIVE_FUNCTION(vm.propertyNames->keys, mapProtoFuncKeys, DontEnum, 2);
68:    JSC_NATIVE_FUNCTION(vm.propertyNames->values, mapProtoFuncValues, DontEnum, 2);
69:    JSC_NATIVE_FUNCTION(vm.propertyNames->entries, mapProtoFuncEntries, DontEnum, 2);
70:    JSC_NATIVE_FUNCTION(vm.propertyNames->iteratorPrivateName, mapProtoFuncEntries, DontEnum, 2);

Should probably all be 0, eh? I'll address these as well.
Comment 3 Joseph Pecoraro 2013-12-13 22:02:27 PST
Created attachment 219236 [details]
[PATCH] Proposed Fix
Comment 4 WebKit Commit Bot 2013-12-13 23:50:36 PST
Comment on attachment 219236 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 219236

Committed r160592: <http://trac.webkit.org/changeset/160592>
Comment 5 WebKit Commit Bot 2013-12-13 23:50:38 PST
All reviewed patches have been landed.  Closing bug.