开发者

Developing an out-of-process browser plugin on Mac OS X v10.6 -- restriction against platform APIs?

开发者 https://www.devze.com 2022-12-16 17:57 出处:网络
I\'m currently developing a browser plugin for MacOSX 10.6, and am planning to use the netscape API for portability across browsers and architectures. According to Apple\'s documentation, as of 10.6 s

I'm currently developing a browser plugin for MacOSX 10.6, and am planning to use the netscape API for portability across browsers and architectures. According to Apple's documentation, as of 10.6 such plugins run out-of-process to improve the integrity of the browser session. What I'm concerned about is the following directive they give in the documentation:

Use platform APIs sparingly. Wherever possible, you should use new plug-in APIs to do what you need. If no such APIs exist, file bugs re开发者_StackOverflow社区questing them.

I'm not sure what the nature of this directive is. Is this advice to improve portability of the plugin, a reminder that accessing the operating system's other APIs can open up the possibility of crashing the client or corrupting a user's data, or an indication that access to the platform APIs is in some way "broken?"


Its portability advice. The NPAPI is, although not officially standardized, fairly stable and already wraps some platform specific APIs for you.

If you try to use NPAPI whenever possible, you avoid quite some porting as e.g. it happened relatively recently with Apple effectively deprecating Carbon when transitioning to 64 bit.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号