Bug 1539948, part 2 - Make nsIWebNavigation and nsIWindowlessBrowser builtinclass. r=nika,Gijs

These two interfaces contain nostdcall methods, so they should be marked
builtinclass.

There is a JS implementation of nsIWebNavigation in RemoteWebNavigation,
but it appears to never be passed into C++, so it doesn't need to be
made into a "real" implementation of nsIWebNavigation that can be passed
through XPConnect.

Differential Revision: https://phabricator.services.mozilla.com/D98862
This commit is contained in:
Andrew McCreight 2020-12-09 02:40:14 +00:00
Родитель b5a782a3f1
Коммит 9cc98c8bf5
3 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -28,8 +28,12 @@ struct LoadURIOptions;
* It provides methods and attributes to direct an object to navigate to a new
* location, stop or restart an in process load, or determine where the object
* has previously gone.
*
* Even though this is builtinclass, most of the interface is also implemented
* in RemoteWebNavigation, so if this interface changes, the implementation
* there may also need to change.
*/
[scriptable, uuid(3ade79d4-8cb9-4952-b18d-4f9b63ca0d31)]
[scriptable, builtinclass, uuid(3ade79d4-8cb9-4952-b18d-4f9b63ca0d31)]
interface nsIWebNavigation : nsISupports
{
/**

Просмотреть файл

@ -14,6 +14,7 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/PrivateBrowsingUtils.jsm"
);
// This object implements the JS parts of nsIWebNavigation.
class RemoteWebNavigation {
constructor(aBrowser) {
this._browser = aBrowser;
@ -22,7 +23,6 @@ class RemoteWebNavigation {
this._canGoBack = false;
this._canGoForward = false;
this.referringURI = null;
this.wrappedJSObject = this;
}
swapBrowser(aBrowser) {
@ -179,8 +179,4 @@ class RemoteWebNavigation {
}
}
RemoteWebNavigation.prototype.QueryInterface = ChromeUtils.generateQI([
"nsIWebNavigation",
]);
var EXPORTED_SYMBOLS = ["RemoteWebNavigation"];

Просмотреть файл

@ -15,7 +15,7 @@ webidl BrowsingContext;
* A strong reference to this object must be held until the window is
* ready to be destroyed.
*/
[scriptable, uuid(abb46f48-abfc-41bf-aa9a-7feccefcf977)]
[scriptable, builtinclass, uuid(abb46f48-abfc-41bf-aa9a-7feccefcf977)]
interface nsIWindowlessBrowser : nsIWebNavigation
{
/**