mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 708937 - Don't run Android-specific functions on non-Android platforms [r=mfinkle]
This commit is contained in:
parent
9c80b87753
commit
9fc4f85b07
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user