Bug 91148 - [V8] Replaceable WebIDL attributes are broken
Summary: [V8] Replaceable WebIDL attributes are broken
Status: RESOLVED DUPLICATE of bug 91668
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://www.w3.org/TR/WebIDL/#Replaceable
Depends on: 49739
  Show dependency treegraph
Reported: 2012-07-12 14:16 PDT by Erik Arvidsson
Modified: 2012-07-19 11:56 PDT (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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) {
      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 ***