*
* ***** END LICENSE BLOCK ***** */
-Components.utils.import("resource://gre/modules/Services.jsm");
+//Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
function AboutMandelbrot() { }
},
newChannel: function(aURI) {
- let channel = Services.io.newChannel("chrome://mandelbrot/content/mandelbrot-tab.xul",
- null, null);
+ //let channel = Services.io.newChannel("chrome://mandelbrot/content/mandelbrot-tab.xul",
+ // null, null);
+ let ios = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+ let channel = ios.newChannel("chrome://mandelbrot/content/mandelbrot-tab.xul",
+ null, null);
channel.originalURI = aURI;
return channel;
}
class="tabbable"
label="&debugMenu.label;">
<menupopup id="menu_debugPopup" onpopupshowing="updateDebugMenu();">
+ <menuitem type="checkbox" id="jitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, '');" hidden="true"/>
<menuitem type="checkbox" id="tracejitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, 'trace');"/>
<menuitem type="checkbox" id="methodjitEnabled" label="&methodjitEnabled.label;" oncommand="toggleJITState(event.target, 'method');"/>
<menu id="algoMenu" label="&algoMenu.label;">
function updateDebugMenu() {
let scope = (document.getElementById("mandelbrotWindow").nodeName == "page") ? "content" : "chrome";
- for each (let type in ["tracejit", "methodjit"]) {
- let jitMenuItem = document.getElementById(type + "Enabled");
- jitMenuItem.setAttribute("checked", gPref.getBoolPref("javascript.options." + type + "." + scope));
+ try {
+ // This throws in versions that don't have JaegerMonkey yet --> catch block
+ gPref.getBoolPref("javascript.options.methodjit." + scope);
+
+ // We have JaegerMonkey, i.e. two prefs for trace/method JIT
+ for each (let type in ["tracejit", "methodjit"]) {
+ let jitMenuItem = document.getElementById(type + "Enabled");
+ jitMenuItem.setAttribute("checked", gPref.getBoolPref("javascript.options." + type + "." + scope));
+ }
+ }
+ catch (e) {
+ // We have TraceMonkey only, i.e. one JIT pref, care only that is displayed
+ for each (let type in ["tracejit", "methodjit"])
+ document.getElementById(type + "Enabled").hidden = true;
+ let jitMenuItem = document.getElementById("jitEnabled");
+ jitMenuItem.hidden = false;
+ jitMenuItem.setAttribute("checked", gPref.getBoolPref("javascript.options.jit." + scope));
}
}
</menu>
<menu id="debugMenu" label="&debugMenu.label;">
<menupopup id="menu_debugPopup" onpopupshowing="updateDebugMenu();">
+ <menuitem type="checkbox" id="jitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, '');" hidden="true"/>
<menuitem type="checkbox" id="tracejitEnabled" label="&tracejitEnabled.label;" oncommand="toggleJITState(event.target, 'trace');"/>
<menuitem type="checkbox" id="methodjitEnabled" label="&methodjitEnabled.label;" oncommand="toggleJITState(event.target, 'method');"/>
<menu id="algoMenu" label="&algoMenu.label;">
<!ENTITY mbBrandFullName "Mandelbrot">
<!ENTITY mbBrandShortName "Mandelbrot">
-<!ENTITY mbBrandVersion "4.0 Beta 1">
+<!ENTITY mbBrandVersion "4.0 Beta 2">
<!ENTITY mbVendorShortName "KaiRo.at">
<!ENTITY mandelbrotCmd.label "&mbVendorShortName; &mbBrandShortName;">