From 50201f89c3b675f93b69f3fce2e52f55daab4a94 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Wed, 18 Nov 2015 10:52:35 +1300 Subject: [PATCH] bug 1225003 test no crashes in decodeAudioData() and offline context memory reporting r=erahm --HG-- extra : rebase_source : d7c0389512088d5b308a7f0ad9f667e36aaad3f2 --- .../webaudio/test/test_WebAudioMemoryReporting.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dom/media/webaudio/test/test_WebAudioMemoryReporting.html b/dom/media/webaudio/test/test_WebAudioMemoryReporting.html index 60db95ccf47e..c753756e79fb 100644 --- a/dom/media/webaudio/test/test_WebAudioMemoryReporting.html +++ b/dom/media/webaudio/test/test_WebAudioMemoryReporting.html @@ -13,10 +13,14 @@ var ac = new AudioContext(); var sp = ac.createScriptProcessor(4096, 1, 1); sp.connect(ac.destination); +// Not started so as to test +// https://bugzilla.mozilla.org/show_bug.cgi?id=1225003#c2 +var oac = new OfflineAudioContext(1, 1, 48000); + var nodeTypes = ["ScriptProcessorNode", "AudioDestinationNode"]; var objectTypes = ["dom-nodes", "engine-objects", "stream-objects"]; -var usages = {}; +var usages = { "explicit/webaudio/audiocontext": 0 }; for (var i = 0; i < nodeTypes.length; ++i) { for (var j = 0; j < objectTypes.length; ++j) { @@ -43,5 +47,8 @@ SpecialPowers.Cc["@mozilla.org/memory-reporter-manager;1"]. getService(SpecialPowers.Ci.nsIMemoryReporterManager). getReports(handleReport, null, finished, null, /* anonymized = */ false); +// To test bug 1225003, run a failing decodeAudioData() job over a time when +// the tasks from getReports() are expected to run. +ac.decodeAudioData(new ArrayBuffer(4), function(){}, function(){});