<?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>18737</bug_id>
          
          <creation_ts>2008-04-25 01:12:46 -0700</creation_ts>
          <short_desc>__lookupSetter__ and __lookupGetter__ don&apos;t work for getting native setters and getters</short_desc>
          <delta_ts>2012-03-07 00:10:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>49739</dup_id>
          
          <bug_file_loc>javascript:alert(Attr.prototype.__lookupSetter__(&quot;value&quot;));</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael A. Puls II">shadow2531</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>joker806</cc>
    
    <cc>webmaster</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78890</commentid>
    <comment_count>0</comment_count>
    <who name="Michael A. Puls II">shadow2531</who>
    <bug_when>2008-04-25 01:12:46 -0700</bug_when>
    <thetext>Safari 3.1 (525.13) with WebKit-SVN-r32486.

Getting native setters and getters works in Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78956</commentid>
    <comment_count>1</comment_count>
    <who name="Michael A. Puls II">shadow2531</who>
    <bug_when>2008-04-25 23:05:54 -0700</bug_when>
    <thetext>It doesn&apos;t work on instances either.

javascript:alert(document.createAttribute(&quot;instance&quot;).__lookupGetter__(&quot;value&quot;))

That works in FF and Opera 9.5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83536</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2008-06-16 13:49:03 -0700</bug_when>
    <thetext>The reason this does not work is that value is a not a getter/setter, but rather an attribute.  It is an implementation detail that Firefox implements native attributes as getter/setter functions.  Changing our implementation to do this would be a probable performance hit, so I can only really see doing this if there is a real world need.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83590</commentid>
    <comment_count>3</comment_count>
    <who name="Michael A. Puls II">shadow2531</who>
    <bug_when>2008-06-17 03:57:46 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; The reason this does not work is that value is a not a getter/setter, but
&gt; rather an attribute.  It is an implementation detail that Firefox implements
&gt; native attributes as getter/setter functions.  Changing our implementation to
&gt; do this would be a probable performance hit, so I can only really see doing
&gt; this if there is a real world need.
&gt; 

Would making it work for instances be acceptable, or would that be just as much as a performance concern?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86861</commentid>
    <comment_count>4</comment_count>
      <attachid>22467</attachid>
    <who name="Michael A. Puls II">shadow2531</who>
    <bug_when>2008-07-24 09:49:09 -0700</bug_when>
    <thetext>Created attachment 22467
Example that works in Opera 9.5 and Firefox 3, but not in Safari with latest webkit

(In reply to comment #2)
&gt; so I can only really see doing
&gt; this if there is a real world need.

See the source of the attachment for an example.

If not, how bout just for compatibility with Firefox and Opera?

Or, maybe try out the change and see how much performance is affected? (Maybe it&apos;d be acceptable?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89605</commentid>
    <comment_count>5</comment_count>
    <who name="Michael A. Puls II">shadow2531</who>
    <bug_when>2008-08-27 21:50:05 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; It doesn&apos;t work on instances either.
&gt; 
&gt; javascript:alert(document.createAttribute(&quot;instance&quot;).__lookupGetter__(&quot;value&quot;))
&gt; 
&gt; That works in FF and Opera 9.5.
&gt; 

This works in Opera 9.5+, Firefox and IE8 beta 2.

javascript:alert(document.createTextNode(&quot;instance&quot;).__lookupGetter__(&quot;nodeValue&quot;))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124304</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-06-04 07:27:12 -0700</bug_when>
    <thetext>See also: bug 12721.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>572629</commentid>
    <comment_count>7</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2012-03-07 00:10:12 -0800</bug_when>
    <thetext>The problem here isn&apos;t that __lookupGetter__/Setter are doing the wrong thing, the problem is that the properties aren&apos;t actually accessors (but per the WebIDL spec should be).

*** This bug has been marked as a duplicate of bug 49739 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>22467</attachid>
            <date>2008-07-24 09:49:09 -0700</date>
            <delta_ts>2008-07-24 09:49:09 -0700</delta_ts>
            <desc>Example that works in Opera 9.5 and Firefox 3, but not in Safari with latest webkit</desc>
            <filename>getset.html</filename>
            <type>text/html</type>
            <size>3301</size>
            <attacher name="Michael A. Puls II">shadow2531</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KICAgIDxoZWFkPgogICAgICAgIDxtZXRh
IGNoYXJzZXQ9InV0Zi04Ij4KICAgICAgICA8dGl0bGU+PC90aXRsZT4KICAgICAgICA8c2NyaXB0
PgogICAgICAgICAgICAvLyBCcm93c2VyIHRleHRhcmVhLnZhbHVlIG5ld2xpbmUgbm9ybWFsaXph
dGlvbiB2YXJpZXMgYmV0d2VlbiBwYXJzaW5nLCB1c2VyIGlucHV0LCBKUyBpbnB1dC4KICAgICAg
ICAgICAgLy8gYW5k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9va3VwR2V0dGVy
X18gJiYgaW5zdGFuY2UuX19sb29rdXBTZXR0ZXJfXykgewogICAgICAgICAgICAgICAgICAgIHZh
ciBnZXRWYWx1ZSA9IGluc3RhbmNlLl9fbG9va3VwR2V0dGVyX18oInZhbHVlIik7CiAgICAgICAg
ICAgICAgICAgICAgdmFyIHNldFZhbHVlID0gaW5zdGFuY2UuX19sb29rdXBTZXR0ZXJfXygidmFs
dWUiKTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGdldFZhbHVlID09ICJmdW5jdGlv
biIgJiYgdHlwZW9mIHNldFZhbHVlID09ICJmdW5jdGlvbiIpIHsKICAgICAgICAgICAgICAgICAg
ICAgICAgSFRNTFRleHRBcmVhRWxlbWVudC5wcm90b3R5cGUuX19kZWZpbmVHZXR0ZXJfXygidmFs
dWUiLCBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRW
YWx1ZS5jYWxsKHRoaXMpLnJlcGxhY2UoL1xyXG58XHJ8XG4vZywgIlxyXG4iKTsKICAgICAgICAg
ICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgIEhUTUxUZXh0QXJlYUVs
ZW1lbnQucHJvdG90eXBlLl9fZGVmaW5lU2V0dGVyX18oInZhbHVlIiwgZnVuY3Rpb24odikgewog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VmFsdWUuY2FsbCh0aGlzLCB2LnJlcGxhY2Uo
L1xyXG58XHJ8XG4vZywgIlxyXG4iKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAg
ICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAg
ICAgICBpZiAoZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcikgewogICAgICAgICAgICAgICAgZG9j
dW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigiRE9NQ29udGVudExvYWRlZCIsIGZ1bmN0aW9uKCkgewog
ICAgICAgICAgICAgICAgICAgIHZhciB0YSA9IGRvY3VtZW50LmV2YWx1YXRlKCIvL3RleHRhcmVh
IiwgZG9jdW1lbnQuYm9keSwgbnVsbCwgWFBhdGhSZXN1bHQuRklSU1RfT1JERVJFRF9OT0RFX1RZ
UEUsIG51bGwpLnNpbmdsZU5vZGVWYWx1ZTsKICAgICAgICAgICAgICAgICAgICB0YS5mb3JtLnJl
c2V0KCk7CiAgICAgICAgICAgICAgICAgICAgdGEudmFsdWUgKz0gIlxuTGluZTMiOwogICAgICAg
ICAgICAgICAgICAgIGFsZXJ0KGVuY29kZVVSSUNvbXBvbmVudCh0YS52YWx1ZSkgPT0gIkxpbmUx
JTBEJTBBTGluZTIlMEQlMEFMaW5lMyIpOwogICAgICAgICAgICAgICAgfSwgZmFsc2UpOwogICAg
ICAgICAgICB9CiAgICAgICAgPC9zY3JpcHQ+CiAgICA8L2hlYWQ+CiAgICA8Ym9keT4KICAgICAg
ICA8Zm9ybT4KICAgICAgICAgICAgPHA+PHRleHRhcmVhIHJvd3M9IjMiIG9uaW5wdXQ9ImFsZXJ0
KGVuY29kZVVSSUNvbXBvbmVudCh0aGlzLnZhbHVlKSkiPkxpbmUxCkxpbmUyPC90ZXh0YXJlYT4K
ICAgICAgICAgICAgPC9wPgogICAgICAgIDwvZm9ybT4KICAgIDwvYm9keT4KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>