Use services where possible.
This commit is contained in:
parent
c7c8f1cafa
commit
4994faa3c1
@ -17,8 +17,7 @@ Cu.import('resource://gre/modules/Services.jsm');
|
|||||||
|
|
||||||
function log(aMsg) {
|
function log(aMsg) {
|
||||||
let msg = 'PdfStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
|
let msg = 'PdfStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
|
||||||
Cc['@mozilla.org/consoleservice;1'].getService(Ci.nsIConsoleService)
|
Services.console.logStringMessage(msg);
|
||||||
.logStringMessage(msg);
|
|
||||||
dump(msg + '\n');
|
dump(msg + '\n');
|
||||||
}
|
}
|
||||||
let application = Cc['@mozilla.org/fuel/application;1']
|
let application = Cc['@mozilla.org/fuel/application;1']
|
||||||
@ -121,8 +120,7 @@ PdfStreamConverter.prototype = {
|
|||||||
aRequest.cancel(Cr.NS_BINDING_ABORTED);
|
aRequest.cancel(Cr.NS_BINDING_ABORTED);
|
||||||
|
|
||||||
// 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 = Services.io;
|
||||||
.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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user