]> git.parisson.com Git - pdf.js.git/commitdiff
Don't stop executeIRQueue if there is no continueCallback. What a wonderful world...
authorJulian Viereck <julian.viereck@gmail.com>
Fri, 16 Sep 2011 07:22:20 +0000 (00:22 -0700)
committerJulian Viereck <julian.viereck@gmail.com>
Fri, 16 Sep 2011 07:22:20 +0000 (00:22 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 0d74598edf887abd98d5c5d529e99883a6c29fa0..c9a23bc80806279833ba8b4c3ef0c24cda7fd1df 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4922,10 +4922,13 @@ var CanvasGraphics = (function() {
         } 
         // If the execution took longer then a certain amount of time, shedule
         // to continue exeution after a short delay.
-        else if ((Date.now() - startTime) > kExecutionTime) {
+        // However, this is only possible if a 'continueCallback' is passed in.
+        else if (continueCallback && 
+                (Date.now() - startTime) > kExecutionTime) {
           setTimeout(continueCallback, 0);
           return i;
-        }
+        }          
+
         // If the IRQueue isn't executed completly yet OR the execution time
         // was short enough, do another execution round.
       } while (true);