NPRuntime 为什么需要 xpt 文件?

发布于 2024-08-21 10:50:25 字数 945 浏览 8 评论 0原文

我试图理解我所学到的有关 NPRuntime 的知识。 这里是来自 mozilla-centralNPRuntime 插件的 NPRuntime 插件示例,其中提到以下几行

// ==============================
145 // ! Scriptability related code !
146 // ==============================
147 //
148 // here the plugin is asked by Mozilla to tell if it is scriptable
149 // we should return a valid interface id and a pointer to 
150 // nsScriptablePeer interface which we should have implemented
151 // and which should be defined in the corressponding *.xpt file
152 // in the bin/components folder

现在 AFAIK NPRuntime desn不需要复制xpt文件,xpt文件特定于XPCOM并且NPRuntime不使用 XPCOM。那么上面的说法是什么意思呢?

I am trying to make sense of whatever I learned about NPRuntime. Here is a example of NPRuntime plugin from from mozilla-central of NPRuntime plugin, which mentions following lines

// ==============================
145 // ! Scriptability related code !
146 // ==============================
147 //
148 // here the plugin is asked by Mozilla to tell if it is scriptable
149 // we should return a valid interface id and a pointer to 
150 // nsScriptablePeer interface which we should have implemented
151 // and which should be defined in the corressponding *.xpt file
152 // in the bin/components folder

Now AFAIK NPRuntime desn't require to copy xpt file, xpt file is specific to XPCOM and NPRuntime does not use XPCOM. So what does above statement mean ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海蓝天 2024-08-28 10:50:25

正如您从实际代码中看到的那样,该评论是关于 xpt 和 nsScriptablePeer 的。请在 Core:Plugins 中提交有关此问题的错误,并在评论中提及它(补丁的奖励积分!)

That comment lies, both about xpt and the nsScriptablePeer, as you can see from the actual code. Please file a bug in Core:Plugins about this and mention it in a comment (bonus points for the patch!)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文