Merge b2g-inbound to m-c.

This commit is contained in:
Ryan VanderMeulen 2014-01-28 16:12:29 -05:00
commit 23022f3fa0
18 changed files with 84 additions and 31 deletions

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a887bfabaed83c4588b40c845535c0388c8da0f3"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -1,4 +1,4 @@
{
"revision": "34769c5ab47b95fe97fa0fe65e7e3a34f47b3f90",
"revision": "2f947703e8fdb71a105462394ed2a4e0e3db391e",
"repo_path": "/integration/gaia-central"
}

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -10,7 +10,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a887bfabaed83c4588b40c845535c0388c8da0f3"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e314d089d988f0eb1bef2404858c60b734dc4130"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="59e477229162926981cc00cf5d6c53f9614f17dd"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -1916,7 +1916,12 @@ TabParent::InjectTouchEvent(const nsAString& aType,
return NS_ERROR_FAILURE;
}
WidgetTouchEvent event(true, msg, nullptr);
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget) {
return NS_ERROR_FAILURE;
}
WidgetTouchEvent event(true, msg, widget);
event.modifiers = aModifiers;
event.time = PR_IntervalNow();
@ -1927,6 +1932,11 @@ TabParent::InjectTouchEvent(const nsAString& aType,
nsIntPoint(aRxs[i], aRys[i]),
aRotationAngles[i],
aForces[i]);
// Consider all injected touch events as changedTouches. For more details
// about the meaning of changedTouches for each event, see
// https://developer.mozilla.org/docs/Web/API/TouchEvent.changedTouches
t->mChanged = true;
event.touches.AppendElement(t);
}

View File

@ -59,8 +59,9 @@ const _HTTP_STATUS_ACQUIRE_TIMEOUT = -4;
const _MMS_ERROR_MESSAGE_DELETED = -1;
const _MMS_ERROR_RADIO_DISABLED = -2;
const _MMS_ERROR_NO_SIM_CARD = -3;
const _MMS_ERROR_SHUTDOWN = -4;
const _MMS_ERROR_USER_CANCELLED_NO_REASON = -5;
const _MMS_ERROR_SIM_CARD_CHANGED = -4;
const _MMS_ERROR_SHUTDOWN = -5;
const _MMS_ERROR_USER_CANCELLED_NO_REASON = -6;
const CONFIG_SEND_REPORT_NEVER = 0;
const CONFIG_SEND_REPORT_DEFAULT_NO = 1;
@ -838,11 +839,15 @@ NotifyResponseTransaction.prototype = {
/**
* CancellableTransaction - base class inherited by [Send|Retrieve]Transaction.
* We can call |cancelRunning(reason)| to cancel the on-going transaction.
* @param cancellableId
* An ID used to keep track of if an message is deleted from DB.
* @param serviceId
* An ID used to keep track of if the primary SIM service is changed.
*/
function CancellableTransaction(cancellableId) {
function CancellableTransaction(cancellableId, serviceId) {
this.cancellableId = cancellableId;
this.serviceId = serviceId;
this.isCancelled = false;
}
CancellableTransaction.prototype = {
@ -864,6 +869,7 @@ CancellableTransaction.prototype = {
Services.obs.addObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
Services.obs.addObserver(this, kMobileMessageDeletedObserverTopic, false);
Services.prefs.addObserver(kPrefRilRadioDisabled, this, false);
Services.prefs.addObserver(kPrefDefaultServiceId, this, false);
this.isObserversAdded = true;
}
@ -876,6 +882,7 @@ CancellableTransaction.prototype = {
Services.obs.removeObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
Services.obs.removeObserver(this, kMobileMessageDeletedObserverTopic);
Services.prefs.removeObserver(kPrefRilRadioDisabled, this);
Services.prefs.removeObserver(kPrefDefaultServiceId, this);
this.isObserversAdded = false;
}
},
@ -941,6 +948,9 @@ CancellableTransaction.prototype = {
} catch (e) {
if (DEBUG) debug("Failed to get preference of 'ril.radio.disabled'.");
}
} else if (data === kPrefDefaultServiceId &&
this.serviceId != getDefaultServiceId()) {
this.cancelRunning(_MMS_ERROR_SIM_CARD_CHANGED);
}
break;
}
@ -958,7 +968,7 @@ function RetrieveTransaction(mmsConnection, cancellableId, contentLocation) {
this.mmsConnection = mmsConnection;
// Call |CancellableTransaction| constructor.
CancellableTransaction.call(this, cancellableId);
CancellableTransaction.call(this, cancellableId, mmsConnection.serviceId);
this.contentLocation = contentLocation;
}
@ -1060,7 +1070,7 @@ function SendTransaction(mmsConnection, cancellableId, msg, requestDeliveryRepor
this.mmsConnection = mmsConnection;
// Call |CancellableTransaction| constructor.
CancellableTransaction.call(this, cancellableId);
CancellableTransaction.call(this, cancellableId, mmsConnection.serviceId);
msg.headers["x-mms-message-type"] = MMS.MMS_PDU_TYPE_SEND_REQ;
if (!msg.headers["x-mms-transaction-id"]) {
@ -1639,7 +1649,8 @@ MmsService.prototype = {
// retrieving failed. The end user has to retrieve the MMS again.
if (MMS.MMS_PDU_STATUS_RETRIEVED !== mmsStatus) {
if (mmsStatus != _MMS_ERROR_RADIO_DISABLED &&
mmsStatus != _MMS_ERROR_NO_SIM_CARD) {
mmsStatus != _MMS_ERROR_NO_SIM_CARD &&
mmsStatus != _MMS_ERROR_SIM_CARD_CHANGED) {
let transaction = new NotifyResponseTransaction(mmsConnection,
transactionId,
mmsStatus,
@ -2190,6 +2201,8 @@ MmsService.prototype = {
errorCode = Ci.nsIMobileMessageCallback.RADIO_DISABLED_ERROR;
} else if (aMmsStatus == _MMS_ERROR_NO_SIM_CARD) {
errorCode = Ci.nsIMobileMessageCallback.NO_SIM_CARD_ERROR;
} else if (aMmsStatus == _MMS_ERROR_SIM_CARD_CHANGED) {
errorCode = Ci.nsIMobileMessageCallback.NON_ACTIVE_SIM_CARD_ERROR;
} else if (aMmsStatus != MMS.MMS_PDU_ERROR_OK) {
errorCode = Ci.nsIMobileMessageCallback.INTERNAL_ERROR;
} else {
@ -2304,6 +2317,8 @@ MmsService.prototype = {
errorCode = Ci.nsIMobileMessageCallback.RADIO_DISABLED_ERROR;
} else if (mmsStatus == _MMS_ERROR_NO_SIM_CARD) {
errorCode = Ci.nsIMobileMessageCallback.NO_SIM_CARD_ERROR;
} else if (mmsStatus == _MMS_ERROR_SIM_CARD_CHANGED) {
errorCode = Ci.nsIMobileMessageCallback.NON_ACTIVE_SIM_CARD_ERROR;
}
gMobileMessageDatabaseService
.setMessageDeliveryByMessageId(aMessageId,

View File

@ -2605,7 +2605,7 @@ MobileMessageDB.prototype = {
if (DEBUG) debug("Caught error on transaction ", event.target.errorCode);
collector.collect(null, COLLECT_ID_ERROR, COLLECT_TIMESTAMP_UNUSED);
};
let request = threadStore.index("lastTimestamp").openKeyCursor();
let request = threadStore.index("lastTimestamp").openKeyCursor(null, PREV);
request.onsuccess = function(event) {
let cursor = event.target.result;
if (cursor) {

View File

@ -376,6 +376,9 @@ checkFuncs.push(checkThread.bind(null, ["thread 18-1", "thread 18-2"],
tasks.push(getAllThreads.bind(null, function(threads) {
is(threads.length, checkFuncs.length, "number of threads got");
// Reverse threads as we iterate over them in reverse order
threads.reverse();
(function callback() {
if (!threads.length) {
tasks.next();

View File

@ -127,10 +127,10 @@ add_test(function test_saveServiceStats() {
Math.floor(timestamp / 1000));
do_check_eq(cachedStats[key2].rxBytes, 50);
do_check_eq(cachedStats[key2].txBytes, 100);
run_next_test();
}
);
run_next_test();
});
add_test(function test_saveStatsWithDifferentDates() {

View File

@ -32,6 +32,7 @@ var gInitialized = false;
var gOverrideFunctions = [
function (aHttpChannel) UserAgentOverrides.getOverrideForURI(aHttpChannel.URI)
];
var gBuiltUAs = new Map;
this.UserAgentOverrides = {
init: function uao_init() {
@ -53,6 +54,9 @@ this.UserAgentOverrides = {
UserAgentUpdates.init(function(overrides) {
gOverrideForHostCache.clear();
if (overrides) {
for (let domain in overrides) {
overrides[domain] = getUserAgentFromOverride(overrides[domain]);
}
overrides.get = function(key) this[key];
}
gUpdatedOverrides = overrides;
@ -129,6 +133,22 @@ this.UserAgentOverrides = {
}
};
function getUserAgentFromOverride(override)
{
let userAgent = gBuiltUAs.get(override);
if (userAgent !== undefined) {
return userAgent;
}
let [search, replace] = override.split("#", 2);
if (search && replace) {
userAgent = DEFAULT_UA.replace(new RegExp(search, "g"), replace);
} else {
userAgent = override;
}
gBuiltUAs.set(override, userAgent);
return userAgent;
}
function buildOverrides() {
gOverrides.clear();
gOverrideForHostCache.clear();
@ -141,17 +161,7 @@ function buildOverrides() {
for (let domain of domains) {
let override = gPrefBranch.getCharPref(domain);
let userAgent = builtUAs.get(override);
if (userAgent === undefined) {
let [search, replace] = override.split("#", 2);
if (search && replace) {
userAgent = DEFAULT_UA.replace(new RegExp(search, "g"), replace);
} else {
userAgent = override;
}
builtUAs.set(override, userAgent);
}
let userAgent = getUserAgentFromOverride(override);
if (userAgent != DEFAULT_UA) {
gOverrides.set(domain, userAgent);

View File

@ -30,6 +30,12 @@ const DEFAULT_UA = navigator.userAgent;
const UA_OVERRIDE = "DummyUserAgent";
const UA_ALT_OVERRIDE = "AltUserAgent";
const UA_PARTIAL_FROM = "\\wozilla"; // /\wozilla
const UA_PARTIAL_SEP = "#";
const UA_PARTIAL_TO = UA_OVERRIDE;
const UA_PARTIAL_OVERRIDE = UA_PARTIAL_FROM + UA_PARTIAL_SEP + UA_PARTIAL_TO;
const UA_PARTIAL_EXPECTED = DEFAULT_UA.replace(new RegExp(UA_PARTIAL_FROM, 'g'), UA_PARTIAL_TO);
function getUA(host) {
var url = location.pathname;
url = host + url.slice(0, url.lastIndexOf('/')) + '/user_agent.sjs';
@ -78,6 +84,12 @@ const OVERRIDES = [
expected: SpecialPowers.Services.appinfo.OS,
host: 'http://sub1.test2.example.org'
},
{
domain: 'sub2.test2.example.org',
override: UA_PARTIAL_OVERRIDE,
expected: UA_PARTIAL_EXPECTED,
host: 'http://sub2.test2.example.org'
},
];
function getServerURL() {

View File

@ -255,8 +255,11 @@
ALLOW_SYSCALL(access), \
ALLOW_SYSCALL(unlink), \
ALLOW_SYSCALL(fsync), \
ALLOW_SYSCALL(msync), \
/* Should remove all of the following in the future, if possible */ \
ALLOW_SYSCALL(getpriority), \
ALLOW_SYSCALL(sched_get_priority_min), \
ALLOW_SYSCALL(sched_get_priority_max), \
ALLOW_SYSCALL(setpriority), \
SECCOMP_WHITELIST_PROFILING \
SECCOMP_WHITELIST_B2G_LOW \