<?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>99977</bug_id>
          
          <creation_ts>2012-10-22 04:28:18 -0700</creation_ts>
          <short_desc>[WK2] Regression(r131990): plugins/npruntime/remove-property.html started failing</short_desc>
          <delta_ts>2012-10-22 12:33:56 -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>WebKit2</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>
          
          <blocked>99865</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Anders Carlsson">andersca</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>kling</cc>
    
    <cc>ossy</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>747410</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2012-10-22 04:28:18 -0700</bug_when>
    <thetext>plugins/npruntime/remove-property.html started failing consistently after r131990 so it looks like a regression.

I confirmed this on Mac, GTK and EFL ports.

The diff looks like:
--- /Volumes/Data/slave/mountainlion-debug-tests-wk2/build/layout-test-results/plugins/npruntime/remove-property-expected.txt
+++ /Volumes/Data/slave/mountainlion-debug-tests-wk2/build/layout-test-results/plugins/npruntime/remove-property-actual.txt
@@ -7,5 +7,5 @@
 PASS &apos;property&apos; in obj is true
 PASS &apos;property&apos; in obj is false
 PASS array[1] is 2
-PASS array[1] is undefined
+FAIL array[1] should be undefined (of type undefined). Was 2 (of type number).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747418</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2012-10-22 04:44:05 -0700</bug_when>
    <thetext>Skipped for EFL-WK2 in r132064.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747759</commentid>
    <comment_count>2</comment_count>
      <attachid>169956</attachid>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-10-22 12:15:30 -0700</bug_when>
    <thetext>Created attachment 169956
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747767</commentid>
    <comment_count>3</comment_count>
      <attachid>169956</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-10-22 12:19:55 -0700</bug_when>
    <thetext>Comment on attachment 169956
Patch

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

&gt; Source/WebKit2/ChangeLog:9
&gt; +        a temporary to be created which the number was then decoded into.

Is there a way to prevent this from happening in the future?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747768</commentid>
    <comment_count>4</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-10-22 12:21:07 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 169956 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=169956&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/ChangeLog:9
&gt; &gt; +        a temporary to be created which the number was then decoded into.
&gt; 
&gt; Is there a way to prevent this from happening in the future?

Yeah, I&apos;m going to remove the overload.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747772</commentid>
    <comment_count>5</comment_count>
      <attachid>169956</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-10-22 12:21:21 -0700</bug_when>
    <thetext>Comment on attachment 169956
Patch

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

&gt; Source/WebKit2/Shared/Plugins/NPIdentifierData.cpp:76
&gt; -        encoder-&gt;encode(static_cast&lt;int32_t&gt;(m_number));
&gt; +        encoder-&gt;encode(m_number);

Why are all the other encode casts still a good idea and this one not?

&gt; Source/WebKit2/Shared/Plugins/NPIdentifierData.cpp:87
&gt; -    return decoder-&gt;decode(static_cast&lt;int32_t&gt;(result.m_number));
&gt; +    return decoder-&gt;decode(result.m_number);

This cast is clearly wrong, but can’t we create an explicit temporary of the right type, instead? Was the whole idea of using these type casts a flawed one?

Why didn’t the compiler give an error, since we were passing a temporary as a non-const reference argument? Is that a compiler bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747776</commentid>
    <comment_count>6</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-10-22 12:24:02 -0700</bug_when>
    <thetext>Committed r132120: &lt;http://trac.webkit.org/changeset/132120&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747777</commentid>
    <comment_count>7</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-10-22 12:26:09 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 169956 [details])

&gt; Why didn’t the compiler give an error, since we were passing a temporary as a non-const reference argument? Is that a compiler bug?

The ArgumentDecoder overload takes a const reference and casts away the constness. I&apos;m going to get rid of that overload.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>747779</commentid>
    <comment_count>8</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2012-10-22 12:33:56 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 169956 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=169956&amp;action=review
&gt; 
&gt; &gt; Source/WebKit2/Shared/Plugins/NPIdentifierData.cpp:76
&gt; &gt; -        encoder-&gt;encode(static_cast&lt;int32_t&gt;(m_number));
&gt; &gt; +        encoder-&gt;encode(m_number);
&gt; 
&gt; Why are all the other encode casts still a good idea and this one not?
&gt;

I think that the ones that cast between int32_t and int are completely unnecessary.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>169956</attachid>
            <date>2012-10-22 12:15:30 -0700</date>
            <delta_ts>2012-10-22 12:21:21 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-99977-20121022121408.patch</filename>
            <type>text/plain</type>
            <size>3632</size>
            <attacher name="Anders Carlsson">andersca</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMyMTA2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggYzIwNDM4ZGQwM2MzN2Rm
NmFkYWJjOTRlMjQyODlhMWQ1OTk4M2JmMi4uNjRjMjAwZmQ4OGY5MGEyNDM2NGZjZmY3NjU1Mjc1
N2JhZGMxYmFhMSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJLaXQyL0NoYW5nZUxvZwpAQCAtMSw1ICsxLDE5IEBACiAyMDEyLTEwLTIyICBBbmRl
cnMgQ2FybHNzb24gIDxhbmRlcnNjYUBhcHBsZS5jb20+CiAKKyAgICAgICAgW1dLMl0gUmVncmVz
c2lvbihyMTMxOTkwKTogcGx1Z2lucy9ucHJ1bnRpbWUvcmVtb3ZlLXByb3BlcnR5Lmh0bWwgc3Rh
cnRlZCBmYWlsaW5nCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNn
aT9pZD05OTk3NworCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAg
ICAgIFJlbW92ZSBpbnQz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VkZWViN2I0MTM2MzlhIDEwMDY0NAotLS0gYS9MYXlvdXRUZXN0cy9wbGF0Zm9y
bS9lZmwtd2syL1Rlc3RFeHBlY3RhdGlvbnMKKysrIGIvTGF5b3V0VGVzdHMvcGxhdGZvcm0vZWZs
LXdrMi9UZXN0RXhwZWN0YXRpb25zCkBAIC0yNDcsOSArMjQ3LDYgQEAgd2Via2l0Lm9yZy9iLzk4
NzQxIHBsdWdpbnMvcmVmY291bnQtbGVha3MuaHRtbCBbIEZhaWx1cmUgXQogIyBOUFBfU2V0V2lu
ZG93IGlzIG5vdCBjYWxsZWQgZHVyaW5nIHBsdWdpbiBkZXN0cnVjdGlvbiBvbiBYMTEuCiB3ZWJr
aXQub3JnL2IvNjMyNjEgcGx1Z2lucy9ucHAtc2V0LXdpbmRvdy1jYWxsZWQtZHVyaW5nLWRlc3Ry
dWN0aW9uLmh0bWwgWyBGYWlsdXJlIF0KIAotIyBUZXN0IHN0YXJ0ZWQgZmFpbGluZyBvbiBhbGwg
V0syIHBvcnRzIGFmdGVyIHIxMzE5OTAuCi13ZWJraXQub3JnL2IvOTk5NzcgcGx1Z2lucy9ucHJ1
bnRpbWUvcmVtb3ZlLXByb3BlcnR5Lmh0bWwgWyBGYWlsdXJlIF0KLQogIyBEZWxldGUgcGx1Z2lu
IGZhaWx1cmVzLgogd2Via2l0Lm9yZy9iLzk4NzQwIHBsdWdpbnMvbnBydW50aW1lL2RlbGV0ZS1w
bHVnaW4td2l0aGluLWhhc1Byb3BlcnR5LXJldHVybi1mYWxzZS5odG1sIFsgRmFpbHVyZSBdCiB3
ZWJraXQub3JnL2IvOTg3NDAgcGx1Z2lucy9ucHJ1bnRpbWUvZGVsZXRlLXBsdWdpbi13aXRoaW4t
aGFzUHJvcGVydHktcmV0dXJuLXRydWUuaHRtbCBbIEZhaWx1cmUgXQo=
</data>
<flag name="review"
          id="183409"
          type_id="1"
          status="+"
          setter="ap"
    />
          </attachment>
      

    </bug>

</bugzilla>