Closed
Bug 1205221
Opened 9 years ago
Closed 9 years ago
chrome.tabs.onUpdate event doesn't be sent when updating tab's attribute
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox45 fixed)
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
Details
(Whiteboard: [tabs])
Attachments
(1 file, 2 obsolete files)
Found this when writing a test for tabs.onUpdate event.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → echen
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8663481 -
Attachment is obsolete: true
Updated•9 years ago
|
Whiteboard: [tabs]
Edgar, how is this going? Do you want to ask for review?
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #3) > Edgar, how is this going? Do you want to ask for review? Hi Bill, I was working on other issues these days. Patch is almost ready, but I would like to write some more tests. I will provide a formal patch for review early next week. Thank you.
Assignee | ||
Comment 5•9 years ago
|
||
Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed.
Assignee | ||
Updated•9 years ago
|
Attachment #8664796 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8675528 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8675528 [details] MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed.
Comment on attachment 8675528 [details] MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm https://reviewboard.mozilla.org/r/22385/#review20215 Thanks. Could you please rebase over bug 1197422? That added a WindowListManager.browserWindows generator that I think would help you. ::: browser/components/extensions/ext-tabs.js:122 (Diff revision 1) > - WindowListManager.addOpenListener(windowListener, false); > + WindowListManager.addOpenListener(windowListener); I don't really understand how or why you're changing the fireOnExisting parameter. Could you please explain that more?
Attachment #8675528 -
Flags: review?(wmccloskey)
Assignee | ||
Comment 8•9 years ago
|
||
https://reviewboard.mozilla.org/r/22385/#review20263 ::: browser/components/extensions/ext-tabs.js:122 (Diff revision 1) > - WindowListManager.addOpenListener(windowListener, false); > + WindowListManager.addOpenListener(windowListener); I change the behavior of `WindowListManager.addOpenListener()` a bit. `WindowListManager.addOpenListener()` now won't call listener immediately with existing window any more (I also remove the `fireOnExisting` parameter). After review the caller of `WindowListManager.addOpenListener()` again, I just realize this change affects the `window.onCreate` behavior [1]. With this change, `window.onCreate` won't be triggered by existing window. But it seems like it's the behavior we expect for `window.onCreate`, I guess. [1] https://dxr.mozilla.org/mozilla-central/source/browser/components/extensions/ext-windows.js#18
Assignee | ||
Comment 9•9 years ago
|
||
ni for comment #8. I will rebase over bug 1197422 and ask review again. Thank you.
Flags: needinfo?(wmccloskey)
Updated•9 years ago
|
Flags: blocking-webextensions-
Assignee | ||
Comment 10•9 years ago
|
||
Comment on attachment 8675528 [details] MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed.
Attachment #8675528 -
Flags: review?(wmccloskey)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(wmccloskey)
Attachment #8675528 -
Flags: review?(wmccloskey) → review+
Comment on attachment 8675528 [details] MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm https://reviewboard.mozilla.org/r/22385/#review21087 Thanks! ::: browser/components/extensions/ext-utils.js:494 (Diff revision 2) > + _openListeners: new Map(), I don't think you want this. \_openListeners is a property of WindowListManager. ::: browser/components/extensions/ext-utils.js:516 (Diff revision 2) > - if (needOpenListener) { > + // Register listener to all existing window. "Register listener on all existing windows." ::: browser/components/extensions/ext-utils.js:518 (Diff revision 2) > - this.addWindowListener(window, type, listener); > + if (type == "progress") { > + window.gBrowser.addTabsProgressListener(listener); > + } else { > + window.addEventListener(type, listener); > + } I don't think this needs to be changed. ::: browser/components/extensions/ext-utils.js:542 (Diff revision 2) > + // Unregister listener to all existing window. "Unregister listener from all existing windows." ::: browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js:11 (Diff revision 2) > + yield extension.awaitMessage("finish"); Please use awaitFinish here. ::: browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js:28 (Diff revision 2) > + browser.test.sendMessage("finish"); Please use notifyPass here. ::: browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js:50 (Diff revision 2) > + browser.test.sendMessage("finish"); notifyPass ::: browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js:73 (Diff revision 2) > + browser.test.sendMessage("finish"); Please use notifyPass here. ::: browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js:116 (Diff revision 2) > + browser.test.sendMessage("finish"); notifyPass
Assignee | ||
Comment 12•9 years ago
|
||
https://reviewboard.mozilla.org/r/22385/#review21087 > I don't think you want this. \_openListeners is a property of WindowListManager. Thanks for catching this.
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8675528 [details] MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm Review request updated; see interdiff: https://reviewboard.mozilla.org/r/22385/diff/2-3/
Attachment #8675528 -
Attachment description: MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. → MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm
Assignee | ||
Comment 14•9 years ago
|
||
browser_ext_tabs_onUpdated.js got an error during try runs [1], 62 INFO TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js | uncaught exception - NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsISpeculativeConnect.speculativeConnect] at chrome://browser/content/newtab/newTab.js:1278 Will update testcase to fix it. [1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=d83ede38fdb0&group_state=expanded
Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 8675528 [details] MozReview Request: Bug 1205221 - Fix chrome.tabs.onUpdate event doesn't be fired correctly when tab's attribute is changed. r=billm Review request updated; see interdiff: https://reviewboard.mozilla.org/r/22385/diff/3-4/
Assignee | ||
Comment 16•9 years ago
|
||
Try result: https://treeherder.mozilla.org/#/jobs?repo=try&revision=83b612d26ea6&group_state=expanded
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 17•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/e8133e4a8d6a
Keywords: checkin-needed
Comment 18•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e8133e4a8d6a
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Updated•9 years ago
|
Iteration: --- → 45.1 - Nov 16
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•