WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
48337
V8 bindings report readonly idl attributes as writable
https://bugs.webkit.org/show_bug.cgi?id=48337
Summary
V8 bindings report readonly idl attributes as writable
Erik Arvidsson
Reported
2010-10-26 09:48:26 PDT
Given: var event = document.createEvent('Event'); JSON.stringify(Object.getOwnPropertyDescriptor(event, 'currentTarget')) returns {"value":null,"writable":true,"enumerable":true,"configurable":true} But the Event.idl file says readonly attribute EventTarget currentTarget; Safari + JSC returns {"value":null,"writable":false,"enumerable":true,"configurable":false}
Attachments
Add attachment
proposed patch, testcase, etc.
anton muhin
Comment 1
2010-10-26 11:40:00 PDT
Rico did a lot of work on getOwnPropertyDescriptor, so he is probably the best guy to solve it. Alas, we have two options to control not-writeability of API callbacks (currentTarget is API callback that is thing like getter where getter is implemented in C++): property attributes and absence of a setter. Currently v8 believes into attributes (see src/runtime.cc ln. 77 as of bleeding edge@63542) while DOM bindings use missing setter (see third_party/WebKit/WebCore/bindings/scripts/CodeGeneratorV8.pm, ln. 1535 as of @70305). If memory serves, v8 treats callback properties without setter as readonly anyway (at least it ignores any attempts to write, but we need to double check how it correlates with const), so I think the problem should be fixed on v8 part (checking if a setter is missing). Rico, any thoughts? Erik, this issue doesn't look of very high priority and could probably wait a bit (Rico is on paternity leave). And I cannot just cc Rico, so I am forwarding this bug to him cc'ing this bug cc list instead.
Dominic Cooney
Comment 2
2011-05-24 16:58:32 PDT
Note that per
bug 49739
these attributes should be on Event.prototype. But the bug is still valid re: writable: true, configurable: true being invalid.
Dominic Cooney
Comment 3
2011-05-24 18:15:50 PDT
Actually, per the Web IDL working draft <
http://www.w3.org/TR/2010/WD-WebIDL-20101021/#es-attributes
> readonly attributes should be attribute getters and setters.
Dominic Cooney
Comment 4
2011-11-01 16:08:13 PDT
***
Bug 71113
has been marked as a duplicate of this bug. ***
Erik Arvidsson
Comment 5
2013-09-27 09:49:15 PDT
V8 is gone
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