Bug 91148

Summary: [V8] Replaceable WebIDL attributes are broken
Product: WebKit Reporter: Erik Arvidsson <arv>
Component: DOMAssignee: 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:    

Description Erik Arvidsson 2012-07-12 14:16:59 PDT
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.
Comment 1 Erik Arvidsson 2012-07-12 14:20:08 PDT
Sorry, this is only a problem with es5_readonly which we are trying to turn on.
Comment 2 Erik Arvidsson 2012-07-19 11:56:59 PDT

*** This bug has been marked as a duplicate of bug 91668 ***