merge b2g-inbound to m-c to fix merge conflicts a=merge

This commit is contained in:
Carsten "Tomcat" Book 2015-11-05 13:38:39 +01:00
commit 34e1d53123
47 changed files with 356 additions and 176 deletions

View File

@ -693,6 +693,7 @@ pref("layout.css.scroll-snap.enabled", true);
pref("dom.ipc.processPriorityManager.enabled", true); pref("dom.ipc.processPriorityManager.enabled", true);
pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000); pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000); pref("dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS", 5000);
pref("dom.ipc.processPriorityManager.memoryPressureGracePeriodMS", 3000);
pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000); pref("dom.ipc.processPriorityManager.temporaryPriorityLockMS", 5000);
// Number of different background/foreground levels for background/foreground // Number of different background/foreground levels for background/foreground

View File

@ -745,19 +745,21 @@ developerHUD.registerWatcher(eventLoopLagWatcher);
/* /*
* The performanceEntriesWatcher determines the delta between the epoch * The performanceEntriesWatcher determines the delta between the epoch
* of an app's launch time and the app's performance entry marks. * of an app's launch time and the epoch of the app's performance entry marks.
* When it receives an "appLaunch" performance entry mark it records the * When it receives an "appLaunch" performance entry mark it records the
* name of the app being launched and the epoch of when the launch ocurred. * name of the app being launched and the epoch of when the launch ocurred.
* When it receives subsequent performance entry events for the app being * When it receives subsequent performance entry events for the app being
* launched, it records the delta of the performance entry opoch compared * launched, it records the delta of the performance entry opoch compared
* to the app-launch epoch and emits an "app-start-time-<performance mark name>" * to the app-launch epoch and emits an "app-start-time-<performance mark name>"
* event containing the delta. * event containing the delta.
*
* Additionally, while recording the "app-start-time" for a performance mark,
* USS memory at the time of the performance mark is also recorded.
*/ */
var performanceEntriesWatcher = { var performanceEntriesWatcher = {
_client: null, _client: null,
_fronts: new Map(), _fronts: new Map(),
_appLaunchName: null, _appLaunch: new Map(),
_appLaunchStartTime: null,
_supported: [ _supported: [
'contentInteractive', 'contentInteractive',
'navigationInteractive', 'navigationInteractive',
@ -800,17 +802,14 @@ var performanceEntriesWatcher = {
let name = detail.name; let name = detail.name;
let epoch = detail.epoch; let epoch = detail.epoch;
// FIXME There is a potential race condition that can result
// in some performance entries being disregarded. See bug 1189942.
//
// If this is an "app launch" mark, record the app that was // If this is an "app launch" mark, record the app that was
// launched and the epoch of when it was launched. // launched and the epoch of when it was launched.
if (name.indexOf('appLaunch') !== -1) { if (name.indexOf('appLaunch') !== -1) {
let CHARS_UNTIL_APP_NAME = 7; // '@app://' let CHARS_UNTIL_APP_NAME = 7; // '@app://'
let startPos = name.indexOf('@app') + CHARS_UNTIL_APP_NAME; let startPos = name.indexOf('@app') + CHARS_UNTIL_APP_NAME;
let endPos = name.indexOf('.'); let endPos = name.indexOf('.');
this._appLaunchName = name.slice(startPos, endPos); let appName = name.slice(startPos, endPos);
this._appLaunchStartTime = epoch; this._appLaunch.set(appName, epoch);
return; return;
} }
@ -822,13 +821,15 @@ var performanceEntriesWatcher = {
let origin = detail.origin; let origin = detail.origin;
origin = origin.slice(0, origin.indexOf('.')); origin = origin.slice(0, origin.indexOf('.'));
// Continue if the performance mark corresponds to the app let appLaunchTime = this._appLaunch.get(origin);
// for which we have recorded app launch information.
if (this._appLaunchName !== origin) { // Sanity check: ensure we have an app launch time for the app
// corresponding to this performance mark.
if (!appLaunchTime) {
return; return;
} }
let time = epoch - this._appLaunchStartTime; let time = epoch - appLaunchTime;
let eventName = 'app_startup_time_' + name; let eventName = 'app_startup_time_' + name;
// Events based on performance marks are for telemetry only, they are // Events based on performance marks are for telemetry only, they are

View File

@ -11,13 +11,15 @@
"upload_files": [ "upload_files": [
"{objdir}/dist/b2g-*.crashreporter-symbols.zip", "{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz", "{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml" "{workdir}/sources.xml",
"{workdir}/out/target/product/aries/fota-*-update-*.mar"
], ],
"public_upload_files": [ "public_upload_files": [
"{objdir}/dist/b2g-*.crashreporter-symbols.zip", "{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz", "{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml", "{workdir}/sources.xml",
"{objdir}/dist/b2g-update/*.mar" "{objdir}/dist/b2g-update/*.mar",
"{workdir}/out/target/product/aries/fota-*-update.mar"
], ],
"zip_files": [ "zip_files": [
["{workdir}/out/target/product/aries/*.img", "out/target/product/aries/"], ["{workdir}/out/target/product/aries/*.img", "out/target/product/aries/"],

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54"> <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/> <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54"> <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/> <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -19,12 +19,12 @@
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia.git" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/> <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/> <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/> <project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things --> <!-- Stock Android things -->

View File

@ -17,9 +17,9 @@
</project> </project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="638ec448619fda80fcb439b1747af62169d05548"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="638ec448619fda80fcb439b1747af62169d05548"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -15,11 +15,11 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54"> <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -15,11 +15,11 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf"> <project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -19,12 +19,12 @@
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia.git" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/> <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/> <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/> <project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things --> <!-- Stock Android things -->

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54"> <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/> <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -1,9 +1,9 @@
{ {
"git": { "git": {
"git_revision": "607b9c5db7fdbbafc16a572e7c319baa266a3372", "git_revision": "c3be747b993f0c70e7b93a709ef691383c88fc01",
"remote": "https://git.mozilla.org/releases/gaia.git", "remote": "https://git.mozilla.org/releases/gaia.git",
"branch": "" "branch": ""
}, },
"revision": "7136753530b8af60e42417fc73356ba17971141b", "revision": "5718aa1b0322ec35435fcd253eedeb91e3f7872c",
"repo_path": "integration/gaia-central" "repo_path": "integration/gaia-central"
} }

View File

@ -17,7 +17,8 @@
"{objdir}/dist/b2g-*.crashreporter-symbols.zip", "{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz", "{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml", "{workdir}/sources.xml",
"{objdir}/dist/b2g-update/*.mar" "{objdir}/dist/b2g-update/*.mar",
"{workdir}/mako.zip"
], ],
"zip_files": [ "zip_files": [
["{workdir}/out/target/product/mako/*.img", "out/target/product/mako/"], ["{workdir}/out/target/product/mako/*.img", "out/target/product/mako/"],

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54"> <project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/> <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -18,9 +18,9 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/> <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="638ec448619fda80fcb439b1747af62169d05548"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="638ec448619fda80fcb439b1747af62169d05548"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -17,7 +17,8 @@
"{objdir}/dist/b2g-*.crashreporter-symbols.zip", "{objdir}/dist/b2g-*.crashreporter-symbols.zip",
"{objdir}/dist/b2g-*.tar.gz", "{objdir}/dist/b2g-*.tar.gz",
"{workdir}/sources.xml", "{workdir}/sources.xml",
"{objdir}/dist/b2g-update/*.mar" "{objdir}/dist/b2g-update/*.mar",
"{workdir}/hammerhead.zip"
], ],
"zip_files": [ "zip_files": [
["{workdir}/out/target/product/hammerhead/*.img", "out/target/product/hammerhead/"], ["{workdir}/out/target/product/hammerhead/*.img", "out/target/product/hammerhead/"],

View File

@ -15,12 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf"> <project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="607b9c5db7fdbbafc16a572e7c319baa266a3372"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="c3be747b993f0c70e7b93a709ef691383c88fc01"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/> <project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="27de93fe66c3e80e157d157bd52ca99565351669"/> <project name="moztt" path="external/moztt" remote="b2g" revision="aa5b7b7f6ed207ea1adc4df11d1d8bdaeabadd85"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/> <project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>

View File

@ -44,7 +44,7 @@ var SimulatorEditor = {
Simulators.on("configure", (e, simulator) => { this.edit(simulator) }); Simulators.on("configure", (e, simulator) => { this.edit(simulator) });
// Extract the list of device simulation options we'll support. // Extract the list of device simulation options we'll support.
let deviceFields = form.querySelectorAll("*[data-device]"); let deviceFields = form.querySelectorAll("*[data-device]");
this._deviceOptions = [].map.call(deviceFields, field => field.name); this._deviceOptions = Array.map(deviceFields, field => field.name);
} }
// Append a new <option> to a <select> (or <optgroup>) element. // Append a new <option> to a <select> (or <optgroup>) element.
@ -172,7 +172,7 @@ var SimulatorEditor = {
// TODO (Bug 1146531) Indicate that a custom profile is now required. // TODO (Bug 1146531) Indicate that a custom profile is now required.
} }
// If `form.name` contains the old version, update its last occurrence. // If `form.name` contains the old version, update its last occurrence.
if (form.name.value.contains(oldVer) && simulator.version !== oldVer) { if (form.name.value.includes(oldVer) && simulator.version !== oldVer) {
let regex = new RegExp("(.*)" + oldVer); let regex = new RegExp("(.*)" + oldVer);
let name = form.name.value.replace(regex, "$1" + simulator.version); let name = form.name.value.replace(regex, "$1" + simulator.version);
simulator.options.name = form.name.value = Simulators.uniqueName(name); simulator.options.name = form.name.value = Simulators.uniqueName(name);

View File

@ -139,8 +139,16 @@ var Simulators = {
if (matching.length > 0) { if (matching.length > 0) {
return promise.resolve(); return promise.resolve();
} }
let name = addon.name.replace(" Simulator", ""); let options = {};
return this.add(new Simulator({name}, addon), silently); options.name = addon.name.replace(" Simulator", "");
// Some addons specify a simulator type at the end of their version string,
// e.g. "2_5_tv".
let type = this.simulatorAddonVersion(addon).split("_")[2];
if (type) {
// "tv" is shorthand for type "television".
options.type = (type === "tv" ? "television" : type);
}
return this.add(new Simulator(options, addon), silently);
}, },
// TODO (Bug 1146521) Maybe find a better way to deal with removed addons? // TODO (Bug 1146521) Maybe find a better way to deal with removed addons?
@ -199,11 +207,28 @@ var Simulators = {
return unique; return unique;
}, },
/**
* Compare an addon's ID against the expected form of a simulator addon ID,
* and try to extract its version if there is a match.
*
* Note: If a simulator addon is recognized, but no version can be extracted
* (e.g. custom RegExp pref value), we return "Unknown" to keep the returned
* value 'truthy'.
*/
simulatorAddonVersion(addon) {
let match = SimulatorRegExp.exec(addon.id);
if (!match) {
return null;
}
let version = match[1];
return version || "Unknown";
},
/** /**
* Detect simulator addons, including "unofficial" ones. * Detect simulator addons, including "unofficial" ones.
*/ */
isSimulatorAddon(addon) { isSimulatorAddon(addon) {
return SimulatorRegExp.exec(addon.id); return !!this.simulatorAddonVersion(addon);
}, },
emitUpdated() { emitUpdated() {
@ -250,7 +275,7 @@ function Simulator(options = {}, addon = null) {
this.options = options; this.options = options;
// Fill `this.options` with default values where needed. // Fill `this.options` with default values where needed.
let defaults = this._defaults; let defaults = this.defaults;
for (let option in defaults) { for (let option in defaults) {
if (this.options[option] == null) { if (this.options[option] == null) {
this.options[option] = defaults[option]; this.options[option] = defaults[option];
@ -259,16 +284,26 @@ function Simulator(options = {}, addon = null) {
} }
Simulator.prototype = { Simulator.prototype = {
// Default simulation options, based on the Firefox OS Flame. // Default simulation options.
_defaults: { _defaults: {
width: 320, // Based on the Firefox OS Flame.
height: 570, phone: {
pixelRatio: 1.5 width: 320,
height: 570,
pixelRatio: 1.5
},
// Based on a 720p HD TV.
television: {
width: 1280,
height: 720,
pixelRatio: 1,
}
}, },
_defaultType: "phone",
restoreDefaults() { restoreDefaults() {
let defaults = this.defaults;
let options = this.options; let options = this.options;
let defaults = this._defaults;
for (let option in defaults) { for (let option in defaults) {
options[option] = defaults[option]; options[option] = defaults[option];
} }
@ -307,6 +342,11 @@ Simulator.prototype = {
return process.kill(); return process.kill();
}, },
get defaults() {
let defaults = this._defaults;
return defaults[this.type] || defaults[this._defaultType];
},
get id() { get id() {
return this.name; return this.name;
}, },
@ -315,6 +355,10 @@ Simulator.prototype = {
return this.options.name; return this.options.name;
}, },
get type() {
return this.options.type || this._defaultType;
},
get version() { get version() {
return this.options.b2gBinary ? "Custom" : this.addon.name.match(/\d+\.\d+/)[0]; return this.options.b2gBinary ? "Custom" : this.addon.name.match(/\d+\.\d+/)[0];
}, },

View File

@ -1,4 +1,4 @@
{ {
"stable": ["1.0", "2.0"], "stable": ["1.0", "2.0"],
"unstable": ["3.0"] "unstable": ["3.0", "3.0_tv"]
} }

View File

@ -18,6 +18,10 @@ support-files =
addons/fxos_3_0_simulator-linux64.xpi addons/fxos_3_0_simulator-linux64.xpi
addons/fxos_3_0_simulator-win32.xpi addons/fxos_3_0_simulator-win32.xpi
addons/fxos_3_0_simulator-mac64.xpi addons/fxos_3_0_simulator-mac64.xpi
addons/fxos_3_0_tv_simulator-linux.xpi
addons/fxos_3_0_tv_simulator-linux64.xpi
addons/fxos_3_0_tv_simulator-win32.xpi
addons/fxos_3_0_tv_simulator-mac64.xpi
addons/adbhelper-linux.xpi addons/adbhelper-linux.xpi
addons/adbhelper-linux64.xpi addons/adbhelper-linux64.xpi
addons/adbhelper-win32.xpi addons/adbhelper-win32.xpi

View File

@ -101,13 +101,13 @@
let params = yield runSimulator(0); let params = yield runSimulator(0);
ok(params.path.contains(sim10.addonID) && params.path.contains("b2g-bin"), "Simulator binary path looks right"); ok(params.path.includes(sim10.addonID) && params.path.includes("b2g-bin"), "Simulator binary path looks right");
let pid = params.args.indexOf("-profile"); let pid = params.args.indexOf("-profile");
ok(pid > -1, "Simulator process arguments have --profile"); ok(pid > -1, "Simulator process arguments have --profile");
let profilePath = params.args[pid + 1]; let profilePath = params.args[pid + 1];
ok(profilePath.contains(sim10.addonID) && profilePath.contains("profile"), "Simulator profile path looks right"); ok(profilePath.includes(sim10.addonID) && profilePath.includes("profile"), "Simulator profile path looks right");
ok(params.args.indexOf("-dbgport") > -1 || params.args.indexOf("-start-debugger-server") > -1, "Simulator process arguments have a debugger port"); ok(params.args.indexOf("-dbgport") > -1 || params.args.indexOf("-start-debugger-server") > -1, "Simulator process arguments have a debugger port");
@ -234,8 +234,8 @@
let defaults = Simulator.prototype._defaults; let defaults = Simulator.prototype._defaults;
for (let param in defaults) { for (let param in defaults.phone) {
is(form[param].value, String(defaults[param]), "Default value for device " + param); is(form[param].value, String(defaults.phone[param]), "Default phone value for device " + param);
} }
let width = 5000, height = 4000; let width = 5000, height = 4000;
@ -248,7 +248,7 @@
let sid = params.args.indexOf("-screen"); let sid = params.args.indexOf("-screen");
ok(sid > -1, "Simulator process arguments have --screen"); ok(sid > -1, "Simulator process arguments have --screen");
ok(params.args[sid + 1].contains(width + "x" + height), "Simulator screen resolution looks right"); ok(params.args[sid + 1].includes(width + "x" + height), "Simulator screen resolution looks right");
yield set(form.version, sim10.addonID); yield set(form.version, sim10.addonID);
@ -277,8 +277,8 @@
// Test `device`. // Test `device`.
for (let param in defaults) { for (let param in defaults.phone) {
is(form[param].value, String(defaults[param]), "Default value for device " + param); is(form[param].value, String(defaults.phone[param]), "Default phone value for device " + param);
} }
let devices = yield GetDevices(); let devices = yield GetDevices();
@ -294,15 +294,32 @@
params = yield runSimulator(1); params = yield runSimulator(1);
sid = params.args.indexOf("-screen"); sid = params.args.indexOf("-screen");
ok(params.args[sid + 1].contains(device.width + "x" + device.height), "Simulator screen resolution looks right"); ok(params.args[sid + 1].includes(device.width + "x" + device.height), "Simulator screen resolution looks right");
// Restore default simulator options. // Restore default simulator options.
doc.querySelector("#reset").click(); doc.querySelector("#reset").click();
yield nextTick(); yield nextTick();
for (let param in defaults) { for (let param in defaults.phone) {
is(form[param].value, String(defaults[param]), "Default value for device " + param); is(form[param].value, String(defaults.phone[param]), "Default phone value for device " + param);
}
// Install and configure the fake "Firefox OS 3.0 TV" simulator addon.
let sim30tv = addons.simulators.filter(a => a.version == "3.0_tv")[0];
sim30tv.install();
yield addonStatus(sim30tv, "installed");
is(findAll(".runtime-panel-item-simulator").length, 3, "Three simulators in runtime panel");
simulatorList.querySelectorAll(".configure-button")[2].click();
yield nextTick();
for (let param in defaults.television) {
is(form[param].value, String(defaults.television[param]), "Default TV value for device " + param);
} }
// Force reload the list of simulators. // Force reload the list of simulators.
@ -312,9 +329,15 @@
yield Simulators._load(); yield Simulators._load();
yield nextTick(); yield nextTick();
is(findAll(".runtime-panel-item-simulator").length, 2, "Two simulators saved and reloaded " + Simulators._simulators.map(s => s.name).join(',')); is(findAll(".runtime-panel-item-simulator").length, 3, "Three simulators saved and reloaded " + Simulators._simulators.map(s => s.name).join(','));
// Uninstall the 2.0 addon and watch its Simulator object disappear. // Uninstall the 3.0 TV and 2.0 addons, and watch their Simulator objects disappear.
sim30tv.uninstall();
yield addonStatus(sim30tv, "uninstalled");
is(findAll(".runtime-panel-item-simulator").length, 2, "Two simulators left in runtime panel");
sim20.uninstall(); sim20.uninstall();

View File

@ -38,7 +38,10 @@ IccContactToMozContact(JSContext* aCx, GlobalObject& aGlobal,
if (count > 0) { if (count > 0) {
Sequence<nsString>& nameSeq = properties.mName.Construct().SetValue(); Sequence<nsString>& nameSeq = properties.mName.Construct().SetValue();
for (uint32_t i = 0; i < count; i++) { for (uint32_t i = 0; i < count; i++) {
nameSeq.AppendElement(nsDependentString(rawStringArray[i]), fallible); nameSeq.AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: EmptyString(),
fallible);
} }
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
} }
@ -52,7 +55,9 @@ IccContactToMozContact(JSContext* aCx, GlobalObject& aGlobal,
Sequence<ContactTelField>& numberSeq = properties.mTel.Construct().SetValue(); Sequence<ContactTelField>& numberSeq = properties.mTel.Construct().SetValue();
for (uint32_t i = 0; i < count; i++) { for (uint32_t i = 0; i < count; i++) {
ContactTelField number; ContactTelField number;
number.mValue.Construct() = nsDependentString(rawStringArray[i]); number.mValue.Construct() =
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: EmptyString();
numberSeq.AppendElement(number, fallible); numberSeq.AppendElement(number, fallible);
} }
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
@ -67,7 +72,9 @@ IccContactToMozContact(JSContext* aCx, GlobalObject& aGlobal,
Sequence<ContactField>& emailSeq = properties.mEmail.Construct().SetValue(); Sequence<ContactField>& emailSeq = properties.mEmail.Construct().SetValue();
for (uint32_t i = 0; i < count; i++) { for (uint32_t i = 0; i < count; i++) {
ContactField email; ContactField email;
email.mValue.Construct() = nsDependentString(rawStringArray[i]); email.mValue.Construct() =
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: EmptyString();
emailSeq.AppendElement(email, fallible); emailSeq.AppendElement(email, fallible);
} }
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);

View File

@ -129,6 +129,11 @@ NS_IMETHODIMP IccContact::Get##_field(uint32_t* aCount, char16_t*** a##_field)
return NS_ERROR_OUT_OF_MEMORY; \ return NS_ERROR_OUT_OF_MEMORY; \
} \ } \
for (uint32_t i = 0; i < count; i++) { \ for (uint32_t i = 0; i < count; i++) { \
if(m##_field[i].IsVoid()) { \
(temp)[i] = nullptr; \
continue; \
} \
\
(temp)[i] = ToNewUnicode(m##_field[i]); \ (temp)[i] = ToNewUnicode(m##_field[i]); \
if (!(temp)[i]) { \ if (!(temp)[i]) { \
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, temp); \ NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(i, temp); \

View File

@ -86,13 +86,8 @@ function IccContact(aContact) {
this._numbers = []; this._numbers = [];
this._emails = []; this._emails = [];
if (aContact.alphaId) { this._names.push(aContact.alphaId);
this._names.push(aContact.alphaId); this._numbers.push(aContact.number);
}
if (aContact.number) {
this._numbers.push(aContact.number);
}
let anrLen = aContact.anr ? aContact.anr.length : 0; let anrLen = aContact.anr ? aContact.anr.length : 0;
for (let i = 0; i < anrLen; i++) { for (let i = 0; i < anrLen; i++) {

View File

@ -51,7 +51,9 @@ IccIPCUtils::GetIccContactDataFromIccContact(nsIIccContact* aContact,
NS_ENSURE_SUCCESS_VOID(rv); NS_ENSURE_SUCCESS_VOID(rv);
if (count > 0) { if (count > 0) {
for (uint32_t i = 0; i < count; i++) { for (uint32_t i = 0; i < count; i++) {
aOutData.names().AppendElement(nsDependentString(rawStringArray[i])); aOutData.names().AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: NullString());
} }
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
} }
@ -63,7 +65,9 @@ IccIPCUtils::GetIccContactDataFromIccContact(nsIIccContact* aContact,
NS_ENSURE_SUCCESS_VOID(rv); NS_ENSURE_SUCCESS_VOID(rv);
if (count > 0) { if (count > 0) {
for (uint32_t i = 0; i < count; i++) { for (uint32_t i = 0; i < count; i++) {
aOutData.numbers().AppendElement(nsDependentString(rawStringArray[i])); aOutData.numbers().AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: NullString());
} }
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
} }
@ -75,7 +79,9 @@ IccIPCUtils::GetIccContactDataFromIccContact(nsIIccContact* aContact,
NS_ENSURE_SUCCESS_VOID(rv); NS_ENSURE_SUCCESS_VOID(rv);
if (count > 0) { if (count > 0) {
for (uint32_t i = 0; i < count; i++) { for (uint32_t i = 0; i < count; i++) {
aOutData.emails().AppendElement(nsDependentString(rawStringArray[i])); aOutData.emails().AppendElement(
rawStringArray[i] ? nsDependentString(rawStringArray[i])
: NullString());
} }
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(count, rawStringArray);
} }

View File

@ -30,6 +30,14 @@ var TEST_ADD_DATA = [{
name: ["add6"], name: ["add6"],
tel: [{value: "01234567890123456789"}, {value: "123456"}, {value: "123"}], tel: [{value: "01234567890123456789"}, {value: "123456"}, {value: "123"}],
email:[{value: "test@mozilla.com"}], email:[{value: "test@mozilla.com"}],
}, {
// a contact without number.
name: ["add7"],
tel: [{value: ""}],
}, {
// a contact without name.
name: [""],
tel: [{value: "0987654321"}],
}]; }];
function testAddContact(aIcc, aType, aMozContact, aPin2) { function testAddContact(aIcc, aType, aMozContact, aPin2) {

View File

@ -25,7 +25,7 @@ const TEST_UPDATE_DATA = [{
name: ["Fire 火"], name: ["Fire 火"],
tel: [{value: ""}]}, tel: [{value: ""}]},
expect: { expect: {
number: null} number: ""}
}, { }, {
id: 5, id: 5,
data: { data: {
@ -52,12 +52,8 @@ function testUpdateContact(aIcc, aType, aContactId, aMozContact, aExpect, aPin2)
return aIcc.updateContact(aType, contact, aPin2) return aIcc.updateContact(aType, contact, aPin2)
.then((aResult) => { .then((aResult) => {
if (aExpect.number === null) { is(aResult.tel[0].value, aExpect.number);
is(aResult.tel, null); ok(aResult.tel.length == 1);
} else {
is(aResult.tel[0].value, aExpect.number);
ok(aResult.tel.length == 1);
}
// We only support SIM in emulator, so we don't have anr and email field. // We only support SIM in emulator, so we don't have anr and email field.
ok(!aResult.email); ok(!aResult.email);
is(contact.id, aIcc.iccInfo.iccid + aContactId); is(contact.id, aIcc.iccInfo.iccid + aContactId);
@ -101,11 +97,7 @@ function testUpdateContacts(aIcc, aType, aCacheContacts, aPin2) {
is(contact.name[0], expectedResult.data.name[0]); is(contact.name[0], expectedResult.data.name[0]);
is(contact.id, aIcc.iccInfo.iccid + expectedResult.id); is(contact.id, aIcc.iccInfo.iccid + expectedResult.id);
if (expectedResult.expect.number === null) { is(contact.tel[0].value, expectedResult.expect.number);
is(contact.tel, null);
} else {
is(contact.tel[0].value, expectedResult.expect.number);
}
} }
return revertContacts(aIcc, aCacheContacts, aType, aPin2); return revertContacts(aIcc, aCacheContacts, aType, aPin2);
}); });

View File

@ -346,6 +346,7 @@ public:
private: private:
static uint32_t sBackgroundPerceivableGracePeriodMS; static uint32_t sBackgroundPerceivableGracePeriodMS;
static uint32_t sBackgroundGracePeriodMS; static uint32_t sBackgroundGracePeriodMS;
static uint32_t sMemoryPressureGracePeriodMS;
void FireTestOnlyObserverNotification( void FireTestOnlyObserverNotification(
const char* aTopic, const char* aTopic,
@ -370,6 +371,7 @@ private:
nsAutoCString mNameWithComma; nsAutoCString mNameWithComma;
nsCOMPtr<nsITimer> mResetPriorityTimer; nsCOMPtr<nsITimer> mResetPriorityTimer;
nsCOMPtr<nsITimer> mMemoryPressureTimer;
}; };
/* static */ bool ProcessPriorityManagerImpl::sInitialized = false; /* static */ bool ProcessPriorityManagerImpl::sInitialized = false;
@ -382,6 +384,7 @@ private:
ProcessPriorityManagerImpl::sSingleton; ProcessPriorityManagerImpl::sSingleton;
/* static */ uint32_t ParticularProcessPriorityManager::sBackgroundPerceivableGracePeriodMS = 0; /* static */ uint32_t ParticularProcessPriorityManager::sBackgroundPerceivableGracePeriodMS = 0;
/* static */ uint32_t ParticularProcessPriorityManager::sBackgroundGracePeriodMS = 0; /* static */ uint32_t ParticularProcessPriorityManager::sBackgroundGracePeriodMS = 0;
/* static */ uint32_t ParticularProcessPriorityManager::sMemoryPressureGracePeriodMS = 0;
NS_IMPL_ISUPPORTS(ProcessPriorityManagerImpl, NS_IMPL_ISUPPORTS(ProcessPriorityManagerImpl,
nsIObserver, nsIObserver,
@ -701,6 +704,8 @@ ParticularProcessPriorityManager::StaticInit()
"dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS"); "dom.ipc.processPriorityManager.backgroundPerceivableGracePeriodMS");
Preferences::AddUintVarCache(&sBackgroundGracePeriodMS, Preferences::AddUintVarCache(&sBackgroundGracePeriodMS,
"dom.ipc.processPriorityManager.backgroundGracePeriodMS"); "dom.ipc.processPriorityManager.backgroundGracePeriodMS");
Preferences::AddUintVarCache(&sMemoryPressureGracePeriodMS,
"dom.ipc.processPriorityManager.memoryPressureGracePeriodMS");
} }
void void
@ -1014,10 +1019,21 @@ ParticularProcessPriorityManager::ScheduleResetPriority(TimeoutPref aTimeoutPref
NS_IMETHODIMP NS_IMETHODIMP
ParticularProcessPriorityManager::Notify(nsITimer* aTimer) ParticularProcessPriorityManager::Notify(nsITimer* aTimer)
{ {
LOGP("Reset priority timer callback; about to ResetPriorityNow."); if (mResetPriorityTimer == aTimer) {
ResetPriorityNow(); LOGP("Reset priority timer callback; about to ResetPriorityNow.");
mResetPriorityTimer = nullptr; ResetPriorityNow();
return NS_OK; mResetPriorityTimer = nullptr;
return NS_OK;
}
if (mContentParent && mMemoryPressureTimer == aTimer) {
Unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority"));
mMemoryPressureTimer = nullptr;
return NS_OK;
}
NS_WARNING("Unexpected timer!");
return NS_ERROR_INVALID_POINTER;
} }
bool bool
@ -1142,10 +1158,18 @@ ParticularProcessPriorityManager::SetPriorityNow(ProcessPriority aPriority,
NotifyProcessPriorityChanged(this, oldPriority); NotifyProcessPriorityChanged(this, oldPriority);
Unused << mContentParent->SendNotifyProcessPriorityChanged(mPriority); Unused << mContentParent->SendNotifyProcessPriorityChanged(mPriority);
}
if (aPriority < PROCESS_PRIORITY_FOREGROUND) { if (mMemoryPressureTimer) {
Unused << mContentParent->SendFlushMemory(NS_LITERAL_STRING("lowering-priority")); mMemoryPressureTimer->Cancel();
mMemoryPressureTimer = nullptr;
}
if (aPriority < PROCESS_PRIORITY_FOREGROUND) {
mMemoryPressureTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
mMemoryPressureTimer->InitWithCallback(this,
sMemoryPressureGracePeriodMS,
nsITimer::TYPE_ONE_SHOT);
}
} }
FireTestOnlyObserverNotification("process-priority-set", FireTestOnlyObserverNotification("process-priority-set",

View File

@ -8689,7 +8689,7 @@ ICCPDUHelperObject.prototype = {
* 0xff. * 0xff.
* @param str String to be written. Could be null. * @param str String to be written. Could be null.
* *
* @return The string has been written into Buf. * @return The string has been written into Buf. "" if str is null.
*/ */
writeStringTo8BitUnpacked: function(numOctets, str) { writeStringTo8BitUnpacked: function(numOctets, str) {
const langTable = PDU_NL_LOCKING_SHIFT_TABLES[PDU_NL_IDENTIFIER_DEFAULT]; const langTable = PDU_NL_LOCKING_SHIFT_TABLES[PDU_NL_IDENTIFIER_DEFAULT];
@ -8729,7 +8729,7 @@ ICCPDUHelperObject.prototype = {
GsmPDUHelper.writeHexOctet(0xff); GsmPDUHelper.writeHexOctet(0xff);
} }
return (str) ? str.substring(0, i) : null; return (str) ? str.substring(0, i) : "";
}, },
/** /**
@ -9090,7 +9090,7 @@ ICCPDUHelperObject.prototype = {
*/ */
writeAlphaIdentifier: function(numOctets, alphaId) { writeAlphaIdentifier: function(numOctets, alphaId) {
if (numOctets === 0) { if (numOctets === 0) {
return null; return "";
} }
// If alphaId is empty or it's of GSM 8 bit. // If alphaId is empty or it's of GSM 8 bit.
@ -9222,7 +9222,7 @@ ICCPDUHelperObject.prototype = {
for (let i = 0; i < ADN_MAX_BCD_NUMBER_BYTES + 1; i++) { for (let i = 0; i < ADN_MAX_BCD_NUMBER_BYTES + 1; i++) {
GsmPDUHelper.writeHexOctet(0xff); GsmPDUHelper.writeHexOctet(0xff);
} }
return null; return "";
} }
} }
}; };

View File

@ -367,7 +367,7 @@ add_test(function test_write_alpha_identifier() {
// Removal // Removal
let writenAlphaId = iccHelper.writeAlphaIdentifier(10, null); let writenAlphaId = iccHelper.writeAlphaIdentifier(10, null);
equal(writenAlphaId, null); equal(writenAlphaId, "");
equal(iccHelper.readAlphaIdentifier(10), ""); equal(iccHelper.readAlphaIdentifier(10), "");
// GSM 8 bit // GSM 8 bit
@ -401,7 +401,7 @@ add_test(function test_write_alpha_identifier() {
// Write 0 octet. // Write 0 octet.
writenAlphaId = iccHelper.writeAlphaIdentifier(0, "1"); writenAlphaId = iccHelper.writeAlphaIdentifier(0, "1");
helper.writeHexOctet(0xff); // dummy octet. helper.writeHexOctet(0xff); // dummy octet.
equal(writenAlphaId, null); equal(writenAlphaId, "");
equal(iccHelper.readAlphaIdentifier(1), ""); equal(iccHelper.readAlphaIdentifier(1), "");
run_next_test(); run_next_test();
@ -490,8 +490,8 @@ add_test(function test_write_alpha_id_dialling_number() {
writtenContact = helper.writeAlphaIdDiallingNumber(recordSize); writtenContact = helper.writeAlphaIdDiallingNumber(recordSize);
contactR = helper.readAlphaIdDiallingNumber(recordSize); contactR = helper.readAlphaIdDiallingNumber(recordSize);
equal(contactR, null); equal(contactR, null);
equal(writtenContact.alphaId, null); equal(writtenContact.alphaId, "");
equal(writtenContact.number, null); equal(writtenContact.number, "");
// Write a longer alphaId/dialling number // Write a longer alphaId/dialling number
// Dialling Number : Maximum 20 digits(10 octets). // Dialling Number : Maximum 20 digits(10 octets).

View File

@ -38,6 +38,7 @@ config = {
"GAIA_OPTIMIZE": "1", "GAIA_OPTIMIZE": "1",
"WGET_OPTS": "-c -q" "WGET_OPTS": "-c -q"
}, },
"update_types": [ "ota", "fota" ],
"is_automation": True, "is_automation": True,
"repo_remote_mappings": { "repo_remote_mappings": {
'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp', 'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp',

View File

@ -7,10 +7,8 @@ config = {
'build', 'build',
'build-symbols', 'build-symbols',
'make-updates', 'make-updates',
'prep-upload', 'prep-upload'
'submit-to-balrog'
], ],
"balrog_credentials_file": "balrog_credentials",
"nightly_build": True, "nightly_build": True,
"env": { "env": {
"GAIA_OPTIMIZE": "1", "GAIA_OPTIMIZE": "1",
@ -21,8 +19,10 @@ config = {
"BOWER_FLAGS": "--allow-root", "BOWER_FLAGS": "--allow-root",
"B2G_PATH": "%(work_dir)s", "B2G_PATH": "%(work_dir)s",
"GAIA_DISTRIBUTION_DIR": "%(work_dir)s/gaia/distros/spark", "GAIA_DISTRIBUTION_DIR": "%(work_dir)s/gaia/distros/spark",
"WGET_OPTS": "-c -q" "WGET_OPTS": "-c -q",
"B2G_FOTA_FULLIMG_PARTS": "/boot:boot.img /system:system.img /recovery:recovery.img"
}, },
"update_types": [ "ota", "fota", "fota:fullimg" ],
"is_automation": True, "is_automation": True,
"repo_remote_mappings": { "repo_remote_mappings": {
'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp', 'https://android.googlesource.com/': 'https://git.mozilla.org/external/aosp',

View File

@ -165,14 +165,16 @@ class B2GBuild(LocalesMixin, PurgeMixin,
self.objdir = self.config.get("gecko_objdir", self.objdir = self.config.get("gecko_objdir",
os.path.join(dirs['work_dir'], 'objdir-gecko')) os.path.join(dirs['work_dir'], 'objdir-gecko'))
self.abs_dirs['abs_obj_dir'] = self.objdir self.abs_dirs['abs_obj_dir'] = self.objdir
if self.config.get("update_type", "ota") == "fota":
self.make_updates_cmd = ['./build.sh', 'gecko-update-fota'] # Evaluating the update type to build.
self.extra_update_attrs = 'isOsUpdate="true"' # Default is OTA if config do not specifies anything
self.isOSUpdate = True if "update_types" in self.config:
self.update_types = self.config["update_types"]
elif "update_type" in self.config:
self.update_types = [self.config["update_type"]]
else: else:
self.make_updates_cmd = ['./build.sh', 'gecko-update-full'] self.update_types = ["ota"]
self.extra_update_attrs = None
self.isOSUpdate = False
self.package_urls = {} self.package_urls = {}
# We need to create the virtualenv directly (without using an action) in # We need to create the virtualenv directly (without using an action) in
@ -306,31 +308,55 @@ class B2GBuild(LocalesMixin, PurgeMixin,
output_dir = os.path.join(dirs['work_dir'], 'out', 'target', 'product', devicedir) output_dir = os.path.join(dirs['work_dir'], 'out', 'target', 'product', devicedir)
return output_dir return output_dir
def query_device_name(self):
return os.path.basename(self.query_device_outputdir())
def query_application_ini(self): def query_application_ini(self):
return os.path.join(self.query_device_outputdir(), 'system', 'b2g', 'application.ini') return os.path.join(self.query_device_outputdir(), 'system', 'b2g', 'application.ini')
def query_marfile_path(self): def query_marfile_path(self, update_type):
if self.config.get("update_type", "ota") == "fota": if update_type.startswith("fota"):
mardir = self.query_device_outputdir() mardir = self.query_device_outputdir()
else: else:
mardir = "%s/dist/b2g-update" % self.objdir mardir = "%s/dist/b2g-update" % self.objdir
device_name = self.query_device_name()
update_type_files = {
'ota': 'b2g-%s-gecko-update.mar' % device_name,
'fota': 'fota-%s-update.mar' % device_name,
'fota:full': 'fota-%s-update-full.mar' % device_name,
'fota:fullimg': 'fota-%s-update-fullimg.mar' % device_name
}
mars = [] mars = []
for f in os.listdir(mardir): for f in os.listdir(mardir):
if f.endswith(".mar"): if f.endswith(update_type_files[update_type]):
mars.append(f) mars.append(f)
if len(mars) != 1: if len(mars) < 1:
self.fatal("Found none or too many marfiles in %s, don't know what to do:\n%s" % (mardir, mars), exit_code=1) self.fatal("Found none or too many marfiles in %s, don't know what to do:\n%s" % (mardir, mars), exit_code=1)
return "%s/%s" % (mardir, mars[0]) return "%s/%s" % (mardir, mars[0])
def query_complete_mar_url(self): def query_complete_mar_url(self, marfile=None):
mar_url = None
if "complete_mar_url" in self.config: if "complete_mar_url" in self.config:
return self.config["complete_mar_url"] mar_url = self.config["complete_mar_url"]
if "completeMarUrl" in self.package_urls: elif "completeMarUrl" in self.package_urls:
return self.package_urls["completeMarUrl"] mar_url = self.package_urls["completeMarUrl"]
self.fatal("Couldn't find complete mar url in config or package_urls") else:
self.fatal("Couldn't find complete mar url in config or package_urls")
# To support OTA and FOTA update payload, we cannot rely on the filename
# being computed before we get called since we will determine the filename
# ourselves. Let's detect when the URL does not ends with ".mar" and in
# this case, we append the MAR file we just collected
if not mar_url.endswith(".mar"):
if marfile is not None:
self.fatal("URL does not contains a MAR file and none found")
mar_url = os.path.join(mar_url, os.path.basename(marfile))
return mar_url
# Actions {{{2 # Actions {{{2
def clobber(self): def clobber(self):
@ -613,36 +639,39 @@ class B2GBuild(LocalesMixin, PurgeMixin,
self.fatal("failed to upload symbols", exit_code=2) self.fatal("failed to upload symbols", exit_code=2)
def make_updates(self): def make_updates(self):
if not self.query_is_nightly(): if not self.update_types:
self.info("Not a nightly build. Skipping...") self.fatal("No update types defined. We should have had at least defaulted to OTA ...")
return
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
self.load_gecko_config() self.load_gecko_config()
cmd = self.make_updates_cmd[:]
env = self.query_build_env() env = self.query_build_env()
self.enable_mock() for update_type in self.update_types:
retval = self.run_command(cmd, cwd=dirs['work_dir'], env=env, error_list=B2GMakefileErrorList) # Defaulting to OTA
self.disable_mock() make_target = "gecko-update-full"
if retval != 0: # Building a FOTA with only Gecko/Gaia (+ a few redistribuable)
self.fatal("failed to create complete update", exit_code=2) if update_type == "fota":
make_target = "gecko-update-fota"
# Sign the updates # Building a FOTA with all system partition files
self.sign_updates() if update_type == "fota:full":
make_target = "gecko-update-fota-full"
def sign_updates(self): # Building a FOTA with full partitions images
if 'MOZ_SIGNING_SERVERS' not in os.environ: if update_type == "fota:fullimg":
self.info("Skipping signing since no MOZ_SIGNING_SERVERS set") make_target = "gecko-update-fota-fullimg"
return
self.checkout_tools() cmd = ['./build.sh', make_target]
cmd = self.query_moz_sign_cmd(formats=['b2gmar'])
cmd.append(self.query_marfile_path())
retval = self.run_command(cmd) self.enable_mock()
if retval != 0: retval = self.run_command(cmd, cwd=dirs['work_dir'], env=env, error_list=B2GMakefileErrorList)
self.fatal("failed to sign complete update", exit_code=2) self.disable_mock()
if retval != 0:
self.fatal("failed to create update", exit_code=2)
def prep_upload(self): def prep_upload(self):
if not self.query_do_upload(): if not self.query_do_upload():
@ -722,8 +751,7 @@ class B2GBuild(LocalesMixin, PurgeMixin,
if base_pattern in public_upload_patterns: if base_pattern in public_upload_patterns:
public_files.append(f) public_files.append(f)
device_name = os.path.basename(output_dir) blobfree_dist = self.query_device_name() + '.blobfree-dist.zip'
blobfree_dist = device_name + '.blobfree-dist.zip'
blobfree_zip = os.path.join(output_dir, blobfree_dist) blobfree_zip = os.path.join(output_dir, blobfree_dist)
if os.path.exists(blobfree_zip): if os.path.exists(blobfree_zip):
@ -1081,32 +1109,34 @@ class B2GBuild(LocalesMixin, PurgeMixin,
self.checkout_tools() self.checkout_tools()
marfile = self.query_marfile_path() for update_type in self.update_types:
# Need to update the base url to point at FTP, or better yet, read post_upload.py output? marfile = self.query_marfile_path(update_type)
mar_url = self.query_complete_mar_url() # Need to update the base url to point at FTP, or better yet, read
# post_upload.py output?
mar_url = self.query_complete_mar_url(marfile)
# Set other necessary properties for Balrog submission. None need to # Set other necessary properties for Balrog submission. None need to
# be passed back to buildbot, so we won't write them to the properties # be passed back to buildbot, so we won't write them to the properties
# files. # files.
# Locale is hardcoded to en-US, for silly reasons # Locale is hardcoded to en-US, for silly reasons
self.set_buildbot_property("locale", "en-US") self.set_buildbot_property("locale", "en-US")
self.set_buildbot_property("appVersion", self.query_version()) self.set_buildbot_property("appVersion", self.query_version())
# The Balrog submitter translates this platform into a build target # The Balrog submitter translates this platform into a build target
# via https://github.com/mozilla/build-tools/blob/master/lib/python/release/platforms.py#L23 # via https://github.com/mozilla/build-tools/blob/master/lib/python/release/platforms.py#L23
if "platform" in self.config: if "platform" in self.config:
self.set_buildbot_property("platform", self.config["platform"]) self.set_buildbot_property("platform", self.config["platform"])
else: else:
self.set_buildbot_property("platform", self.buildbot_config["properties"]["platform"]) self.set_buildbot_property("platform", self.buildbot_config["properties"]["platform"])
# TODO: Is there a better way to get this? # TODO: Is there a better way to get this?
self.set_buildbot_property("appName", "B2G") self.set_buildbot_property("appName", "B2G")
# TODO: don't hardcode # TODO: don't hardcode
self.set_buildbot_property("hashType", "sha512") self.set_buildbot_property("hashType", "sha512")
self.set_buildbot_property("completeMarSize", self.query_filesize(marfile)) self.set_buildbot_property("completeMarSize", self.query_filesize(marfile))
self.set_buildbot_property("completeMarHash", self.query_sha512sum(marfile)) self.set_buildbot_property("completeMarHash", self.query_sha512sum(marfile))
self.set_buildbot_property("completeMarUrl", mar_url) self.set_buildbot_property("completeMarUrl", mar_url)
self.set_buildbot_property("isOSUpdate", self.isOSUpdate) self.set_buildbot_property("isOSUpdate", update_type.startswith("fota"))
self.submit_balrog_updates(product='b2g') self.submit_balrog_updates(product='b2g')
@PostScriptRun @PostScriptRun
def _remove_userconfig(self): def _remove_userconfig(self):

View File

@ -11,7 +11,6 @@ fi
PLATFORM=${TARGET%%-*} PLATFORM=${TARGET%%-*}
aws s3 cp s3://b2g-nightly-credentials/balrog_credentials . aws s3 cp s3://b2g-nightly-credentials/balrog_credentials .
mar_file=b2g-$PLATFORM-gecko-update.mar
# We need different platform names for each variant (user, userdebug and # We need different platform names for each variant (user, userdebug and
# eng). We do not append variant suffix for "user" to keep compability with # eng). We do not append variant suffix for "user" to keep compability with
@ -41,6 +40,6 @@ $WORKSPACE/gecko/testing/mozharness/scripts/b2g_build.py \
--repo=$WORKSPACE/gecko \ --repo=$WORKSPACE/gecko \
--platform $PLATFORM \ --platform $PLATFORM \
--gecko-objdir=$gecko_objdir \ --gecko-objdir=$gecko_objdir \
--complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/$RUN_ID/artifacts/public/build/$mar_file --complete-mar-url https://queue.taskcluster.net/v1/task/$TASK_ID/runs/$RUN_ID/artifacts/public/build/
. post-build.sh . post-build.sh

View File

@ -17,6 +17,11 @@ mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-ar
mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip
# Upload public images as public artifacts on Nexus 4 KK and Nexus 5 L
if [ "${TARGET}" = "nexus-4-kk" -o "${TARGET}" = "nexus-5-l" ]; then
mv $HOME/artifacts/${TARGET}.zip $HOME/artifacts-public/
fi
if [ -f $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip ]; then if [ -f $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip ]; then
mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip
fi fi
@ -25,8 +30,19 @@ if [ -f $WORKSPACE/B2G/upload-public/*.blobfree-dist.zip ]; then
mv $WORKSPACE/B2G/upload-public/*.blobfree-dist.zip $HOME/artifacts-public/ mv $WORKSPACE/B2G/upload-public/*.blobfree-dist.zip $HOME/artifacts-public/
fi fi
if [ -f $WORKSPACE/B2G/upload-public/$mar_file ]; then # FOTA full and fullimg might contain blobs
mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/ if [ -f $WORKSPACE/B2G/upload/fota-*-update-*.mar ]; then
mv $WORKSPACE/B2G/upload/fota-*-update-*.mar $HOME/artifacts/
fi
# Gecko/Gaia OTA is clean
if [ -f $WORKSPACE/B2G/upload-public/b2g-*-gecko-update.mar ]; then
mv $WORKSPACE/B2G/upload-public/b2g-*-gecko-update.mar $HOME/artifacts-public/
fi
# Gecko/Gaia FOTA is clean
if [ -f $WORKSPACE/B2G/upload-public/fota-*-update.mar ]; then
mv $WORKSPACE/B2G/upload-public/fota-*-update.mar $HOME/artifacts-public/
fi fi
ccache -s ccache -s

View File

@ -61,6 +61,7 @@ flags:
- flame-kk # b2g flame kitkat - flame-kk # b2g flame kitkat
- flame-kk-eng # b2g flame eng build - flame-kk-eng # b2g flame eng build
- flame-kk-spark-eng - flame-kk-spark-eng
- flame-kk-ota
- nexus-4 - nexus-4
- nexus-4-eng - nexus-4-eng
- nexus-4-kk - nexus-4-kk

View File

@ -31,6 +31,14 @@ builds:
task: tasks/builds/b2g_aries_spark_ota_opt.yml task: tasks/builds/b2g_aries_spark_ota_opt.yml
debug: debug:
task: tasks/builds/b2g_aries_spark_ota_debug.yml task: tasks/builds/b2g_aries_spark_ota_debug.yml
flame-kk-ota:
platforms:
- b2g
types:
opt:
task: tasks/builds/b2g_flame_kk_ota_opt.yml
debug:
task: tasks/builds/b2g_flame_kk_ota_debug.yml
post-build: post-build:
simulator: simulator:

View File

@ -16,7 +16,6 @@ task:
env: env:
VARIANT: userdebug VARIANT: userdebug
DOGFOOD: 1 DOGFOOD: 1
HARDWARE_COMPOSER: 0
MOZHARNESS_CONFIG: b2g/taskcluster-spark-dogfood.py MOZHARNESS_CONFIG: b2g/taskcluster-spark-dogfood.py
extra: extra:
treeherderEnv: treeherderEnv:

View File

@ -1,5 +1,8 @@
$inherits: $inherits:
from: 'tasks/builds/b2g_dolphin_base.yml' from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin-512-eng'
build_type: 'opt'
task: task:
scopes: scopes:
- 'docker-worker:cache:build-dolphin-512-eng' - 'docker-worker:cache:build-dolphin-512-eng'

View File

@ -1,5 +1,8 @@
$inherits: $inherits:
from: 'tasks/builds/b2g_dolphin_base.yml' from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin-512'
build_type: 'opt'
task: task:
scopes: scopes:
- 'docker-worker:cache:build-dolphin-512-opt' - 'docker-worker:cache:build-dolphin-512-opt'

View File

@ -1,5 +1,8 @@
$inherits: $inherits:
from: 'tasks/builds/b2g_dolphin_base.yml' from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin-eng'
build_type: 'opt'
task: task:
scopes: scopes:
- 'docker-worker:cache:build-dolphin-eng' - 'docker-worker:cache:build-dolphin-eng'

View File

@ -1,5 +1,8 @@
$inherits: $inherits:
from: 'tasks/builds/b2g_dolphin_base.yml' from: 'tasks/builds/b2g_dolphin_base.yml'
variables:
build_name: 'dolphin'
build_type: 'opt'
task: task:
scopes: scopes:
- 'docker-worker:cache:build-dolphin-opt' - 'docker-worker:cache:build-dolphin-opt'