RESOLVED INVALID 15775
NPAPI behavioural differences with Safari
https://bugs.webkit.org/show_bug.cgi?id=15775
Summary NPAPI behavioural differences with Safari
Kai Hendry
Reported 2007-10-31 09:14:18 PDT
Safari seems to enter the plugin on NP_Initialize, whilst Opera&Firefox enter on a main function like: int main(NPNetscapeFuncs *pFuncs, NPPluginFuncs *pluginFuncs, NPP_ShutdownProcPtr *shutdown) This behavior only seems to happen on Darwin, as Opera&Firefox seem to enter on NP_Initialize on Linux/Win32. So perhaps this isn't a bug and Opera&Firefox Darwin plugin support needs updating. The Netscape Plugin Example /Developer/Examples/WebKit/NetscapeMoviePlugIn/ seems to imply that the _main function_ entry point is for old CFM legacy type stuff. That's misleading. Don't waste time ripping it out and find Opera&Firefox stop working. Also Localized.r seems to be required for Opera&Firefox and not Safari. Very odd. I found this reference: http://developer.mozilla.org/en/docs/Gecko_Plugin_API_Reference:Plug-in_Development_Overview#Mac_OS_X It would be nice if Opera&WebKit&Firefox were more in sync when it comes to plugin registration.
Attachments
Mark Rowe (bdash)
Comment 1 2007-11-01 03:13:19 PDT
The issue with the example code needs to be tracked through Radar. I see that you filed <rdar://problem/5570872> on that issue, which is great. This bugzilla entry can focus specifically on the behavioural difference between WebKit and Firefox/Opera when loading NPAPI plugins. Specifically, the problem is that "main" is not called by WebKit on a mach-o plugin while Firefox/Opera require it to be present for the plugin to be used in a page. This can be reproduced by doing modifying the NetscapeMoviePlugin sample code to remove the two references to "int main(...)". You can also verify with a debugger that "main" is invoked by both Firefox and Opera as part of the plugin initialization for mach-o plugins, not only for CFM binaries as WebKit currently does.
Mark Rowe (bdash)
Comment 2 2007-11-01 03:14:35 PDT
Anders Carlsson
Comment 3 2014-04-19 13:36:22 PDT
We've removed this example code.
Note You need to log in before you can comment on or make changes to this bug.