diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-26 21:20:25 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-26 21:20:25 -0800 |
commit | 096dd0e0553f13e73fbeb43951a33768aa2d6011 (patch) | |
tree | ef04826495866228d531641060421d459cc8d607 /src/library_browser.js | |
parent | 20a61453850c87968c1683c80ee63281028118d7 (diff) |
move some assertions behind ASSERT
Diffstat (limited to 'src/library_browser.js')
-rw-r--r-- | src/library_browser.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library_browser.js b/src/library_browser.js index 0bc6d130..d16fbc0b 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -98,7 +98,9 @@ mergeInto(LibraryManager.library, { b = bb.getBlob(); } var url = Browser.URLObject.createObjectURL(b); +#if ASSERTIONS assert(typeof url == 'string', 'createObjectURL must return a url as a string'); +#endif var img = new Image(); img.onload = function() { assert(img.complete, 'Image ' + name + ' could not be decoded'); @@ -144,7 +146,9 @@ mergeInto(LibraryManager.library, { return fail(); } var url = Browser.URLObject.createObjectURL(b); // XXX we never revoke this! +#if ASSERTIONS assert(typeof url == 'string', 'createObjectURL must return a url as a string'); +#endif var audio = new Audio(); audio.addEventListener('canplaythrough', function() { finish(audio) }, false); // use addEventListener due to chromium bug 124926 audio.onerror = function(event) { |