Skip to content

Commit

Permalink
Fixed regression: refresh loop on page using requests of type="object…
Browse files Browse the repository at this point in the history
…" to cache images, stylesheets and other types.
  • Loading branch information
hackademix committed Aug 18, 2018
1 parent cf84821 commit 8e1dc9e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/bg/RequestGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ var RequestGuard = (() => {
pending.headersProcessed ? "has been overridden on": "could not process",
request);

if (tabId !== -1) {
if (tabId !== -1 && type !== "object") {
debug("[WARNING] Reloading %s frame %s of tab %s.", url, frameId, tabId);
browser.tabs.executeScript(tabId, {
runAt: "document_start",
Expand Down
2 changes: 0 additions & 2 deletions src/lib/LastListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ class LastListener {
let w = (...args) => {
if (this.observed.hasListener(w._other)) {
this.observed.removeListener(w);
if (this.last !== w) return this.defaultResult;
} else if (this.installed) {
this.observed.addListener(w._other, ...this.extras);
this.last = w._other;
}
debug("Running listener", w === ww[0] ? 0 : 1, ...args);
return this.installed ? this.listener(...args)
Expand Down

0 comments on commit 8e1dc9e

Please sign in to comment.