From b6f05fb8c6c4dc4ce6a00fba34a57bc77b8b02ed Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Mon, 6 Feb 2012 13:23:18 -0800 Subject: [PATCH] Throw exception for sync version. Don't use const. --- extensions/firefox/components/PdfStreamConverter.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/firefox/components/PdfStreamConverter.js b/extensions/firefox/components/PdfStreamConverter.js index 115db3e1f..c990e80d5 100644 --- a/extensions/firefox/components/PdfStreamConverter.js +++ b/extensions/firefox/components/PdfStreamConverter.js @@ -9,7 +9,6 @@ const Cr = Components.results; const Cu = Components.utils; const PDFJS_EVENT_ID = 'pdf.js.message'; const PDF_CONTENT_TYPE = 'application/pdf'; -const NS_ERROR_NOT_IMPLEMENTED = 0x80004001; const EXT_PREFIX = 'extensions.uriloader@pdf.js'; Cu.import('resource://gre/modules/XPCOMUtils.jsm'); @@ -94,13 +93,13 @@ PdfStreamConverter.prototype = { // nsIStreamConverter::convert convert: function(aFromStream, aFromType, aToType, aCtxt) { - return aFromStream; + throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, // nsIStreamConverter::asyncConvertData asyncConvertData: function(aFromType, aToType, aListener, aCtxt) { if (!Services.prefs.getBoolPref('extensions.pdf.js.active')) - throw NS_ERROR_NOT_IMPLEMENTED; + throw Cr.NS_ERROR_NOT_IMPLEMENTED; // Store the listener passed to us this.listener = aListener; },