]> git.parisson.com Git - pdf.js.git/commitdiff
Throw exception for sync version. Don't use const.
authorBrendan Dahl <brendan.dahl@gmail.com>
Mon, 6 Feb 2012 21:23:18 +0000 (13:23 -0800)
committerBrendan Dahl <brendan.dahl@gmail.com>
Mon, 6 Feb 2012 21:23:18 +0000 (13:23 -0800)
extensions/firefox/components/PdfStreamConverter.js

index 115db3e1fbc9ac966348671636271f0cb001d3e2..c990e80d5f1dd54f3db7b81032dda1c6848182a7 100644 (file)
@@ -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;
   },