[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-31.6.0esr-4.5-1] fixup! Bug #15502. Isolate blob URLs to first party; no blobURLs in Web Workers



commit 15bf754badd65bccc1ea898324392a4d34a8e97e
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
Date:   Fri May 1 14:49:58 2015 -0700

    fixup! Bug #15502. Isolate blob URLs to first party; no blobURLs in Web Workers
---
 browser/extensions/pdfjs/content/build/pdf.worker.js |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/browser/extensions/pdfjs/content/build/pdf.worker.js b/browser/extensions/pdfjs/content/build/pdf.worker.js
index a8779ab..805cc66 100644
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -1048,7 +1048,14 @@ PDFJS.createObjectURL = (function createObjectURLClosure() {
     if (!PDFJS.disableCreateObjectURL &&
         typeof URL !== 'undefined' && URL.createObjectURL) {
       var blob = PDFJS.createBlob(data, contentType);
-      return URL.createObjectURL(blob);
+      try {
+        return URL.createObjectURL(blob);
+      } catch(e) {
+        // URL.createObjectURL has thrown an error; continue to
+        // data schema fallback.
+        // TODO: Remove this try-catch when we re-enable
+        // createObjectURL in workers.
+      }
     }
 
     var buffer = 'data:' + contentType + ';base64,';



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits