diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index b722fe5d6a22..2c6d21987c03 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index bd8cc343b0f5..6b2f0cc64ae9 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index ca9c9df7c229..d78008501632 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -12,10 +12,10 @@
-
+
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index b722fe5d6a22..2c6d21987c03 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml
index 72977aa8145c..2c5b3437fa5a 100644
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index 27803c5ab07f..c9de47d7f9b6 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
- "revision": "65cb0c455f058c49aead7de9a245d90aa890276c",
+ "revision": "82aa7db46a22bc99998468aa433eafb33d739ed6",
"repo_path": "/integration/gaia-central"
}
diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml
index afc6997c6602..8ff1f01f73c9 100644
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml
index 9c892d022906..97609c31e223 100644
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/inari/sources.xml b/b2g/config/inari/sources.xml
index a67df032230d..2ba9d465959d 100644
--- a/b2g/config/inari/sources.xml
+++ b/b2g/config/inari/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/leo/sources.xml b/b2g/config/leo/sources.xml
index c42b1867f7c4..c63af70f59a6 100644
--- a/b2g/config/leo/sources.xml
+++ b/b2g/config/leo/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/mako/sources.xml b/b2g/config/mako/sources.xml
index d0ace118a4c9..75fcada64b54 100644
--- a/b2g/config/mako/sources.xml
+++ b/b2g/config/mako/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml
index 4f4d83a74eac..47e556f49aff 100644
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js
index d8fcefaeb0b2..38eb5d34069a 100644
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -2512,20 +2512,23 @@ RadioInterface.prototype = {
}).bind(this));
},
- setCellBroadcastSearchList: function(newSearchListStr) {
- if (newSearchListStr == this._cellBroadcastSearchListStr) {
+ setCellBroadcastSearchList: function(newSearchList) {
+ if ((newSearchList == this._cellBroadcastSearchList) ||
+ (newSearchList && this._cellBroadcastSearchList &&
+ newSearchList.gsm == this._cellBroadcastSearchList.gsm &&
+ newSearchList.cdma == this._cellBroadcastSearchList.cdma)) {
return;
}
this.workerMessenger.send("setCellBroadcastSearchList",
- { searchListStr: newSearchListStr },
+ { searchList: newSearchList },
(function callback(response) {
if (!response.success) {
let lock = gSettingsService.createLock();
lock.set(kSettingsCellBroadcastSearchList,
- this._cellBroadcastSearchListStr, null);
+ this._cellBroadcastSearchList, null);
} else {
- this._cellBroadcastSearchListStr = response.searchListStr;
+ this._cellBroadcastSearchList = response.searchList;
}
return false;
@@ -3384,7 +3387,7 @@ RadioInterface.prototype = {
_sntp: null,
// Cell Broadcast settings values.
- _cellBroadcastSearchListStr: null,
+ _cellBroadcastSearchList: null,
// Operator's mcc-mnc.
_lastKnownNetwork: null,
@@ -3471,9 +3474,12 @@ RadioInterface.prototype = {
break;
case kSettingsCellBroadcastSearchList:
if (DEBUG) {
- this.debug("'" + kSettingsCellBroadcastSearchList + "' is now " + aResult);
+ this.debug("'" + kSettingsCellBroadcastSearchList +
+ "' is now " + JSON.stringify(aResult));
}
- this.setCellBroadcastSearchList(aResult);
+ // TODO: Set searchlist for Multi-SIM. See Bug 921326.
+ let result = Array.isArray(aResult) ? aResult[0] : aResult;
+ this.setCellBroadcastSearchList(result);
break;
}
},
diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js
index 8d0ff0afb9e4..bb29bc4b28b8 100644
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -1832,8 +1832,19 @@ RilObject.prototype = {
},
setCellBroadcastSearchList: function(options) {
+ let getSearchListStr = function(aSearchList) {
+ if (typeof aSearchList === "string" || aSearchList instanceof String) {
+ return aSearchList;
+ }
+
+ // TODO: Set search list for CDMA/GSM individually. Bug 990926
+ let prop = this._isCdma ? "cdma" : "gsm";
+
+ return aSearchList && aSearchList[prop];
+ }.bind(this);
+
try {
- let str = options.searchListStr;
+ let str = getSearchListStr(options.searchList);
this.cellBroadcastConfigs.MMI = this._convertCellBroadcastSearchList(str);
options.success = true;
} catch (e) {
diff --git a/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js b/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
index d782860c8d19..3f20e8708c74 100644
--- a/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
+++ b/dom/system/gonk/tests/test_ril_worker_cellbroadcast_config.js
@@ -137,3 +137,37 @@ add_test(function test_ril_worker_cellbroadcast_merge_config() {
run_next_test();
});
+add_test(function test_ril_worker_cellbroadcast_set_search_list() {
+ let worker = newWorker({
+ postRILMessage: function(id, parcel) {
+ // Do nothing
+ },
+ postMessage: function(message) {
+ // Do nothing
+ }
+ });
+
+ let context = worker.ContextPool._contexts[0];
+
+ function test(aIsCdma, aSearchList, aExpected) {
+ context.RIL._isCdma = aIsCdma;
+
+ let options = { searchList: aSearchList };
+ context.RIL.setCellBroadcastSearchList(options);
+ // Enforce the MMI result to string for comparison.
+ do_check_eq("" + context.RIL.cellBroadcastConfigs.MMI, aExpected);
+ do_check_eq(options.success, true);
+ }
+
+ let searchListStr = "1,2,3,4";
+ let searchList = { gsm: "1,2,3,4", cdma: "5,6,7,8" };
+
+ test(false, searchListStr, "1,2,2,3,3,4,4,5");
+ test(true, searchListStr, "1,2,2,3,3,4,4,5");
+ test(false, searchList, "1,2,2,3,3,4,4,5");
+ test(true, searchList, "5,6,6,7,7,8,8,9");
+ test(false, null, "null");
+ test(true, null, "null");
+
+ run_next_test();
+});
diff --git a/ipc/unixsocket/UnixSocket.cpp b/ipc/unixsocket/UnixSocket.cpp
index 6bcc2cc5fe29..be23891ddd0d 100644
--- a/ipc/unixsocket/UnixSocket.cpp
+++ b/ipc/unixsocket/UnixSocket.cpp
@@ -64,8 +64,7 @@ public:
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(!mShuttingDownOnIOThread);
- RemoveWatchers(READ_WATCHER|WRITE_WATCHER);
-
+ Close(); // will also remove fd from I/O loop
mShuttingDownOnIOThread = true;
}
@@ -643,7 +642,7 @@ void
UnixSocketImpl::OnSocketCanReceiveWithoutBlocking()
{
MOZ_ASSERT(MessageLoopForIO::current() == GetIOLoop());
- MOZ_ASSERT(GetConnectionStatus() == SOCKET_IS_CONNECTED);
+ MOZ_ASSERT(GetConnectionStatus() == SOCKET_IS_CONNECTED); // see bug 990984
// Read all of the incoming data.
while (true) {
@@ -691,7 +690,7 @@ void
UnixSocketImpl::OnSocketCanSendWithoutBlocking()
{
MOZ_ASSERT(MessageLoopForIO::current() == GetIOLoop());
- MOZ_ASSERT(GetConnectionStatus() == SOCKET_IS_CONNECTED);
+ MOZ_ASSERT(GetConnectionStatus() == SOCKET_IS_CONNECTED); // see bug 990984
// Try to write the bytes of mCurrentRilRawData. If all were written, continue.
//
@@ -739,6 +738,8 @@ UnixSocketConsumer::UnixSocketConsumer() : mImpl(nullptr)
UnixSocketConsumer::~UnixSocketConsumer()
{
+ MOZ_ASSERT(mConnectionStatus == SOCKET_DISCONNECTED);
+ MOZ_ASSERT(!mImpl);
}
bool
diff --git a/ipc/unixsocket/UnixSocket.h b/ipc/unixsocket/UnixSocket.h
index 3d08c02b85c9..46b3553803f2 100644
--- a/ipc/unixsocket/UnixSocket.h
+++ b/ipc/unixsocket/UnixSocket.h
@@ -135,7 +135,7 @@ enum SocketConnectionStatus {
SOCKET_CONNECTED = 3
};
-class UnixSocketConsumer : public RefCounted
+class UnixSocketConsumer : public AtomicRefCounted
{
public:
MOZ_DECLARE_REFCOUNTED_TYPENAME(UnixSocketConsumer)