NPN_Evaluate changed from FFx 14 to FFx 15
Rudi Sherry <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.plugins |
|---|---|
| Message-ID | <[email protected]> |
We have a plugin that calls NPNEvaluate with "new Array;"
NPVariant outObj;
NPString str = { "new Array;", 10 };
NPBool success = NPN_Evaluate(ourInstance, jsObjectForPlugin, str, &outObj);
where 'jsObjectForPlugin' was set by the SetProperty callback, in the class returned when the container asked for NPPVpluginScriptableNPObject.
The HTML Javascript looks something like:
pluginObj.objForPlugin = { onMessage: function(msg) {}, onError: function(data) {} };
(which invokes the SetProperty method in our plugin class).
...so jsObjForPlugin corresponds to the inline object containing those two function properties.
In Firefox 14 (and every Firefox back to 3.x), NPN_Evaluate() returns 'true' and the outObj is type NPObject/
In Firefox 15, NPN_Evaluate() returns 'false' and the outObj is of type NPNull.
I looked briefly at the changes from 14 to 15 but there were too many, and some were too subtle, for me to figure out.
Does anyone have any suggestions? I tried "new Array();" instead of "new Array;" with no success.