mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 989307 - Make FUEL warn deprecation to the console on first usage. r=jaws
This commit is contained in:
parent
2ab9995437
commit
dccd44dc23
@ -258,7 +258,7 @@ const gXPInstallObserver = {
|
||||
label: gNavigatorBundle.getString("addonInstallRestartButton"),
|
||||
accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"),
|
||||
callback: function() {
|
||||
Application.restart();
|
||||
BrowserUtils.restartApplication();
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -374,7 +374,7 @@ var LightWeightThemeWebInstaller = {
|
||||
label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"),
|
||||
accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"),
|
||||
callback: function () {
|
||||
Application.restart();
|
||||
BrowserUtils.restartApplication();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3924,8 +3924,8 @@
|
||||
<!-- Deprecated stuff, implemented for backwards compatibility. -->
|
||||
<method name="enterTabbedMode">
|
||||
<body>
|
||||
Application.console.log("enterTabbedMode is an obsolete method and " +
|
||||
"will be removed in a future release.");
|
||||
Services.console.logStringMessage("enterTabbedMode is an obsolete method and " +
|
||||
"will be removed in a future release.");
|
||||
</body>
|
||||
</method>
|
||||
<field name="mTabbedMode" readonly="true">true</field>
|
||||
|
@ -6,6 +6,8 @@ const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Deprecated",
|
||||
"resource://gre/modules/Deprecated.jsm");
|
||||
|
||||
const APPLICATION_CID = Components.ID("fe74cf80-aa2d-11db-abbd-0800200c9a66");
|
||||
const APPLICATION_CONTRACTID = "@mozilla.org/fuel/application;1";
|
||||
@ -734,6 +736,9 @@ var ApplicationFactory = {
|
||||
//=================================================
|
||||
// Application constructor
|
||||
function Application() {
|
||||
Deprecated.warning("FUEL is deprecated, you should use the add-on SDK instead.",
|
||||
"https://developer.mozilla.org/Add-ons/SDK/");
|
||||
|
||||
this.initToolkitHelpers();
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,21 @@ this.BrowserUtils = {
|
||||
dump("\n");
|
||||
},
|
||||
|
||||
/**
|
||||
* restartApplication: Restarts the application, keeping it in
|
||||
* safe mode if it is already in safe mode.
|
||||
*/
|
||||
restartApplication: function() {
|
||||
let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
|
||||
.getService(Ci.nsIAppStartup);
|
||||
//if already in safe mode restart in safe mode
|
||||
if (Services.appinfo.inSafeMode) {
|
||||
appStartup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
return;
|
||||
}
|
||||
appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
},
|
||||
|
||||
/**
|
||||
* urlSecurityCheck: JavaScript wrapper for checkLoadURIWithPrincipal
|
||||
* and checkLoadURIStrWithPrincipal.
|
||||
|
Loading…
Reference in New Issue
Block a user