Bug 708937 - Don't run Android-specific functions on non-Android platforms [r=mfinkle]

This commit is contained in:
Matt Brubeck 2011-12-08 20:12:01 -08:00
parent 919522b206
commit 23c98f8657

View File

@ -54,6 +54,7 @@ let Cu = Components.utils;
let Cr = Components.results;
#ifdef ANDROID
function getBridge() {
return Cc["@mozilla.org/android/bridge;1"].getService(Ci.nsIAndroidBridge);
}
@ -61,6 +62,7 @@ function getBridge() {
function sendMessageToJava(aMessage) {
return getBridge().handleGeckoMessage(JSON.stringify(aMessage));
}
#endif
function getBrowser() {
@ -176,12 +178,14 @@ var Browser = {
startup: function startup() {
var self = this;
#ifdef ANDROID
sendMessageToJava({
gecko: {
type: "Gecko:Ready"
}
});
#endif
try {
messageManager.loadFrameScript("chrome://browser/content/Util.js", true);