WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
76232
Clean up putDirect
https://bugs.webkit.org/show_bug.cgi?id=76232
Summary
Clean up putDirect
Gavin Barraclough
Reported
2012-01-12 17:17:22 PST
putDirect has ambiguous semantics, clean these up a bit. putDirect generally behaves a bit like a fast defineOwnProperty, but one that always creates the property, with no checking to validate the put it permitted. It also encompasses two slightly different behaviors. (1) a fast form of put for JSActivation, which doesn't have to handle searching the prototype chain, getter/setter properties, or the magic __proto__ value. Break this out as a new method, 'putOwnDataProperty'. (2) the version of putDirect on JSValue will also check for overwriting ReadOnly values, in strict mode. This is, however, not so smart on a few level, since it is only called from op_put_by_id with direct set, which is only used with an object as the base, and is only used to put new properties onto objects.
Attachments
Part 1
(14.08 KB, patch)
2012-01-12 17:19 PST
,
Gavin Barraclough
sam
: review+
Details
Formatted Diff
Diff
Part 2
(34.19 KB, patch)
2012-01-12 19:23 PST
,
Gavin Barraclough
sam
: review+
Details
Formatted Diff
Diff
Part 3 - merge op_put_getter & op_put_setter.
(29.09 KB, patch)
2012-01-30 01:07 PST
,
Gavin Barraclough
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gavin Barraclough
Comment 1
2012-01-12 17:19:58 PST
Created
attachment 122344
[details]
Part 1
Gavin Barraclough
Comment 2
2012-01-12 17:41:47 PST
Landed pt 1 in
r104886
.
Gavin Barraclough
Comment 3
2012-01-12 19:23:23 PST
Created
attachment 122360
[details]
Part 2
Sam Weinig
Comment 4
2012-01-12 19:30:24 PST
Comment on
attachment 122360
[details]
Part 2 View in context:
https://bugs.webkit.org/attachment.cgi?id=122360&action=review
> Source/JavaScriptCore/runtime/JSObject.h:81 > + PutModePut, > + DefineOwnProperty,
I refuse the inconsistency. DefineOwnProperty should be, PutModeDefineOwnProperty!
Gavin Barraclough
Comment 5
2012-01-12 22:46:11 PST
Part 2 landed in
r104899
Gavin Barraclough
Comment 6
2012-01-30 01:07:26 PST
Created
attachment 124505
[details]
Part 3 - merge op_put_getter & op_put_setter.
Gavin Barraclough
Comment 7
2012-01-30 10:29:12 PST
Fixed in
r106255
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