RESOLVED INVALID Bug 20305
NPAPI: === returns false for identical NPObjects returned from a plugin.
https://bugs.webkit.org/show_bug.cgi?id=20305
Summary NPAPI: === returns false for identical NPObjects returned from a plugin.
Jeremy Moskovich
Reported 2008-08-06 09:23:02 PDT
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
Attachments
Mark Rowe (bdash)
Comment 1 2008-08-06 14:53:29 PDT
Jeremy Moskovich
Comment 2 2008-08-06 22:05:58 PDT
Correction == returns false as well.
Thatcher Ulrich
Comment 3 2008-10-27 15:42:45 PDT
See https://bugs.webkit.org/show_bug.cgi?id=20305 for specific repro steps.
Thatcher Ulrich
Comment 4 2009-10-15 09:37:26 PDT
Link to Chromium bug w/ specific repro steps: http://code.google.com/p/chromium/issues/detail?id=3786
michaelbraithwaite
Comment 5 2011-06-14 07:55:49 PDT
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
duncantebbs
Comment 6 2012-01-30 20:54:27 PST
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.
Alexey Proskuryakov
Comment 7 2012-01-30 21:40:51 PST
This bug is in a pretty much useless state. Is it about Chrome or Safari, WebKit1 or WebKit2?
duncantebbs
Comment 8 2012-01-30 22:05:50 PST
I've created a new bug for the JS -> plugin direction (which was under Safari) https://bugs.webkit.org/show_bug.cgi?id=77404
Anders Carlsson
Comment 9 2016-05-30 11:14:01 PDT
I think this works with WebKit2. If it doesn't work, we're not likely to fix it - our plug-in code is in maintenance mode only.
Note You need to log in before you can comment on or make changes to this bug.