Fix lint.
This commit is contained in:
parent
178b89342a
commit
4d3057aba7
@ -23,7 +23,7 @@ function log(aMsg) {
|
|||||||
const NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
|
const NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
|
||||||
|
|
||||||
function pdfContentHandler() {
|
function pdfContentHandler() {
|
||||||
};
|
}
|
||||||
|
|
||||||
pdfContentHandler.prototype = {
|
pdfContentHandler.prototype = {
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ pdfContentHandler.prototype = {
|
|||||||
classID: Components.ID('{2278dfd0-b75c-11e0-8257-1ba3d93c9f1a}'),
|
classID: Components.ID('{2278dfd0-b75c-11e0-8257-1ba3d93c9f1a}'),
|
||||||
classDescription: 'pdf.js Component',
|
classDescription: 'pdf.js Component',
|
||||||
contractID: '@mozilla.org/streamconv;1?from=application/pdf&to=*/*',
|
contractID: '@mozilla.org/streamconv;1?from=application/pdf&to=*/*',
|
||||||
|
|
||||||
QueryInterface: XPCOMUtils.generateQI([
|
QueryInterface: XPCOMUtils.generateQI([
|
||||||
Ci.nsISupports,
|
Ci.nsISupports,
|
||||||
Ci.nsIStreamConverter,
|
Ci.nsIStreamConverter,
|
||||||
@ -50,29 +50,29 @@ pdfContentHandler.prototype = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// nsIStreamConverter::convert
|
// nsIStreamConverter::convert
|
||||||
convert: function (aFromStream, aFromType, aToType, aCtxt) {
|
convert: function(aFromStream, aFromType, aToType, aCtxt) {
|
||||||
return aFromStream;
|
return aFromStream;
|
||||||
},
|
},
|
||||||
|
|
||||||
// nsIStreamConverter::asyncConvertData
|
// nsIStreamConverter::asyncConvertData
|
||||||
asyncConvertData: function (aFromType, aToType, aListener, aCtxt) {
|
asyncConvertData: function(aFromType, aToType, aListener, aCtxt) {
|
||||||
// Store the listener passed to us
|
// Store the listener passed to us
|
||||||
this.listener = aListener;
|
this.listener = aListener;
|
||||||
},
|
},
|
||||||
|
|
||||||
// nsIStreamListener::onDataAvailable
|
// nsIStreamListener::onDataAvailable
|
||||||
onDataAvailable: function (aRequest, aContext, aInputStream, aOffset, aCount) {
|
onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, aCount) {
|
||||||
// Do nothing since all the data loading is handled by the viewer.
|
// Do nothing since all the data loading is handled by the viewer.
|
||||||
log("SANITY CHECK: onDataAvailable SHOULD NOT BE CALLED!");
|
log('SANITY CHECK: onDataAvailable SHOULD NOT BE CALLED!');
|
||||||
},
|
},
|
||||||
|
|
||||||
// nsIRequestObserver::onStartRequest
|
// nsIRequestObserver::onStartRequest
|
||||||
onStartRequest: function (aRequest, aContext) {
|
onStartRequest: function(aRequest, aContext) {
|
||||||
// Setup the request so we can use it below.
|
// Setup the request so we can use it below.
|
||||||
aRequest.QueryInterface(Ci.nsIChannel);
|
aRequest.QueryInterface(Ci.nsIChannel);
|
||||||
|
|
||||||
// Create a new channel that is viewer loaded as a resource.
|
// Create a new channel that is viewer loaded as a resource.
|
||||||
var ioService = Cc["@mozilla.org/network/io-service;1"]
|
var ioService = Cc['@mozilla.org/network/io-service;1']
|
||||||
.getService(Ci.nsIIOService);
|
.getService(Ci.nsIIOService);
|
||||||
var channel = ioService.newChannel(
|
var channel = ioService.newChannel(
|
||||||
'resource://pdf.js/web/viewer.html', null, null);
|
'resource://pdf.js/web/viewer.html', null, null);
|
||||||
@ -85,7 +85,7 @@ pdfContentHandler.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// nsIRequestObserver::onStopRequest
|
// nsIRequestObserver::onStopRequest
|
||||||
onStopRequest: function (aRequest, aContext, aStatusCode) {
|
onStopRequest: function(aRequest, aContext, aStatusCode) {
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -656,7 +656,7 @@ var PDFDoc = (function PDFDocClosure() {
|
|||||||
messageHandler.send('test', testObj);
|
messageHandler.send('test', testObj);
|
||||||
return;
|
return;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
warn('The worker has been disabled.')
|
warn('The worker has been disabled.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Either workers are disabled, not supported or have thrown an exception.
|
// Either workers are disabled, not supported or have thrown an exception.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user