WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155560
[JSC] allow duplicate property names returned from Proxy ownKeys() trap
https://bugs.webkit.org/show_bug.cgi?id=155560
Summary
[JSC] allow duplicate property names returned from Proxy ownKeys() trap
Caitlin Potter (:caitp)
Reported
2016-03-16 14:53:22 PDT
[JSC] allow duplicate property names returned from Proxy ownKeys() trap
Attachments
Patch
(3.33 KB, patch)
2016-03-16 14:56 PDT
,
Caitlin Potter (:caitp)
no flags
Details
Formatted Diff
Diff
Patch
(5.54 KB, patch)
2016-03-22 07:17 PDT
,
Caitlin Potter (:caitp)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Caitlin Potter (:caitp)
Comment 1
2016-03-16 14:56:26 PDT
Created
attachment 274222
[details]
Patch
Saam Barati
Comment 2
2016-03-17 02:20:18 PDT
Comment on
attachment 274222
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274222&action=review
> Source/JavaScriptCore/runtime/ProxyObject.cpp:879 > + trapResult.addKnownUnique(ident.impl());
LGTM, but I think it's worth renaming "addKnownUnique" That functions name has lost its meaning over time. Either in this patch or another patch.
Darin Adler
Comment 3
2016-03-17 09:08:47 PDT
Comment on
attachment 274222
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274222&action=review
>> Source/JavaScriptCore/runtime/ProxyObject.cpp:879 >> + trapResult.addKnownUnique(ident.impl()); > > LGTM, but I think it's worth renaming "addKnownUnique" > That functions name has lost its meaning over time. Either in > this patch or another patch.
I completely agree. I came here just to write this comment!
Caitlin Potter (:caitp)
Comment 4
2016-03-21 04:15:37 PDT
I haven't been able to come up with a good alternative name, since "addKnownUnique" looks like it makes a lot of sense in the other place it's used
Saam Barati
Comment 5
2016-03-21 09:58:45 PDT
(In reply to
comment #4
)
> I haven't been able to come up with a good alternative name, since > "addKnownUnique" looks like it makes a lot of sense in the other place it's > used
I'll look at the other call sites later today, but just off the top of my head, what about "append" or "addUnconditionally"?
Caitlin Potter (:caitp)
Comment 6
2016-03-22 07:17:34 PDT
Created
attachment 274650
[details]
Patch
Caitlin Potter (:caitp)
Comment 7
2016-03-22 07:18:13 PDT
I've gone with "addUnchecked()", let me know if that works for you guys
Darin Adler
Comment 8
2016-03-22 09:14:42 PDT
Comment on
attachment 274650
[details]
Patch I think the name addUnchecked is OK for now. We should return later and consider renaming the other "add" functions to make it clearer that they enforce uniqueness. Since uniqueness is no longer an invariant of the class, the add function needs to make it clear that it’s a rule it implements.
WebKit Commit Bot
Comment 9
2016-03-22 10:01:07 PDT
Comment on
attachment 274650
[details]
Patch Clearing flags on attachment: 274650 Committed
r198531
: <
http://trac.webkit.org/changeset/198531
>
WebKit Commit Bot
Comment 10
2016-03-22 10:01:11 PDT
All reviewed patches have been landed. Closing bug.
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