簡體   English   中英

如何在最新的Firefox中簡單地測試XPCOM組件?

[英]How can I simply test the XPCOM component in the latest firefox?

在最新的firefox中,當您嘗試在Web控制台中使用以下代碼時,我發現了這一點:

netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

[10:33:00.787] Use of enablePrivilege is deprecated.  
Please use code that runs with the system principal (e.g. an extension) instead.

對於firefox 3.6,我總是使用這種方法來簡單地測試一些XPCOM組件,這非常方便。 但是在最新的Firefox中,我發現我已無法使用。

因此,如果當前我已經編寫了C ++ XPCOM組件,除了必須編寫和注冊另一個test component之外,是否有一種簡單的方法可以嘗試對其進行test component

當然,任何建議都非常感謝。

二進制(C ++)XPCOM使用是非常沉重勸阻(或把它更加堅定, 死死DEAD)在最近Firefox的建立:

MDN指定了獲取二進制XPCOM組件的替代方法,盡管我不知道有什么方法可以改善您的情況:

https://developer.mozilla.org/zh-CN/Firefox_addons_developer_guide/Using_XPCOM —Implementing_advanced_processes

以前,二進制組件現在應該使用js-ctypes:

https://developer.mozilla.org/en/js-ctypes

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM