mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Merge b2g-inbound to m-c. a=merge
This commit is contained in:
commit
568c3a360e
@ -22,16 +22,13 @@ function setupButtons() {
|
||||
// FXOS_SIMULATOR turned on.
|
||||
return;
|
||||
}
|
||||
// The touch event helper is enabled on shell.html document,
|
||||
// so that click events are delayed and it is better to
|
||||
// listen for touch events.
|
||||
homeButton.addEventListener('touchstart', function() {
|
||||
homeButton.addEventListener('mousedown', function() {
|
||||
let window = shell.contentBrowser.contentWindow;
|
||||
let e = new window.KeyboardEvent('keydown', {key: 'Home'});
|
||||
window.dispatchEvent(e);
|
||||
homeButton.classList.add('active');
|
||||
});
|
||||
homeButton.addEventListener('touchend', function() {
|
||||
homeButton.addEventListener('mouseup', function() {
|
||||
let window = shell.contentBrowser.contentWindow;
|
||||
let e = new window.KeyboardEvent('keyup', {key: 'Home'});
|
||||
window.dispatchEvent(e);
|
||||
@ -40,10 +37,10 @@ function setupButtons() {
|
||||
|
||||
Cu.import("resource://gre/modules/GlobalSimulatorScreen.jsm");
|
||||
let rotateButton = document.getElementById('rotate-button');
|
||||
rotateButton.addEventListener('touchstart', function () {
|
||||
rotateButton.addEventListener('mousedown', function() {
|
||||
rotateButton.classList.add('active');
|
||||
});
|
||||
rotateButton.addEventListener('touchend', function() {
|
||||
rotateButton.addEventListener('mouseup', function() {
|
||||
GlobalSimulatorScreen.flipScreen();
|
||||
rotateButton.classList.remove('active');
|
||||
});
|
||||
|
@ -194,17 +194,26 @@ let LogCapture = {
|
||||
* as an ArrayBuffer.
|
||||
*/
|
||||
getScreenshot: function() {
|
||||
this.ensureLoaded();
|
||||
let deferred = Promise.defer();
|
||||
try {
|
||||
this.ensureLoaded();
|
||||
|
||||
let fr = Cc["@mozilla.org/files/filereader;1"]
|
||||
.createInstance(Ci.nsIDOMFileReader);
|
||||
let fr = Cc["@mozilla.org/files/filereader;1"]
|
||||
.createInstance(Ci.nsIDOMFileReader);
|
||||
|
||||
fr.onload = function(evt) {
|
||||
deferred.resolve(new Uint8Array(evt.target.result));
|
||||
};
|
||||
fr.onload = function(evt) {
|
||||
deferred.resolve(new Uint8Array(evt.target.result));
|
||||
};
|
||||
|
||||
fr.readAsArrayBuffer(Screenshot.get());
|
||||
fr.onerror = function(evt) {
|
||||
deferred.reject(evt);
|
||||
};
|
||||
|
||||
fr.readAsArrayBuffer(Screenshot.get());
|
||||
} catch(e) {
|
||||
// We pass any errors through to the deferred Promise
|
||||
deferred.reject(e);
|
||||
}
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
@ -16,10 +16,14 @@ function parseLogArray(array) {
|
||||
let data = new DataView(array.buffer);
|
||||
let byteString = String.fromCharCode.apply(null, array);
|
||||
|
||||
// Length of bytes that precede the payload of a log message
|
||||
// From the 5 Uint32 and 1 Uint8 reads
|
||||
const HEADER_LENGTH = 21;
|
||||
|
||||
let logMessages = [];
|
||||
let pos = 0;
|
||||
|
||||
while (pos < byteString.length) {
|
||||
while (pos + HEADER_LENGTH < byteString.length) {
|
||||
// Parse a single log entry
|
||||
|
||||
// Track current offset from global position
|
||||
|
@ -277,15 +277,18 @@ let LogShake = {
|
||||
* resolve to an array of log filenames.
|
||||
*/
|
||||
captureLogs: function() {
|
||||
let logArrays = this.readLogs();
|
||||
return this.saveLogs(logArrays);
|
||||
return this.readLogs().then(logArrays => {
|
||||
return this.saveLogs(logArrays);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Read in all log files, returning their formatted contents
|
||||
* @return {Promise<Array>}
|
||||
*/
|
||||
readLogs: function() {
|
||||
let logArrays = {};
|
||||
let readPromises = [];
|
||||
|
||||
try {
|
||||
logArrays["properties"] =
|
||||
@ -295,14 +298,15 @@ let LogShake = {
|
||||
}
|
||||
|
||||
// Let Gecko perfom the dump to a file, and just collect it
|
||||
try {
|
||||
let readAboutMemoryPromise = new Promise(resolve => {
|
||||
// Wrap the readAboutMemory promise to make it infallible
|
||||
LogCapture.readAboutMemory().then(aboutMemory => {
|
||||
let file = OS.Path.basename(aboutMemory);
|
||||
let logArray;
|
||||
try {
|
||||
logArray = LogCapture.readLogFile(aboutMemory);
|
||||
if (!logArray) {
|
||||
debug("LogCapture.readLogFile() returned nothing about:memory ");
|
||||
debug("LogCapture.readLogFile() returned nothing for about:memory");
|
||||
}
|
||||
// We need to remove the dumped file, now that we have it in memory
|
||||
OS.File.remove(aboutMemory);
|
||||
@ -310,18 +314,25 @@ let LogShake = {
|
||||
Cu.reportError("Unable to handle about:memory dump: " + ex);
|
||||
}
|
||||
logArrays[file] = LogParser.prettyPrintArray(logArray);
|
||||
resolve();
|
||||
}, ex => {
|
||||
Cu.reportError("Unable to get about:memory dump: " + ex);
|
||||
resolve();
|
||||
});
|
||||
} catch (ex) {
|
||||
Cu.reportError("Unable to get about:memory dump: " + ex);
|
||||
}
|
||||
});
|
||||
readPromises.push(readAboutMemoryPromise);
|
||||
|
||||
try {
|
||||
// Wrap the promise to make it infallible
|
||||
let readScreenshotPromise = new Promise(resolve => {
|
||||
LogCapture.getScreenshot().then(screenshot => {
|
||||
logArrays["screenshot.png"] = screenshot;
|
||||
resolve();
|
||||
}, ex => {
|
||||
Cu.reportError("Unable to get screenshot dump: " + ex);
|
||||
resolve();
|
||||
});
|
||||
} catch (ex) {
|
||||
Cu.reportError("Unable to get screenshot dump: " + ex);
|
||||
}
|
||||
});
|
||||
readPromises.push(readScreenshotPromise);
|
||||
|
||||
for (let loc in this.LOGS_WITH_PARSERS) {
|
||||
let logArray;
|
||||
@ -343,7 +354,12 @@ let LogShake = {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return logArrays;
|
||||
|
||||
// Because the promises we depend upon can't fail this means that the
|
||||
// blocking log reads will always be honored.
|
||||
return Promise.all(readPromises).then(() => {
|
||||
return logArrays;
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
58
b2g/components/test/unit/head_logshake_gonk.js
Normal file
58
b2g/components/test/unit/head_logshake_gonk.js
Normal file
@ -0,0 +1,58 @@
|
||||
/**
|
||||
* Boostrap LogShake's tests that need gonk support.
|
||||
* This is creating a fake sdcard for LogShake tests and importing LogShake and
|
||||
* osfile
|
||||
*/
|
||||
|
||||
/* jshint moz: true */
|
||||
/* global Components, LogCapture, LogShake, ok, add_test, run_next_test, dump,
|
||||
do_get_profile, OS, volumeService, equal, XPCOMUtils */
|
||||
/* exported setup_logshake_mocks */
|
||||
|
||||
/* disable use strict warning */
|
||||
/* jshint -W097 */
|
||||
|
||||
"use strict";
|
||||
|
||||
const Cu = Components.utils;
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/osfile.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "volumeService",
|
||||
"@mozilla.org/telephony/volume-service;1",
|
||||
"nsIVolumeService");
|
||||
|
||||
let sdcard;
|
||||
|
||||
function setup_logshake_mocks() {
|
||||
do_get_profile();
|
||||
setup_fs();
|
||||
}
|
||||
|
||||
function setup_fs() {
|
||||
OS.File.makeDir("/data/local/tmp/sdcard/", {from: "/data"}).then(function() {
|
||||
setup_sdcard();
|
||||
});
|
||||
}
|
||||
|
||||
function setup_sdcard() {
|
||||
let volName = "sdcard";
|
||||
let mountPoint = "/data/local/tmp/sdcard";
|
||||
volumeService.createFakeVolume(volName, mountPoint);
|
||||
|
||||
let vol = volumeService.getVolumeByName(volName);
|
||||
ok(vol, "volume shouldn't be null");
|
||||
equal(volName, vol.name, "name");
|
||||
equal(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state");
|
||||
|
||||
ensure_sdcard();
|
||||
}
|
||||
|
||||
function ensure_sdcard() {
|
||||
sdcard = volumeService.getVolumeByName("sdcard").mountPoint;
|
||||
ok(sdcard, "Should have a valid sdcard mountpoint");
|
||||
run_next_test();
|
||||
}
|
@ -3,8 +3,9 @@
|
||||
* for Gonk-specific parts
|
||||
*/
|
||||
|
||||
/* jshint moz: true */
|
||||
/* global Components, LogCapture, LogShake, ok, add_test, run_next_test, dump */
|
||||
/* jshint moz: true, esnext: true */
|
||||
/* global Cu, LogCapture, LogShake, ok, add_test, run_next_test, dump,
|
||||
setup_logshake_mocks, OS, sdcard */
|
||||
/* exported run_test */
|
||||
|
||||
/* disable use strict warning */
|
||||
@ -12,56 +13,14 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const Cu = Components.utils;
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "volumeService",
|
||||
"@mozilla.org/telephony/volume-service;1",
|
||||
"nsIVolumeService");
|
||||
|
||||
let sdcard;
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
|
||||
function run_test() {
|
||||
Cu.import("resource://gre/modules/LogShake.jsm");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
Cu.import("resource://gre/modules/osfile.jsm");
|
||||
do_get_profile();
|
||||
debug("Starting");
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
function debug(msg) {
|
||||
var timestamp = Date.now();
|
||||
dump("LogShake: " + timestamp + ": " + msg + "\n");
|
||||
}
|
||||
|
||||
add_test(function setup_fs() {
|
||||
OS.File.makeDir("/data/local/tmp/sdcard/", {from: "/data"}).then(function() {
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function setup_sdcard() {
|
||||
let volName = "sdcard";
|
||||
let mountPoint = "/data/local/tmp/sdcard";
|
||||
volumeService.createFakeVolume(volName, mountPoint);
|
||||
|
||||
let vol = volumeService.getVolumeByName(volName);
|
||||
ok(vol, "volume shouldn't be null");
|
||||
equal(volName, vol.name, "name");
|
||||
equal(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_ensure_sdcard() {
|
||||
sdcard = volumeService.getVolumeByName("sdcard").mountPoint;
|
||||
ok(sdcard, "Should have a valid sdcard mountpoint");
|
||||
run_next_test();
|
||||
});
|
||||
add_test(setup_logshake_mocks);
|
||||
|
||||
add_test(function test_logShake_captureLogs_writes() {
|
||||
// Enable LogShake
|
||||
|
@ -3,8 +3,9 @@
|
||||
* for Gonk-specific parts
|
||||
*/
|
||||
|
||||
/* jshint moz: true */
|
||||
/* global Components, LogCapture, LogShake, ok, add_test, run_next_test, dump */
|
||||
/* jshint moz: true, esnext: true */
|
||||
/* global Cc, Ci, Cu, LogCapture, LogShake, ok, add_test, run_next_test, dump,
|
||||
setup_logshake_mocks, OS, sdcard, FileUtils */
|
||||
/* exported run_test */
|
||||
|
||||
/* disable use strict warning */
|
||||
@ -12,57 +13,15 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const Cu = Components.utils;
|
||||
const Ci = Components.interfaces;
|
||||
const Cc = Components.classes;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "volumeService",
|
||||
"@mozilla.org/telephony/volume-service;1",
|
||||
"nsIVolumeService");
|
||||
|
||||
let sdcard;
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||
|
||||
function run_test() {
|
||||
Cu.import("resource://gre/modules/LogShake.jsm");
|
||||
Cu.import("resource://gre/modules/Promise.jsm");
|
||||
Cu.import("resource://gre/modules/osfile.jsm");
|
||||
Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||
do_get_profile();
|
||||
debug("Starting");
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
function debug(msg) {
|
||||
var timestamp = Date.now();
|
||||
dump("LogShake: " + timestamp + ": " + msg + "\n");
|
||||
}
|
||||
|
||||
add_test(function setup_fs() {
|
||||
OS.File.makeDir("/data/local/tmp/sdcard/", {from: "/data"}).then(function() {
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function setup_sdcard() {
|
||||
let volName = "sdcard";
|
||||
let mountPoint = "/data/local/tmp/sdcard";
|
||||
volumeService.createFakeVolume(volName, mountPoint);
|
||||
|
||||
let vol = volumeService.getVolumeByName(volName);
|
||||
ok(vol, "volume shouldn't be null");
|
||||
equal(volName, vol.name, "name");
|
||||
equal(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_ensure_sdcard() {
|
||||
sdcard = volumeService.getVolumeByName("sdcard").mountPoint;
|
||||
ok(sdcard, "Should have a valid sdcard mountpoint");
|
||||
run_next_test();
|
||||
});
|
||||
add_test(setup_logshake_mocks);
|
||||
|
||||
add_test(function test_logShake_captureLogs_writes_zip() {
|
||||
// Enable LogShake
|
||||
|
65
b2g/components/test/unit/test_logshake_readLog_gonk.js
Normal file
65
b2g/components/test/unit/test_logshake_readLog_gonk.js
Normal file
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Test the log capturing capabilities of LogShake.jsm under conditions that
|
||||
* could cause races
|
||||
*/
|
||||
|
||||
/* jshint moz: true, esnext: true */
|
||||
/* global Cu, LogCapture, LogShake, ok, add_test, run_next_test, dump,
|
||||
XPCOMUtils, do_get_profile, OS, volumeService, Promise, equal,
|
||||
setup_logshake_mocks */
|
||||
/* exported run_test */
|
||||
|
||||
/* disable use strict warning */
|
||||
/* jshint -W097 */
|
||||
|
||||
"use strict";
|
||||
|
||||
function run_test() {
|
||||
Cu.import("resource://gre/modules/LogShake.jsm");
|
||||
run_next_test();
|
||||
}
|
||||
|
||||
add_test(setup_logshake_mocks);
|
||||
|
||||
add_test(function test_logShake_captureLogs_waits_to_read() {
|
||||
// Enable LogShake
|
||||
LogShake.init();
|
||||
|
||||
// Save no logs synchronously (except properties)
|
||||
LogShake.LOGS_WITH_PARSERS = {};
|
||||
|
||||
LogShake.captureLogs().then(logResults => {
|
||||
LogShake.uninit();
|
||||
|
||||
ok(logResults.logFilenames.length > 0, "Should have filenames");
|
||||
ok(logResults.logPaths.length > 0, "Should have paths");
|
||||
ok(!logResults.compressed, "Should not be compressed");
|
||||
|
||||
// This assumes that the about:memory reading will only fail under abnormal
|
||||
// circumstances. It does not check for screenshot.png because
|
||||
// systemAppFrame is unavailable during xpcshell tests.
|
||||
let hasAboutMemory = false;
|
||||
|
||||
logResults.logFilenames.forEach(filename => {
|
||||
// Because the about:memory log's filename has the PID in it we can not
|
||||
// use simple equality but instead search for the "about_memory" part of
|
||||
// the filename which will look like logshake-about_memory-{PID}.json.gz
|
||||
if (filename.indexOf("about_memory") < 0) {
|
||||
return;
|
||||
}
|
||||
hasAboutMemory = true;
|
||||
});
|
||||
|
||||
ok(hasAboutMemory,
|
||||
"LogShake's asynchronous read of about:memory should have succeeded.");
|
||||
|
||||
run_next_test();
|
||||
},
|
||||
error => {
|
||||
LogShake.uninit();
|
||||
|
||||
ok(false, "Should not have received error: " + error);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
});
|
@ -26,10 +26,17 @@ skip-if = toolkit != "gonk"
|
||||
[test_logshake.js]
|
||||
|
||||
[test_logshake_gonk.js]
|
||||
head = head_logshake_gonk.js
|
||||
# only run on b2g builds due to requiring b2g-specific log files to exist
|
||||
skip-if = (toolkit != "gonk")
|
||||
|
||||
[test_logshake_gonk_compression.js]
|
||||
head = head_logshake_gonk.js
|
||||
# only run on b2g builds due to requiring b2g-specific log files to exist
|
||||
skip-if = (toolkit != "gonk")
|
||||
|
||||
[test_logshake_readLog_gonk.js]
|
||||
head = head_logshake_gonk.js
|
||||
# only run on b2g builds due to requiring b2g-specific log files to exist
|
||||
skip-if = (toolkit != "gonk")
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -19,7 +19,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="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
@ -12,10 +12,10 @@
|
||||
<!--original fetch url was https://git.mozilla.org/releases-->
|
||||
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
|
||||
<!-- B2G specific things. -->
|
||||
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
|
||||
<project name="platform_build" path="build" remote="b2g" revision="05a36844c1046a1eb07d5b1325f85ed741f961ea">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>
|
||||
|
@ -19,7 +19,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="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "497fe3f938722b0aa49c93f975fad5d9ed3b0a82",
|
||||
"git_revision": "7f387f859d48f9ad0761637c78447dc524747738",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "b2e6b90f11fb8afc18070552e9af75682615b2ac",
|
||||
"revision": "16423131f4a9b03659d92e8ffad7a6f80a8eae37",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -12,10 +12,10 @@
|
||||
<!--original fetch url was https://git.mozilla.org/releases-->
|
||||
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
|
||||
<!-- B2G specific things. -->
|
||||
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
|
||||
<project name="platform_build" path="build" remote="b2g" revision="05a36844c1046a1eb07d5b1325f85ed741f961ea">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="497fe3f938722b0aa49c93f975fad5d9ed3b0a82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7f387f859d48f9ad0761637c78447dc524747738"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="735805df70bc64af1e5b709133afb76499a92ee1"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>
|
||||
|
@ -143,7 +143,9 @@ def main(platform):
|
||||
add_file_to_zip(zip, os.path.join(srcdir, "icon64.png"), "icon64.png")
|
||||
|
||||
# Ship b2g-desktop, but prevent its gaia profile to be shipped in the xpi
|
||||
add_dir_to_zip(zip, os.path.join(distdir, "b2g"), "b2g", ("gaia", "B2G.app/Contents/MacOS/gaia"))
|
||||
add_dir_to_zip(zip, os.path.join(distdir, "b2g"), "b2g",
|
||||
("gaia", "B2G.app/Contents/MacOS/gaia",
|
||||
"B2G.app/Contents/Resources/gaia"))
|
||||
# Then ship our own gaia profile
|
||||
add_dir_to_zip(zip, os.path.join(gaia_path, "profile"), "profile")
|
||||
|
||||
@ -154,4 +156,3 @@ if __name__ == '__main__':
|
||||
""".format(sys.argv[0]))
|
||||
sys.exit(1)
|
||||
main(*sys.argv[1:])
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace dom {
|
||||
class SpeakerManagerService;
|
||||
#endif
|
||||
|
||||
#define NUMBER_OF_AUDIO_CHANNELS (uint32_t)AudioChannel::Publicnotification + 1
|
||||
#define NUMBER_OF_AUDIO_CHANNELS (uint32_t)AudioChannel::EndGuard_
|
||||
|
||||
class AudioChannelService final : public nsIAudioChannelService
|
||||
, public nsIObserver
|
||||
|
@ -3095,7 +3095,11 @@ void HTMLMediaElement::SetupSrcMediaStreamPlayback(DOMMediaStream* aStream)
|
||||
GetSrcMediaStream()->AddAudioOutput(this);
|
||||
SetVolumeInternal();
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
bool bUseOverlayImage = mSrcStream->AsDOMHwMediaStream() != nullptr;
|
||||
#else
|
||||
bool bUseOverlayImage = false;
|
||||
#endif
|
||||
VideoFrameContainer* container;
|
||||
|
||||
if (bUseOverlayImage) {
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "TabChild.h"
|
||||
|
||||
#include "AudioChannelService.h"
|
||||
#include "gfxPrefs.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "mozilla/a11y/DocAccessibleChild.h"
|
||||
@ -573,7 +572,6 @@ TabChild::TabChild(nsIContentChild* aManager,
|
||||
, mDefaultScale(0)
|
||||
, mIPCOpen(true)
|
||||
, mParentIsActive(false)
|
||||
, mAudioChannelActive(false)
|
||||
{
|
||||
// In the general case having the TabParent tell us if APZ is enabled or not
|
||||
// doesn't really work because the TabParent itself may not have a reference
|
||||
@ -603,6 +601,10 @@ TabChild::TabChild(nsIContentChild* aManager,
|
||||
observerService->AddObserver(this, topic.get(), false);
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32_t idx = 0; idx < NUMBER_OF_AUDIO_CHANNELS; idx++) {
|
||||
mAudioChannelsActive.AppendElement(false);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -670,8 +672,8 @@ TabChild::Observe(nsISupports *aSubject,
|
||||
|
||||
nsAutoString activeStr(aData);
|
||||
bool active = activeStr.EqualsLiteral("active");
|
||||
if (active != mAudioChannelActive) {
|
||||
mAudioChannelActive = active;
|
||||
if (active != mAudioChannelsActive[audioChannel]) {
|
||||
mAudioChannelsActive[audioChannel] = active;
|
||||
unused << SendAudioChannelActivityNotification(audioChannel, active);
|
||||
}
|
||||
}
|
||||
@ -711,7 +713,7 @@ TabChild::Init()
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellItem(do_QueryInterface(WebNavigation()));
|
||||
docShellItem->SetItemType(nsIDocShellTreeItem::typeContentWrapper);
|
||||
|
||||
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(WebNavigation());
|
||||
if (!baseWindow) {
|
||||
NS_ERROR("mWebNav doesn't QI to nsIBaseWindow");
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "mozilla/layers/CompositorTypes.h"
|
||||
#include "nsIWebBrowserChrome3.h"
|
||||
#include "mozilla/dom/ipc/IdType.h"
|
||||
#include "AudioChannelService.h"
|
||||
#include "PuppetWidget.h"
|
||||
|
||||
class nsICachedFileDescriptorListener;
|
||||
@ -241,7 +242,7 @@ public:
|
||||
static already_AddRefed<TabChild> FindTabChild(const TabId& aTabId);
|
||||
|
||||
public:
|
||||
/**
|
||||
/**
|
||||
* This is expected to be called off the critical path to content
|
||||
* startup. This is an opportunity to load things that are slow
|
||||
* on the critical path.
|
||||
@ -641,10 +642,11 @@ private:
|
||||
double mDefaultScale;
|
||||
bool mIPCOpen;
|
||||
bool mParentIsActive;
|
||||
bool mAudioChannelActive;
|
||||
bool mAsyncPanZoomEnabled;
|
||||
CSSSize mUnscaledInnerSize;
|
||||
|
||||
nsAutoTArray<bool, NUMBER_OF_AUDIO_CHANNELS> mAudioChannelsActive;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user