WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155089
[JSC] StringObject.{put, defineOwnProperty} should realize indexed properties
https://bugs.webkit.org/show_bug.cgi?id=155089
Summary
[JSC] StringObject.{put, defineOwnProperty} should realize indexed properties
Yusuke Suzuki
Reported
2016-03-06 08:20:32 PST
[JSC] StringObject.{put, defineOwnProperty} should realize indexed properties
Attachments
Patch
(10.68 KB, patch)
2016-03-06 08:24 PST
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2016-03-06 08:24:47 PST
Created
attachment 273136
[details]
Patch
Yusuke Suzuki
Comment 2
2016-03-06 08:26:29 PST
Comment on
attachment 273136
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273136&action=review
Added comment.
> Source/JavaScriptCore/runtime/StringObject.cpp:72 > + return JSObject::put(cell, exec, propertyName, value, slot);
Later, in Reflect.set patch, we return boolean from ::put, ::putByIndex. So now, we take the style like above.
Yusuke Suzuki
Comment 3
2016-03-06 08:29:03 PST
Comment on
attachment 273136
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273136&action=review
> Source/JavaScriptCore/runtime/StringObject.cpp:113 > + return validateAndApplyPropertyDescriptor(exec, nullptr, propertyName, isExtensible, descriptor, isCurrentDefined, current, throwException);
When passing nullptr to validateAndApplyPropertyDescriptor, it just performs validation. This is OK since we know any descriptor cannot change the result. All we need is the returned value of the validation phase. And we note that this path is very very rare path. So performing slow / generic operation here causes no problem.
Geoffrey Garen
Comment 4
2016-03-07 09:30:57 PST
Comment on
attachment 273136
[details]
Patch r=me
WebKit Commit Bot
Comment 5
2016-03-07 10:21:42 PST
Comment on
attachment 273136
[details]
Patch Clearing flags on attachment: 273136 Committed
r197684
: <
http://trac.webkit.org/changeset/197684
>
WebKit Commit Bot
Comment 6
2016-03-07 10:21:47 PST
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