<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>91148</bug_id>
          
          <creation_ts>2012-07-12 14:16:59 -0700</creation_ts>
          <short_desc>[V8] Replaceable WebIDL attributes are broken</short_desc>
          <delta_ts>2012-07-19 11:56:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>91668</dup_id>
          
          <bug_file_loc>http://www.w3.org/TR/WebIDL/#Replaceable</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>49739</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik Arvidsson">arv</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>antonm</cc>
    
    <cc>atwilson</cc>
    
    <cc>haraken</cc>
    
    <cc>japhet</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>668201</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2012-07-12 14:16:59 -0700</bug_when>
    <thetext>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(&apos;window.innerHeight&apos;, &apos;42&apos;);
shouldBeTrue(&apos;Object.getOwnPropertyDescriptor(window, &quot;innerHeight&quot;).writable)&apos;);

Once we implement bug 49739 the setter needs to defineProperty on the this object. Something like

{
  get: function() {
    return impl-&gt;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>668206</commentid>
    <comment_count>1</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2012-07-12 14:20:08 -0700</bug_when>
    <thetext>Sorry, this is only a problem with es5_readonly which we are trying to turn on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>673752</commentid>
    <comment_count>2</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2012-07-19 11:56:59 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 91668 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>