[tbb-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
mikeperry at torproject.org
mikeperry at torproject.org
Thu May 7 23:26:13 UTC 2015
commit df5c4bffa70cce25c6ae66cf362c4b4c4b1853d0
Author: Arthur Edelstein <arthuredelstein at gmail.com>
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);
More information about the tbb-commits
mailing list