mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Replaces all preprocessor directives with PDFJSDev calls.
This commit is contained in:
parent
bf52ff156d
commit
0576c9c6c6
32 changed files with 1145 additions and 904 deletions
|
@ -82,7 +82,8 @@ var WorkerTask = (function WorkerTaskClosure() {
|
|||
return WorkerTask;
|
||||
})();
|
||||
|
||||
//#if !PRODUCTION
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
|
||||
/*jshint -W082 */
|
||||
/**
|
||||
* Interface that represents PDF data transport. If possible, it allows
|
||||
* progressively load entire or fragment of the PDF binary data.
|
||||
|
@ -210,7 +211,7 @@ IPDFStreamRangeReader.prototype = {
|
|||
*/
|
||||
onProgress: null,
|
||||
};
|
||||
//#endif
|
||||
}
|
||||
|
||||
/** @implements {IPDFStream} */
|
||||
var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
|
@ -952,8 +953,8 @@ var WorkerMessageHandler = {
|
|||
};
|
||||
|
||||
function initializeWorker() {
|
||||
//#if !MOZCENTRAL
|
||||
if (!('console' in globalScope)) {
|
||||
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) &&
|
||||
!('console' in globalScope)) {
|
||||
var consoleTimer = {};
|
||||
|
||||
var workerConsole = {
|
||||
|
@ -991,7 +992,6 @@ function initializeWorker() {
|
|||
|
||||
globalScope.console = workerConsole;
|
||||
}
|
||||
//#endif
|
||||
|
||||
var handler = new MessageHandler('worker', 'main', self);
|
||||
WorkerMessageHandler.setup(handler, self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue