<?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>100853</bug_id>
          
          <creation_ts>2012-10-31 06:55:46 -0700</creation_ts>
          <short_desc>[V8] Cleanup V8DOMWrapper::getCachedWrapper</short_desc>
          <delta_ts>2012-11-07 03:15:03 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>0</everconfirmed>
          <reporter name="Dan Carney">dcarney</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>haraken</cc>
    
    <cc>japhet</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>755250</commentid>
    <comment_count>0</comment_count>
    <who name="Dan Carney">dcarney</who>
    <bug_when>2012-10-31 06:55:46 -0700</bug_when>
    <thetext>[V8] Cleanup V8DOMWrapper::getCachedWrapper</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>755252</commentid>
    <comment_count>1</comment_count>
      <attachid>171643</attachid>
    <who name="Dan Carney">dcarney</who>
    <bug_when>2012-10-31 06:57:22 -0700</bug_when>
    <thetext>Created attachment 171643
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>755260</commentid>
    <comment_count>2</comment_count>
      <attachid>171643</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-10-31 07:03:36 -0700</bug_when>
    <thetext>Comment on attachment 171643
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=171643&amp;action=review

&gt; Source/WebCore/bindings/v8/V8DOMWrapper.h:-115
&gt; -                v8::Persistent&lt;v8::Object&gt; wrapper = node-&gt;wrapper();
&gt; -                if (LIKELY(!wrapper.IsEmpty()))

Why is this branch redundant? This branch will fail and has to fall back to the following slow path in a case where we are in the main world and a wrapper has not yet created for a given node, won&apos;t it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>755335</commentid>
    <comment_count>3</comment_count>
      <attachid>171643</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-10-31 08:42:27 -0700</bug_when>
    <thetext>Comment on attachment 171643
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=171643&amp;action=review

&gt;&gt; Source/WebCore/bindings/v8/V8DOMWrapper.h:-115
&gt;&gt; -                if (LIKELY(!wrapper.IsEmpty()))
&gt; 
&gt; Why is this branch redundant? This branch will fail and has to fall back to the following slow path in a case where we are in the main world and a wrapper has not yet created for a given node, won&apos;t it?

You&apos;re right Kentaro, but this function is only responsible for getting the cached wrapper.  The caller of this function will create the wrapper if this function returns an empty handle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>755347</commentid>
    <comment_count>4</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-10-31 08:49:11 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; &gt; Why is this branch redundant? This branch will fail and has to fall back to the following slow path in a case where we are in the main world and a wrapper has not yet created for a given node, won&apos;t it?
&gt; 
&gt; You&apos;re right Kentaro, but this function is only responsible for getting the cached wrapper.  The caller of this function will create the wrapper if this function returns an empty handle.

Makes sense. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>760496</commentid>
    <comment_count>5</comment_count>
      <attachid>171643</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-11-07 03:14:59 -0800</bug_when>
    <thetext>Comment on attachment 171643
Patch

Clearing flags on attachment: 171643

Committed r133734: &lt;http://trac.webkit.org/changeset/133734&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>760497</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-11-07 03:15:03 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>171643</attachid>
            <date>2012-10-31 06:57:22 -0700</date>
            <delta_ts>2012-11-07 03:14:59 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-100853-20121031145545.patch</filename>
            <type>text/plain</type>
            <size>2017</size>
            <attacher name="Dan Carney">dcarney</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMzMDIwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggYWZmYTg2MDZmNDM2Yjg5
ZmIxNWQ2Zjc0OGY5YjE4NWIzYWNhODA1Yi4uZjZlZTkwNjc3ZjY4Y2VjODcwYTI0YzIyN2QyYjY3
YmQzM2IyN2ZhNSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDEyLTEwLTMxICBEYW4g
Q2FybmV5ICA8ZGNhcm5leUBnb29nbGUuY29tPgorCisgICAgICAgIFtWOF0gQ2xlYW51cCBWOERP
TVdyYXBwZXI6OmdldENhY2hlZFdyYXBwZXIKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5v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IoTm9kZSogbm9kZSkKICAgICAg
ICAgewogICAgICAgICAgICAgQVNTRVJUKGlzTWFpblRocmVhZCgpKTsKLSAgICAgICAgICAgIGlm
IChMSUtFTFkoIURPTVdyYXBwZXJXb3JsZDo6aXNvbGF0ZWRXb3JsZHNFeGlzdCgpKSkgewotICAg
ICAgICAgICAgICAgIHY4OjpQZXJzaXN0ZW50PHY4OjpPYmplY3Q+IHdyYXBwZXIgPSBub2RlLT53
cmFwcGVyKCk7Ci0gICAgICAgICAgICAgICAgaWYgKExJS0VMWSghd3JhcHBlci5Jc0VtcHR5KCkp
KQotICAgICAgICAgICAgICAgICAgICByZXR1cm4gd3JhcHBlcjsKLSAgICAgICAgICAgIH0KKyAg
ICAgICAgICAgIGlmIChMSUtFTFkoIURPTVdyYXBwZXJXb3JsZDo6aXNvbGF0ZWRXb3JsZHNFeGlz
dCgpKSkKKyAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS0+d3JhcHBlcigpOwogCiAgICAgICAg
ICAgICBWOERPTVdpbmRvd1NoZWxsKiBjb250ZXh0ID0gVjhET01XaW5kb3dTaGVsbDo6Z2V0RW50
ZXJlZCgpOwogICAgICAgICAgICAgaWYgKExJS0VMWSghY29udGV4dCkpCiAgICAgICAgICAgICAg
ICAgcmV0dXJuIG5vZGUtPndyYXBwZXIoKTsKIAotICAgICAgICAgICAgRE9NRGF0YVN0b3JlKiBz
dG9yZSA9IGNvbnRleHQtPndvcmxkKCktPmRvbURhdGFTdG9yZSgpOwotICAgICAgICAgICAgRE9N
V3JhcHBlck1hcDxOb2RlPiYgZG9tTm9kZU1hcCA9IHN0b3JlLT5kb21Ob2RlTWFwKCk7Ci0gICAg
ICAgICAgICByZXR1cm4gZG9tTm9kZU1hcC5nZXQobm9kZSk7CisgICAgICAgICAgICByZXR1cm4g
Y29udGV4dC0+d29ybGQoKS0+ZG9tRGF0YVN0b3JlKCktPmRvbU5vZGVNYXAoKS5nZXQobm9kZSk7
CiAgICAgICAgIH0KICAgICB9OwogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>