Proposal for plugins "opting out" of handling resources

Josh Aas josh at
Wed Mar 21 13:45:50 PDT 2012

The proposal makes a reference to NPERR_PLUGIN_REFUSED - is this supposed to be NPERR_PLUGIN_OPT_OUT?

"Q: Should the plugin expect NP_Shutdown called after that?"

The answer to this should be whatever happens now when an error code is returned from NP_Initialize. Some testing should be done to confirm, but a quick glance at the relevant Mozilla source code suggests that the answer is no - a failed call to NP_Initialize will not be followed by a call to NP_Shutdown.

"NPP_NewStream: This is returned when the plugin can handle some resources but perhapse not others. There may be certain internal settings in the plugin that allow or disallow some resources, but that cannot be communicated with the browser. The browser would then act as if the plugin didn't exist for that one stream."

What is "This" referring to at the beginning of the description? NPERR_PLUGIN_OPT_OUT? It looks like it is referring to the function, which doesn't make sense. Please clarify.

I'm not sure if making NPERR_PLUGIN_OPT_OUT valid from NPP_NewStream makes sense. If you don't have a use case for your project and you can't think of a good one I'd rather leave it out. We can always add it later if it makes sense.

----- Original Message -----
From: "Rudi Sherry" <rsherry at>
To: "plugin-futures" <plugin-futures at>
Sent: Wednesday, March 14, 2012 4:06:39 PM
Subject: Proposal for plugins "opting out" of handling resources

I just added a proposal wherein a new error code means the plugin would like to politely refuse to load, or handle a specific stream, and the browser would then use its default implementation as if the plugin didn't exist.

The actual API changes are minimal: one new error code for some existing NP/NPP routines.

Questions?  Comments?


plugin-futures mailing list
plugin-futures at

More information about the plugin-futures mailing list