diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js
index aacc8c9e3fdd..0825cdd3bd4e 100644
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -30,14 +30,8 @@ XPCOMUtils.defineLazyGetter(Services, 'idle', function() {
});
XPCOMUtils.defineLazyGetter(Services, 'audioManager', function() {
-#ifdef MOZ_WIDGET_GONK
return Cc['@mozilla.org/telephony/audiomanager;1']
.getService(Ci.nsIAudioManager);
-#else
- return {
- "masterVolume": 0
- };
-#endif
});
XPCOMUtils.defineLazyServiceGetter(Services, 'fm', function() {
@@ -85,12 +79,11 @@ var shell = {
return Services.prefs.getCharPref('browser.homescreenURL');
},
- start: function shell_start() {
+ start: function shell_init() {
let homeURL = this.homeURL;
if (!homeURL) {
let msg = 'Fatal error during startup: No homescreen found: try setting B2G_HOMESCREEN';
- alert(msg);
- return;
+ return alert(msg);
}
['keydown', 'keypress', 'keyup'].forEach((function listenKey(type) {
@@ -107,7 +100,9 @@ var shell = {
// a specific value when the device starts. This way the front-end
// can display a notification when the volume change and show a volume
// level modified from this point.
- Services.audioManager.masterVolume = 0.5;
+ try {
+ Services.audioManager.masterVolume = 0.5;
+ } catch(e) {}
let domains = "";
try {
@@ -302,7 +297,6 @@ var shell = {
}
}
}
-
let wakeLockHandler = function wakeLockHandler(topic, state) {
// Turn off the screen when no one needs the it or all of them are
// invisible, otherwise turn the screen on. Note that the CPU
@@ -319,11 +313,7 @@ var shell = {
}
}
}
-
let idleTimeout = Services.prefs.getIntPref("power.screen.timeout");
- if (!('mozSettings' in navigator))
- return;
-
let request = navigator.mozSettings.getLock().get("power.screen.timeout");
request.onsuccess = function onSuccess() {
idleTimeout = request.result["power.screen.timeout"] || idleTimeout;
@@ -332,14 +322,12 @@ var shell = {
power.addWakeLockListener(wakeLockHandler);
}
}
-
request.onerror = function onError() {
if (idleTimeout) {
Services.idle.addIdleObserver(idleHandler, idleTimeout);
power.addWakeLockListener(wakeLockHandler);
}
}
-
// XXX We may override other's callback here, but this is the only
// user of mozSettings in shell.js at this moment.
navigator.mozSettings.onsettingchange = function onSettingChange(e) {
@@ -437,7 +425,7 @@ Services.obs.addObserver(function onConsoleAPILogEvent(subject, topic, data) {
serverSocket.asyncListen(listener);
})();
-var CustomEventManager = {
+CustomEventManager = {
init: function custevt_init() {
window.addEventListener("ContentStart", (function(evt) {
content.addEventListener("mozContentEvent", this, false, true);
@@ -461,7 +449,7 @@ var CustomEventManager = {
}
}
-var AlertsHelper = {
+AlertsHelper = {
_listeners: {},
_count: 0,
@@ -492,7 +480,7 @@ var AlertsHelper = {
}
}
-var WebappsHelper = {
+WebappsHelper = {
_installers: {},
_count: 0,
diff --git a/b2g/chrome/content/shell.xul b/b2g/chrome/content/shell.xul
index 222a8172e7a9..d4e623a565e0 100644
--- a/b2g/chrome/content/shell.xul
+++ b/b2g/chrome/content/shell.xul
@@ -19,11 +19,14 @@
#ifndef MOZ_TOUCH
#endif
+#ifndef MOZ_WIDGET_GONK
+
+#endif
+ src="data:text/html,%3C!DOCTYPE html>%3Cbody style='background:black;'>"/>
diff --git a/b2g/components/ContentPermissionPrompt.js b/b2g/components/ContentPermissionPrompt.js
index 0705a97c56af..a693451b52ef 100644
--- a/b2g/components/ContentPermissionPrompt.js
+++ b/b2g/components/ContentPermissionPrompt.js
@@ -27,35 +27,12 @@ ContentPermissionPrompt.prototype = {
return false;
},
- _id: 0,
prompt: function(request) {
// returns true if the request was handled
if (this.handleExistingPermission(request))
return;
- let browser = Services.wm.getMostRecentWindow("navigator:browser");
- let content = browser.content;
- if (!content)
- return;
-
- let requestId = this._id++;
- content.addEventListener("mozContentEvent", function contentEvent(evt) {
- if (evt.detail.id != requestId)
- return;
-
- content.removeEventListener(evt.type, contentEvent);
- if (evt.detail.type == "permission-allow") {
- request.allow();
- return;
- }
-
- request.cancel();
- });
-
- browser.shell.sendEvent(browser.content, "mozChromeEvent", {
- "type": "permission-prompt", "permission": request.type,
- "id": requestId, "url": request.uri.spec
- });
+ // TODO : show UI to grant or deny permission
},
classID: Components.ID("{8c719f03-afe0-4aac-91ff-6c215895d467}"),
diff --git a/dom/settings/SettingsManager.js b/dom/settings/SettingsManager.js
index 53e23e1e3413..c5f1909d7a5b 100644
--- a/dom/settings/SettingsManager.js
+++ b/dom/settings/SettingsManager.js
@@ -64,7 +64,7 @@ SettingsDB.prototype = {
}
let self = this;
- debug("try to open database:" + DB_NAME + " " + DB_VERSION + " " + this.db);
+ debug("try to open database:" + DB_NAME + " " + DB_VERSION + " " + this._indexedDB);
let req = aGlobal.mozIndexedDB.open(DB_NAME, DB_VERSION);
req.onsuccess = function (event) {
debug("Opened database:", DB_NAME, DB_VERSION);
diff --git a/dom/sms/src/ril/SmsDatabaseService.js b/dom/sms/src/ril/SmsDatabaseService.js
index 04b71c7f5695..39dab2116b6c 100644
--- a/dom/sms/src/ril/SmsDatabaseService.js
+++ b/dom/sms/src/ril/SmsDatabaseService.js
@@ -11,7 +11,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
const RIL_SMSDATABASESERVICE_CONTRACTID = "@mozilla.org/sms/rilsmsdatabaseservice;1";
const RIL_SMSDATABASESERVICE_CID = Components.ID("{a1fa610c-eb6c-4ac2-878f-b005d5e89249}");
-const DEBUG = false;
+const DEBUG = true;
const DB_NAME = "sms";
const DB_VERSION = 1;
const STORE_NAME = "sms";
diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js
index b8f19ee38176..6481d360f7d4 100644
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1923,7 +1923,7 @@ RIL[REQUEST_VOICE_REGISTRATION_STATE] = function REQUEST_VOICE_REGISTRATION_STAT
}
let state = Buf.readStringList();
- if (DEBUG) debug("voice registration state: " + state);
+debug("voice registration state: " + state);
this._processVoiceRegistrationState(state);
};
RIL[REQUEST_DATA_REGISTRATION_STATE] = function REQUEST_DATA_REGISTRATION_STATE(length, options) {
@@ -2047,11 +2047,9 @@ RIL[REQUEST_SIM_IO] = function REQUEST_SIM_IO(length, options) {
if (sw1 != ICC_STATUS_NORMAL_ENDING) {
// See GSM11.11, TS 51.011 clause 9.4, and ISO 7816-4 for the error
// description.
- if (DEBUG) {
- debug("ICC I/O Error EF id = " + options.fileid.toString(16) +
- " command = " + options.command.toString(16) +
- "(" + sw1.toString(16) + "/" + sw2.toString(16) + ")");
- }
+ debug("ICC I/O Error EF id = " + options.fileid.toString(16) +
+ " command = " + options.command.toString(16) +
+ "(" + sw1.toString(16) + "/" + sw2.toString(16) + ")");
return;
}
diff --git a/dom/wifi/DOMWifiManager.js b/dom/wifi/DOMWifiManager.js
index 24e71f463b7f..e272034defac 100644
--- a/dom/wifi/DOMWifiManager.js
+++ b/dom/wifi/DOMWifiManager.js
@@ -12,7 +12,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
-const DEBUG = false; // set to false to suppress debug messages
+const DEBUG = true; // set to false to suppress debug messages
const DOMWIFIMANAGER_CONTRACTID = "@mozilla.org/wifimanager;1";
const DOMWIFIMANAGER_CID = Components.ID("{2cf775a7-1837-410c-9e26-323c42e076da}");
diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js
index d439db323e21..4ac0424bf31c 100644
--- a/dom/wifi/WifiWorker.js
+++ b/dom/wifi/WifiWorker.js
@@ -44,7 +44,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-const DEBUG = false; // set to false to suppress debug messages
+const DEBUG = true; // set to false to suppress debug messages
const WIFIWORKER_CONTRACTID = "@mozilla.org/wifi/worker;1";
const WIFIWORKER_CID = Components.ID("{a14e8977-d259-433a-a88d-58dd44657e5b}");
diff --git a/dom/wifi/wifi_worker.js b/dom/wifi/wifi_worker.js
index 89ece68b49bc..b8311f483eeb 100644
--- a/dom/wifi/wifi_worker.js
+++ b/dom/wifi/wifi_worker.js
@@ -13,17 +13,6 @@ var hwaddr = ctypes.uint8_t.array(6)();
var len = ctypes.size_t();
var ints = ctypes.int.array(8)();
-const DEBUG = false;
-
-let debug;
-if (DEBUG) {
- debug = function (s) {
- dump("-*- WifiWorker component: " + s + "\n");
- };
-} else {
- debug = function (s) {};
-}
-
// TODO: consolidate with implementation in systemlibs.js
let libcutils = (function () {
let library = ctypes.open("libcutils.so");
@@ -78,7 +67,7 @@ self.onmessage = function(e) {
postMessage({ id: id, status: ret });
break;
case "ifc_configure":
- debug("WIFI: data: " + uneval(data) + "\n");
+ dump("WIFI: data: " + uneval(data) + "\n");
var ret = libnetutils.ifc_configure(data.ifname, data.ipaddr, data.mask, data.gateway, data.dns1, data.dns2);
postMessage({ id: id, status: ret });
break;
@@ -104,7 +93,7 @@ self.onmessage = function(e) {
default:
var f = libhardware_legacy[cmd] || libnetutils[cmd];
var ret = f();
- debug("WIFI: " + cmd + " returned: " + ret);
+ dump("WIFI: " + cmd + " returned: " + ret);
postMessage({ id: id, status: ret });
break;
}
diff --git a/ipc/ril/Ril.cpp b/ipc/ril/Ril.cpp
index 113e23e23ac9..c6407c13d922 100644
--- a/ipc/ril/Ril.cpp
+++ b/ipc/ril/Ril.cpp
@@ -229,9 +229,7 @@ RilClient::OpenSocket()
}
if (connect(mSocket.mFd, (struct sockaddr *) &addr, alen) < 0) {
-#if defined(MOZ_WIDGET_GONK)
LOG("Cannot open socket for RIL!\n");
-#endif
close(mSocket.mFd);
return false;
}
diff --git a/netwerk/dns/nsDNSService2.cpp b/netwerk/dns/nsDNSService2.cpp
index 5c20089be556..7458729c57e4 100644
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -57,7 +57,6 @@
#include "prio.h"
#include "plstr.h"
#include "nsIOService.h"
-#include "nsCharSeparatedTokenizer.h"
#include "mozilla/FunctionTimer.h"
@@ -70,7 +69,6 @@ static const char kPrefEnableIDN[] = "network.enableIDN";
static const char kPrefIPv4OnlyDomains[] = "network.dns.ipv4OnlyDomains";
static const char kPrefDisableIPv6[] = "network.dns.disableIPv6";
static const char kPrefDisablePrefetch[] = "network.dns.disablePrefetch";
-static const char kPrefDnsLocalDomains[] = "network.dns.localDomains";
//-----------------------------------------------------------------------------
@@ -408,7 +406,6 @@ nsDNSService::Init()
int proxyType = nsIProtocolProxyService::PROXYCONFIG_DIRECT;
nsAdoptingCString ipv4OnlyDomains;
- nsAdoptingCString localDomains;
// read prefs
nsCOMPtr prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
@@ -425,7 +422,6 @@ nsDNSService::Init()
prefs->GetBoolPref(kPrefEnableIDN, &enableIDN);
prefs->GetBoolPref(kPrefDisableIPv6, &disableIPv6);
prefs->GetCharPref(kPrefIPv4OnlyDomains, getter_Copies(ipv4OnlyDomains));
- prefs->GetCharPref(kPrefDnsLocalDomains, getter_Copies(localDomains));
prefs->GetBoolPref(kPrefDisablePrefetch, &disablePrefetch);
// If a manual proxy is in use, disable prefetch implicitly
@@ -435,8 +431,6 @@ nsDNSService::Init()
if (mFirstTime) {
mFirstTime = false;
- mLocalDomains.Init();
-
// register as prefs observer
if (prefs) {
prefs->AddObserver(kPrefDnsCacheEntries, this, false);
@@ -444,7 +438,6 @@ nsDNSService::Init()
prefs->AddObserver(kPrefDnsCacheGrace, this, false);
prefs->AddObserver(kPrefEnableIDN, this, false);
prefs->AddObserver(kPrefIPv4OnlyDomains, this, false);
- prefs->AddObserver(kPrefDnsLocalDomains, this, false);
prefs->AddObserver(kPrefDisableIPv6, this, false);
prefs->AddObserver(kPrefDisablePrefetch, this, false);
@@ -482,19 +475,6 @@ nsDNSService::Init()
// Disable prefetching either by explicit preference or if a manual proxy is configured
mDisablePrefetch = disablePrefetch || (proxyType == nsIProtocolProxyService::PROXYCONFIG_MANUAL);
-
- mLocalDomains.Clear();
- if (localDomains) {
- nsAdoptingString domains;
- domains.AssignASCII(nsDependentCString(localDomains).get());
- nsCharSeparatedTokenizer tokenizer(domains, ',',
- nsCharSeparatedTokenizerTemplate<>::SEPARATOR_OPTIONAL);
-
- while (tokenizer.hasMoreTokens()) {
- const nsSubstring& domain = tokenizer.nextToken();
- mLocalDomains.PutEntry(nsDependentCString(NS_ConvertUTF16toUTF8(domain).get()));
- }
- }
}
return rv;
}
@@ -597,7 +577,6 @@ nsDNSService::AsyncResolve(const nsACString &hostname,
// simultaneous shutdown!!
nsRefPtr res;
nsCOMPtr idn;
- bool localDomain = false;
{
MutexAutoLock lock(mLock);
@@ -606,22 +585,16 @@ nsDNSService::AsyncResolve(const nsACString &hostname,
res = mResolver;
idn = mIDN;
- localDomain = mLocalDomains.GetEntry(hostname);
}
if (!res)
return NS_ERROR_OFFLINE;
const nsACString *hostPtr = &hostname;
- static const nsCString localhost((const char *) "localhost");
- if (localDomain) {
- hostPtr = &localhost;
- }
-
nsresult rv;
nsCAutoString hostACE;
- if (idn && !IsASCII(*hostPtr)) {
- if (NS_SUCCEEDED(idn->ConvertUTF8toACE(*hostPtr, hostACE)))
+ if (idn && !IsASCII(hostname)) {
+ if (NS_SUCCEEDED(idn->ConvertUTF8toACE(hostname, hostACE)))
hostPtr = &hostACE;
}
@@ -692,26 +665,19 @@ nsDNSService::Resolve(const nsACString &hostname,
// simultaneous shutdown!!
nsRefPtr res;
nsCOMPtr idn;
- bool localDomain = false;
{
MutexAutoLock lock(mLock);
res = mResolver;
idn = mIDN;
- localDomain = mLocalDomains.GetEntry(hostname);
}
NS_ENSURE_TRUE(res, NS_ERROR_OFFLINE);
const nsACString *hostPtr = &hostname;
- static const nsCString localhost((const char *) "localhost");
- if (localDomain) {
- hostPtr = &localhost;
- }
-
nsresult rv;
nsCAutoString hostACE;
- if (idn && !IsASCII(*hostPtr)) {
- if (NS_SUCCEEDED(idn->ConvertUTF8toACE(*hostPtr, hostACE)))
+ if (idn && !IsASCII(hostname)) {
+ if (NS_SUCCEEDED(idn->ConvertUTF8toACE(hostname, hostACE)))
hostPtr = &hostACE;
}
diff --git a/netwerk/dns/nsDNSService2.h b/netwerk/dns/nsDNSService2.h
index 8d468450b878..1749b413fb00 100644
--- a/netwerk/dns/nsDNSService2.h
+++ b/netwerk/dns/nsDNSService2.h
@@ -40,8 +40,6 @@
#include "nsHostResolver.h"
#include "nsAutoPtr.h"
#include "nsString.h"
-#include "nsTHashtable.h"
-#include "nsHashKeys.h"
#include "mozilla/Mutex.h"
class nsDNSService : public nsPIDNSService
@@ -72,5 +70,4 @@ private:
bool mDisableIPv6;
bool mDisablePrefetch;
bool mFirstTime;
- nsTHashtable mLocalDomains;
};
diff --git a/netwerk/test/unit/test_dns_service.js b/netwerk/test/unit/test_dns_service.js
index 94ba8691d7dc..225b2b4babf8 100644
--- a/netwerk/test/unit/test_dns_service.js
+++ b/netwerk/test/unit/test_dns_service.js
@@ -1,27 +1,7 @@
function run_test() {
- check_localhost();
- check_local_redirect();
-}
-
-function check_localhost() {
var dns = Components.classes["@mozilla.org/network/dns-service;1"]
.getService(Components.interfaces.nsIDNSService);
var rec = dns.resolve("localhost", 0);
var answer = rec.getNextAddrAsString();
do_check_true(answer == "127.0.0.1" || answer == "::1");
}
-
-function check_local_redirect() {
- var prefs = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- prefs.setCharPref("network.dns.localDomains", "local.vingtetun.org");
-
- var dns = Components.classes["@mozilla.org/network/dns-service;1"]
- .getService(Components.interfaces.nsIDNSService);
- var rec = dns.resolve("local.vingtetun.org", 0);
- var answer = rec.getNextAddrAsString();
- do_check_true(answer == "127.0.0.1" || answer == "::1");
-
- prefs.clearUserPref("network.dns.localDomains");
-}
-
diff --git a/toolkit/content/widgets/toolbar.xml b/toolkit/content/widgets/toolbar.xml
index 976563dededd..36576eac6539 100644
--- a/toolkit/content/widgets/toolbar.xml
+++ b/toolkit/content/widgets/toolbar.xml
@@ -225,7 +225,7 @@