<?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>20305</bug_id>
          
          <creation_ts>2008-08-06 09:23:02 -0700</creation_ts>
          <short_desc>NPAPI: === returns false for identical NPObjects returned from a plugin.</short_desc>
          <delta_ts>2016-05-30 11:14:01 -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>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeremy Moskovich">playmobil</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>duncantebbs</cc>
    
    <cc>michaelbraithwaite</cc>
    
    <cc>tulrich</cc>
    
    <cc>zwarich</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87968</commentid>
    <comment_count>0</comment_count>
    <who name="Jeremy Moskovich">playmobil</who>
    <bug_when>2008-08-06 09:23:02 -0700</bug_when>
    <thetext>The === JS operator appears to have a bug when comparing identical NPObjects returned from a plugin.

a = plugin.getObject();
b = plugin.getObject(); // Returns the same underlying object as the one above.

// a === b is false, a == b is true.

alert(a); // NPObject 0x865c3d4, NPClass 0x4d7e780
alert(b); // NPObject 0x865c3d4, NPClass 0x4d7e780
alert(typeof(a)); // object</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87988</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2008-08-06 14:53:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/6130751&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88021</commentid>
    <comment_count>2</comment_count>
    <who name="Jeremy Moskovich">playmobil</who>
    <bug_when>2008-08-06 22:05:58 -0700</bug_when>
    <thetext>Correction == returns false as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96800</commentid>
    <comment_count>3</comment_count>
    <who name="Thatcher Ulrich">tulrich</who>
    <bug_when>2008-10-27 15:42:45 -0700</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=20305 for specific repro steps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>154811</commentid>
    <comment_count>4</comment_count>
    <who name="Thatcher Ulrich">tulrich</who>
    <bug_when>2009-10-15 09:37:26 -0700</bug_when>
    <thetext>Link to Chromium bug w/ specific repro steps: http://code.google.com/p/chromium/issues/detail?id=3786</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>420412</commentid>
    <comment_count>5</comment_count>
    <who name="">michaelbraithwaite</who>
    <bug_when>2011-06-14 07:55:49 -0700</bug_when>
    <thetext>Another Chrome bug on the same === failing issue has a recent fix for it. 

See http://code.google.com/p/chromium/issues/detail?id=5751</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545760</commentid>
    <comment_count>6</comment_count>
    <who name="">duncantebbs</who>
    <bug_when>2012-01-30 20:54:27 -0800</bug_when>
    <thetext>The problem appears to exist in the other direction too, i.e. when passing objects from JS to the plugin.

  var a = {};
  plugin.f(a, a); 

The plugin sees an argument list containing two different NPObject pointers.  On Firefox and Chrome, the same NPObject pointer appears twice in the list, allowing the plugin to test whether the arguments are the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545780</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-01-30 21:40:51 -0800</bug_when>
    <thetext>This bug is in a pretty much useless state. Is it about Chrome or Safari, WebKit1 or WebKit2?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>545784</commentid>
    <comment_count>8</comment_count>
    <who name="">duncantebbs</who>
    <bug_when>2012-01-30 22:05:50 -0800</bug_when>
    <thetext>I&apos;ve created a new bug for the JS -&gt; plugin direction (which was under Safari)

https://bugs.webkit.org/show_bug.cgi?id=77404</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1197645</commentid>
    <comment_count>9</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2016-05-30 11:14:01 -0700</bug_when>
    <thetext>I think this works with WebKit2. If it doesn&apos;t work, we&apos;re not likely to fix it - our plug-in code is in maintenance mode only.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>