diff --git a/b2g/chrome/content/desktop.js b/b2g/chrome/content/desktop.js index b793574ff06a..e2d6c0fb195c 100644 --- a/b2g/chrome/content/desktop.js +++ b/b2g/chrome/content/desktop.js @@ -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'); }); diff --git a/b2g/components/LogCapture.jsm b/b2g/components/LogCapture.jsm index fbd87888f357..d190e041b9c4 100644 --- a/b2g/components/LogCapture.jsm +++ b/b2g/components/LogCapture.jsm @@ -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; } diff --git a/b2g/components/LogParser.jsm b/b2g/components/LogParser.jsm index 49afff0273d5..c40db97672a1 100644 --- a/b2g/components/LogParser.jsm +++ b/b2g/components/LogParser.jsm @@ -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 diff --git a/b2g/components/LogShake.jsm b/b2g/components/LogShake.jsm index def9dd8bc020..584448ed6e30 100644 --- a/b2g/components/LogShake.jsm +++ b/b2g/components/LogShake.jsm @@ -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} */ 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; + }); }, /** diff --git a/b2g/components/test/unit/head_logshake_gonk.js b/b2g/components/test/unit/head_logshake_gonk.js new file mode 100644 index 000000000000..85b3b8a1d668 --- /dev/null +++ b/b2g/components/test/unit/head_logshake_gonk.js @@ -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(); +} diff --git a/b2g/components/test/unit/test_logshake_gonk.js b/b2g/components/test/unit/test_logshake_gonk.js index deeaba0ce50b..28de0263f27c 100644 --- a/b2g/components/test/unit/test_logshake_gonk.js +++ b/b2g/components/test/unit/test_logshake_gonk.js @@ -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 diff --git a/b2g/components/test/unit/test_logshake_gonk_compression.js b/b2g/components/test/unit/test_logshake_gonk_compression.js index c46d6b6c99e4..b5af4608178f 100644 --- a/b2g/components/test/unit/test_logshake_gonk_compression.js +++ b/b2g/components/test/unit/test_logshake_gonk_compression.js @@ -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 diff --git a/b2g/components/test/unit/test_logshake_readLog_gonk.js b/b2g/components/test/unit/test_logshake_readLog_gonk.js new file mode 100644 index 000000000000..003723ad5378 --- /dev/null +++ b/b2g/components/test/unit/test_logshake_readLog_gonk.js @@ -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(); + }); +}); diff --git a/b2g/components/test/unit/xpcshell.ini b/b2g/components/test/unit/xpcshell.ini index 61a1b57dbf6d..02dfaf336a3e 100644 --- a/b2g/components/test/unit/xpcshell.ini +++ b/b2g/components/test/unit/xpcshell.ini @@ -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") diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index c3488e20e916..d6640a9cde51 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f36965d81039..d4d8657f79e0 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 5bdef60c9ed8..e52bf5d01087 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 6e05e3b90f10..6c5832c3921b 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index cd117ebf6a5c..87d1f54b4560 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index d0a08edce038..1f951847fbdd 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -12,10 +12,10 @@ - + - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 5bdef60c9ed8..e52bf5d01087 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index b497566bae0b..b35148395ccb 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 2560a0b578c3..5356567c13b2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -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" } diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index d63e334b47e0..5753c9c6c0ea 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,10 +17,10 @@ - + - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index bc3e51574f9c..cba9960b7d3d 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -12,10 +12,10 @@ - + - + @@ -23,7 +23,7 @@ - + diff --git a/b2g/simulator/build_xpi.py b/b2g/simulator/build_xpi.py index ef25fbe1f779..33bed3d95bef 100644 --- a/b2g/simulator/build_xpi.py +++ b/b2g/simulator/build_xpi.py @@ -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:]) - diff --git a/dom/audiochannel/AudioChannelService.h b/dom/audiochannel/AudioChannelService.h index 5c59c35624b6..2e7b8ab938a3 100644 --- a/dom/audiochannel/AudioChannelService.h +++ b/dom/audiochannel/AudioChannelService.h @@ -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 diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index b04f57064752..578dadcc5c4d 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -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) { diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 6b572ed65067..0590c822378e 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -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 docShellItem(do_QueryInterface(WebNavigation())); docShellItem->SetItemType(nsIDocShellTreeItem::typeContentWrapper); - + nsCOMPtr baseWindow = do_QueryInterface(WebNavigation()); if (!baseWindow) { NS_ERROR("mWebNav doesn't QI to nsIBaseWindow"); diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 91855ed294a1..fac9f8a5bb39 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -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 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 mAudioChannelsActive; + DISALLOW_EVIL_CONSTRUCTORS(TabChild); };