The meaning of the current window in a WebExtension is a bit complex: https://developer.chrome.com/extensions/windows#current-window
Created attachment 8657912 [details] [diff] [review] patch We had some support for "current window", but it was totally broken. This patch fixes it. The current window is tracked for "tab" and "popup" views. For "background" views, it's just whichever window happens to be frontmost. I also fixed a few places where we iterate over all open windows but don't check that |window.document.readyState == "complete"|, which is necessary to avoid cases where gBrowser doesn't exist yet or something.
Attachment #8657912 - Flags: review?(gkrizsanits)
Attachment #8657912 - Flags: review?(gkrizsanits) → review+
Backed out the whole push in https://hg.mozilla.org/integration/mozilla-inbound/rev/f2e83a8b6b8e since it was intertangled and I wasn't entirely sure which part caused Mulet mochitest-5 to become permaorange with https://treeherder.mozilla.org/logviewer.html#?job_id=14545777&repo=mozilla-inbound
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.