[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 df5c4bffa70cce25c6ae66cf362c4b4c4b1853d0
Author: Arthur Edelstein <arthuredelstein@xxxxxxxxx>
Date: Thu May 7 12:59:04 2015 -0700
fixup! Bug #15502. Isolate blob URLs to first party; no blobURLs in Web Workers
---
browser/extensions/pdfjs/content/PdfStreamConverter.jsm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
index 4e7a795..aa7d6df 100644
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -248,6 +248,12 @@ ChromeActions.prototype = {
filename = 'document.pdf';
}
var blobUri = data.blobUrl ? NetUtil.newURI(data.blobUrl) : originalUri;
+ var netChannel;
+ try {
+ netChannel = NetUtil.newChannel(blobUri);
+ } catch (e) {
+ netChannel = NetUtil.newChannel(originalUri);
+ }
var extHelperAppSvc =
Cc['@mozilla.org/uriloader/external-helper-app-service;1'].
getService(Ci.nsIExternalHelperAppService);
@@ -255,7 +261,6 @@ ChromeActions.prototype = {
getService(Ci.nsIWindowWatcher).activeWindow;
var docIsPrivate = this.isInPrivateBrowsing();
- var netChannel = NetUtil.newChannel(blobUri);
if ('nsIPrivateBrowsingChannel' in Ci &&
netChannel instanceof Ci.nsIPrivateBrowsingChannel) {
netChannel.setPrivate(docIsPrivate);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits