<?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>24424</bug_id>
          
          <creation_ts>2009-03-06 09:02:40 -0800</creation_ts>
          <short_desc>Unify JSC/V8 Location.idl</short_desc>
          <delta_ts>2009-03-10 15:56:21 -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>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></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="Mike Belshe">mbelshe</reporter>
          <assigned_to name="Mike Belshe">mbelshe</assigned_to>
          <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112595</commentid>
    <comment_count>0</comment_count>
    <who name="Mike Belshe">mbelshe</who>
    <bug_when>2009-03-06 09:02:40 -0800</bug_when>
    <thetext>There is no functionality difference between V8 and JSC here.

Implementation differences:
  * V8 uses CheckDomainSecurity on the interface.  (JSC does this in CustomGetOwnPropertySlot)
  * V8 assigns some methods on the instance to prevent cross site access.
  * V8 generates valueOf, which needs to be protected similarly to toString().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112596</commentid>
    <comment_count>1</comment_count>
      <attachid>28362</attachid>
    <who name="Mike Belshe">mbelshe</who>
    <bug_when>2009-03-06 09:08:04 -0800</bug_when>
    <thetext>Created attachment 28362
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112613</commentid>
    <comment_count>2</comment_count>
    <who name="Mike Belshe">mbelshe</who>
    <bug_when>2009-03-06 09:58:19 -0800</bug_when>
    <thetext>The reason to declare valueOf() is so that this code works:
   var foo = cross_site_protected_frame.location + &quot;boo&quot;;

The implicit conversion of location here will go through valueOf, and it should be protected just as toString is.  JSC deals with this in its own CustomPropertySlot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112620</commentid>
    <comment_count>3</comment_count>
      <attachid>28362</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-03-06 10:32:34 -0800</bug_when>
    <thetext>Comment on attachment 28362
patch

Do these V8OnInstance flags override &quot;custom&quot;?  or does &quot;Custom&quot; really mean &quot;JSCCustom&quot; these days?  Either way looks fine.  CCing Sam so he sees it go by as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112652</commentid>
    <comment_count>4</comment_count>
    <who name="Mike Belshe">mbelshe</who>
    <bug_when>2009-03-06 13:46:48 -0800</bug_when>
    <thetext>&quot;Custom&quot; (or &quot;JSCCustom&quot; or &quot;V8Custom&quot;) tells the IDL Code Generator &quot;don&apos;t generate binding for this, there is one hand-crafted&quot;.  The &quot;V8OnInstance&quot; tells the V8 code generator that this property should be installed on the object instance, rather than the prototype.  It is V8 specific (I&apos;ve made all V8-specific attributes start with &quot;V8&quot;), and the V8 code generator knows how to generate the binding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112667</commentid>
    <comment_count>5</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2009-03-06 14:59:45 -0800</bug_when>
    <thetext>Does this introduce difference between the JSC and V8 bindings?  That is something we should try very hard to avoid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112825</commentid>
    <comment_count>6</comment_count>
    <who name="Mike Belshe">mbelshe</who>
    <bug_when>2009-03-09 08:36:32 -0700</bug_when>
    <thetext>@Sam: No.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112881</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-03-09 12:48:52 -0700</bug_when>
    <thetext>	M	WebCore/ChangeLog
	M	WebCore/page/Location.idl
Committed r41535
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113074</commentid>
    <comment_count>8</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2009-03-10 15:56:21 -0700</bug_when>
    <thetext>After a little discussion, it seems that this patch did infact implement a different behavior than JSC, for one, putting the functions on the instance instead of the prototype.  The intent of my question was to try and stop any divergence at the bindings layer for the two js engines as that only hurts webkit.  

Mike, perhaps I misunderstood your answer?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>28362</attachid>
            <date>2009-03-06 09:08:04 -0800</date>
            <delta_ts>2009-03-06 10:32:34 -0800</delta_ts>
            <desc>patch</desc>
            <filename>bug24424.patch</filename>
            <type>text/plain</type>
            <size>1816</size>
            <attacher name="Mike Belshe">mbelshe</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0MTQ4MykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTAgQEAKKzIwMDktMDMtMDYgIE1pa2UgQmVsc2hlICA8bWlrZUBiZWxzaGUuY29t
PgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorICAgICAgICBVbmlmeSBK
U0MvVjggaWRsIGZpbGUuCisKKyAgICAgICAgKiBwYWdlL0xvY2F0aW9uLmlkbDoKKwogMjAwOS0w
My0wNiAgR3VzdGF2byB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dm9pZCBhc3Np
Z24oaW4gRE9NU3RyaW5nIHVybCk7CisgICAgICAgIFtDdXN0b20sIFY4T25JbnN0YW5jZV0gdm9p
ZCByZXBsYWNlKGluIERPTVN0cmluZyB1cmwpOworICAgICAgICBbQ3VzdG9tLCBWOE9uSW5zdGFu
Y2VdIHZvaWQgcmVsb2FkKCk7CiAKICAgICAgICAgLy8gVVJJIGRlY29tcG9zaXRpb24gYXR0cmli
dXRlcwogICAgICAgICAgICAgICAgICBhdHRyaWJ1dGUgW0N1c3RvbVNldHRlcl0gRE9NU3RyaW5n
IHByb3RvY29sOwpAQCAtNTAsNyArNTMsMTAgQEAgbW9kdWxlIHdpbmRvdyB7CiAgICAgICAgICAg
ICAgICAgIGF0dHJpYnV0ZSBbQ3VzdG9tU2V0dGVyXSBET01TdHJpbmcgaGFzaDsKIAogI2lmIGRl
ZmluZWQoTEFOR1VBR0VfSkFWQVNDUklQVCkKLSAgICAgICAgW0RvbnRFbnVtLCBDdXN0b21dIERP
TVN0cmluZyB0b1N0cmluZygpOworICAgICAgICBbRG9udEVudW0sIEN1c3RvbSwgVjhPbkluc3Rh
bmNlLCBWOFJlYWRPbmx5XSBET01TdHJpbmcgdG9TdHJpbmcoKTsKKyNlbmRpZgorI2lmIGRlZmlu
ZWQoVjhfQklORElORykKKyAgICAgICAgW0RvbnRFbnVtLCBDdXN0b20sIFY4T25JbnN0YW5jZSwg
VjhSZWFkT25seV0gRE9NT2JqZWN0IHZhbHVlT2YoKTsKICNlbmRpZgogICAgIH07Cg==
</data>
<flag name="review"
          id="13891"
          type_id="1"
          status="+"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>