]> git.parisson.com Git - pdf.js.git/commitdiff
get shavian-load test working
authorChris Jones <jones.chris.g@gmail.com>
Tue, 5 Jul 2011 22:46:08 +0000 (18:46 -0400)
committerChris Jones <jones.chris.g@gmail.com>
Tue, 5 Jul 2011 22:46:08 +0000 (18:46 -0400)
crypto.js
pdf.js

index e888d021266c11bfdb52814f09f6e4f544cf4a81..d73408ad6c6e3e780128841337c1d11c4f8801a9 100644 (file)
--- a/crypto.js
+++ b/crypto.js
@@ -139,9 +139,9 @@ var CipherTransform = (function() {
     },
     decryptString: function(s) {
       var cipher = new this.stringCipherConstructor();
-      var data = string2bytes(s);
+      var data = stringToBytes(s);
       data = cipher.encryptBlock(data);
-      return bytes2string(data);
+      return bytesToString(data);
     }
   };
   return constructor;
diff --git a/pdf.js b/pdf.js
index f7a3359de8a9b76c95bb92d47ba46ee7c4de1fc8..a9f0ee935bb137c42ca2f6a8c62cb99c3e766dd2 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -3566,6 +3566,7 @@ var CanvasGraphics = (function() {
         },
 
         execute: function(code, xref, resources) {
+            resources = xref.fetchIfRef(resources) || new Dict();
             var savedXref = this.xref, savedRes = this.res, savedXobjs = this.xobjs;
             this.xref = xref;
             this.res = resources || new Dict();