1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Address review comments. Use only one PDFJS.workerSrc variable to specify the worker source

This commit is contained in:
Julian Viereck 2011-11-01 19:32:20 +01:00
parent 1e6d1f9922
commit 3b7829d057
9 changed files with 63 additions and 51 deletions

View file

@ -47,6 +47,13 @@ var WorkerProcessorHandler = {
setup: function(handler) {
var pdfDoc = null;
handler.on('workerSrc', function(data) {
// In development, the `workerSrc` message is handled in the
// `worker_loader.js` file. In production the workerProcessHandler is
// called for this. This servers as a dummy to prevent calling an
// undefined action `workerSrc`.
});
handler.on('doc', function(data) {
// Create only the model of the PDFDoc, which is enough for
// processing the content of the pdf.
@ -174,7 +181,7 @@ var workerConsole = {
// Worker thread?
if (typeof window === 'undefined') {
this.console = workerConsole;
globalScope.console = workerConsole;
var handler = new MessageHandler('worker_processor', this);
WorkerProcessorHandler.setup(handler);