NPAPI Questions: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (markup)
(questions found by accident)
Line 10: Line 10:


; Are there instances where making calls using NPRuntime is disallowed? (e.g. re-entering script from NPP_New can cause crashes in gecko)
; Are there instances where making calls using NPRuntime is disallowed? (e.g. re-entering script from NPP_New can cause crashes in gecko)
; After NPP_NewStream is called, who owns the notifyData field of NPStream? : Flash uses this field to store scratch data. Plugins should be allowed to store data and modify this field after the initial call to NPP_NewStream.

Revision as of 20:26, 28 September 2009

These are questions that bsmedberg found while trying to implement remoting for pieces of the NPAPI. I'd like to have tests and docs for these once the answers are known:

NPN_GetURL and family have an optional target; does the behavior change if the target is null versus the empty string ""?
Yes. If the parameter is NULL, the data is sent back to the plugin as a stream. If the parameter is "", the current window is replaced with the URL.
NPStream has a url field; are there cases where this may be null? If so, would making it the empty string change the behavior?
Do streams receieve a NPP_Destroy message before the associated instance is killed with NPP_Destroy? What reason code is given?
Do url notifications receieve a NPP_URLNotify message before the associated instance is killed with NPP_Destroy? What reason code is given?
Are there instances where making calls using NPRuntime is disallowed? (e.g. re-entering script from NPP_New can cause crashes in gecko)
After NPP_NewStream is called, who owns the notifyData field of NPStream?
Flash uses this field to store scratch data. Plugins should be allowed to store data and modify this field after the initial call to NPP_NewStream.