Bug 91148
| Summary: | [V8] Replaceable WebIDL attributes are broken | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Erik Arvidsson <arv> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | abarth, antonm, atwilson, haraken, japhet |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://www.w3.org/TR/WebIDL/#Replaceable | ||
| Bug Depends on: | 49739 | ||
| Bug Blocks: | |||
Erik Arvidsson
DOMWindow.idl has a bunch of [Replaceable] attributes. This means that the js property should be writable and setting the property should just replace the property.
The following shouldBe* both fails.
window.innerHeight = 42;
shouldBe('window.innerHeight', '42');
shouldBeTrue('Object.getOwnPropertyDescriptor(window, "innerHeight").writable)');
Once we implement bug 49739 the setter needs to defineProperty on the this object. Something like
{
get: function() {
return impl->innerHeight()
},
set: function(v) {
Object.defineProperty({
value: v,
writable: true
...
}
...
}
Right now we only have a get interceptor. I think we can get by using a set interceptor that calls ForceSet but it is possible that we also have to Delete the old property.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Erik Arvidsson
Sorry, this is only a problem with es5_readonly which we are trying to turn on.
Erik Arvidsson
*** This bug has been marked as a duplicate of bug 91668 ***