Skip to content

Commit ff616c8

Browse files
committed
Merge pull request mozilla#3023 from simonster/remove-URI-check
Remove DOM window URI check
2 parents f93582a + f524eae commit ff616c8

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

extensions/firefox/components/PdfStreamConverter.js

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -765,33 +765,28 @@ PdfStreamConverter.prototype = {
765765
// We get the DOM window here instead of before the request since it
766766
// may have changed during a redirect.
767767
var domWindow = getDOMWindow(channel);
768-
// Double check the url is still the correct one.
769-
if (domWindow.document.documentURIObject.equals(aRequest.URI)) {
770-
var actions;
771-
if (rangeRequest) {
772-
// We are going to be issuing range requests, so cancel the
773-
// original request
774-
aRequest.resume();
775-
aRequest.cancel(Cr.NS_BINDING_ABORTED);
776-
actions = new RangedChromeActions(domWindow,
777-
contentDispositionFilename, aRequest);
778-
} else {
779-
actions = new StandardChromeActions(
780-
domWindow, contentDispositionFilename, dataListener);
781-
}
782-
var requestListener = new RequestListener(actions);
783-
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
784-
requestListener.receive(event);
785-
}, false, true);
786-
if (actions.supportsIntegratedFind()) {
787-
var chromeWindow = getChromeWindow(domWindow);
788-
var findEventManager = new FindEventManager(chromeWindow.gFindBar,
789-
domWindow,
790-
chromeWindow);
791-
findEventManager.bind();
792-
}
768+
var actions;
769+
if (rangeRequest) {
770+
// We are going to be issuing range requests, so cancel the
771+
// original request
772+
aRequest.resume();
773+
aRequest.cancel(Cr.NS_BINDING_ABORTED);
774+
actions = new RangedChromeActions(domWindow,
775+
contentDispositionFilename, aRequest);
793776
} else {
794-
log('Dom window url did not match request url.');
777+
actions = new StandardChromeActions(
778+
domWindow, contentDispositionFilename, dataListener);
779+
}
780+
var requestListener = new RequestListener(actions);
781+
domWindow.addEventListener(PDFJS_EVENT_ID, function(event) {
782+
requestListener.receive(event);
783+
}, false, true);
784+
if (actions.supportsIntegratedFind()) {
785+
var chromeWindow = getChromeWindow(domWindow);
786+
var findEventManager = new FindEventManager(chromeWindow.gFindBar,
787+
domWindow,
788+
chromeWindow);
789+
findEventManager.bind();
795790
}
796791
listener.onStopRequest(aRequest, context, statusCode);
797792
}

0 commit comments

Comments
 (0)