Closed
Bug 899286
Opened 11 years ago
Closed 11 years ago
Intermittent browser_tabsettings.js | uncaught exception - TypeError: this.close is not a function at chrome://global/content/bindings/findbar.xml:1827 and more
Categories
(Toolkit :: Add-ons Manager, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
Tracking | Status | |
---|---|---|
firefox24 | --- | unaffected |
firefox25 | --- | fixed |
firefox26 | --- | fixed |
People
(Reporter: RyanVM, Assigned: mikedeboer)
References
Details
(Keywords: intermittent-failure)
Attachments
(1 file, 2 obsolete files)
2.88 KB,
patch
|
dao
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
More findbar.xml flakiness since the recent rewrite. Mike, can you please look into these failures?
https://tbpl.mozilla.org/php/getParsedLog.php?id=25827031&tree=Mozilla-Central
Ubuntu VM 12.04 x64 mozilla-central opt test mochitest-browser-chrome on 2013-07-27 20:17:47 PDT for push 015135250e06
slave: tst-linux64-ec2-135
20:54:09 INFO - TEST-START | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js
20:54:09 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Should have an add-ons manager window
20:54:09 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Should be displaying the correct UI
20:54:09 INFO - TEST-INFO | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | must wait for load
20:54:10 INFO - TEST-INFO | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Running test 1
20:54:10 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Options should be inline type
20:54:10 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Element should not be null, when checking visibility
20:54:10 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Preferences button should be visible
20:54:10 WARNING - TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | uncaught exception - TypeError: this.close is not a function at chrome://global/content/bindings/findbar.xml:1827
20:54:10 INFO - Stack trace:
20:54:10 INFO - JS frame :: chrome://mochikit/content/tests/SimpleTest/SimpleTest.js :: simpletestOnerror :: line 1136
20:54:10 INFO - native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
20:54:10 INFO - TEST-INFO | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Console message: [JavaScript Error: "TypeError: this.close is not a function" {file: "chrome://global/content/bindings/findbar.xml" line: 1827}]
20:54:10 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | New tab should have loaded the options URL
20:54:10 INFO - TEST-INFO | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Test 1 took 296ms
20:54:10 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Should have an add-ons manager window to close
20:54:10 INFO - TEST-PASS | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | Should be closing window with correct URI
20:54:10 INFO - INFO TEST-END | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/browser/browser_tabsettings.js | finished in 877ms
Flags: needinfo?(mdeboer)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mdeboer
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•11 years ago
|
||
When working on a Try push - https://tbpl.mozilla.org/?tree=Try&rev=321ae7095374 - I noticed that mochitest-bc was perma-oranging on the findbar. This is 'browser/base/content/test/browser_zbug569342.js', a completely different test than the one above, but because of its predictability I was able to reproduce it locally on my Ubuntu box.
The cause is that there are many timers running inside the findbar of 500ms and more. When the findbar is destroyed, the binding methods are not available anymore that long after, when the timers finish.
Assignee | ||
Comment 3•11 years ago
|
||
Relevant try run: https://tbpl.mozilla.org/?tree=Try&rev=85f0cb385a11
This resolves most, if not all, findbar intermittent oranges. Timers were running and callback were evaluated well after the findbar was destroyed, causing syntax errors. The usual timeout length is 500ms and interval length is 5000ms(!).
Attachment #786827 -
Flags: review?(ttaubert)
Comment 4•11 years ago
|
||
Comment on attachment 786827 [details] [diff] [review]
Patch v1: clear timers on findbar close and destroy
Review of attachment 786827 [details] [diff] [review]:
-----------------------------------------------------------------
I don't think think I'm familiar enough with the findbar to review it but I'll give you some feedback anyway :)
::: toolkit/content/widgets/findbar.xml
@@ +430,5 @@
> this._observer);
> +
> + // Clear all timers that might still be running.
> + if (this._flashFindBarTimeout)
> + clearInterval(this._flashFindBarTimeout);
Shouldn't we also clear all timers when clear() is called?
@@ +436,5 @@
> + clearTimeout(this._highlightTimeout);
> + if (this._findResetTimeout)
> + clearTimeout(this._findResetTimeout);
> + if (this._findResetTimeout)
> + clearTimeout(this._findResetTimeout);
You're checking _findResetTimeout twice.
@@ +1202,5 @@
> }
> + if (this._flashFindBarTimeout) {
> + clearInterval(this._flashFindBarTimeout);
> + this._flashFindBarTimeout = null;
> + }
The whole _flash() method seems a little weird to me. Can't we just set an attribute and make it flash via a CSS animation? That would be one timer to less to care about.
@@ +1765,5 @@
> this.open(aMode);
>
> if (this._flashFindBar) {
> this._flashFindBarTimeout =
> + setInterval(function() { this._flash(); }.bind(this), 500);
setInterval(() => this._flash(), 500);
Attachment #786827 -
Flags: review?(ttaubert)
Assignee | ||
Comment 5•11 years ago
|
||
Updated patch with Tim's comments addressed. Thanks Tim!
Attachment #786827 -
Attachment is obsolete: true
Attachment #787414 -
Flags: review?(dao)
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment 7•11 years ago
|
||
Comment on attachment 787414 [details] [diff] [review]
Patch v2: clear timers on findbar clear, close and destroy
>+ <method name="_clearTimers">
s/clear/cancel/ ?
>+ if (this._flashFindBarTimeout) {
>+ clearInterval(this._flashFindBarTimeout);
>+ this._flashFindBarTimeout = null;
>+ }
>+ if (this._quickFindTimeout) {
>+ clearTimeout(this._quickFindTimeout);
>+ this._quickFindTimeout = null;
>+ }
>+ if (this._highlightTimeout)
>+ clearTimeout(this._highlightTimeout);
>+ if (this._findResetTimeout)
>+ clearTimeout(this._findResetTimeout);
Why are you setting only some properties to null?
> <method name="clear">
> <body><![CDATA[
> this.browser.fastFind.collapseSelection();
> this._findField.reset();
> this.toggleHighlight(false);
> this._updateStatusUI();
> this._enableFindButtons(false);
> this._setFoundLink(null);
>+ this._clearTimers();
> this._foundEditable = null;
> this._currentWindow = null;
> ]]></body>
> </method>
Why should timers be cancelled here?
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #7)
> Comment on attachment 787414 [details] [diff] [review]
> Patch v2: clear timers on findbar clear, close and destroy
>
> >+ <method name="_clearTimers">
>
> s/clear/cancel/ ?
Sure, I'll rename that!
> Why are you setting only some properties to null?
Because relevant parts of the findbar code rely on this for these properties. I can set them all to null, is that preferred?
> Why should timers be cancelled here?
Tim asked about this in comment 4, I put it there because I think it wouldn't hurt. But now that I thought about it some more I deem this unnecessary. I'll remove it in the next iteration.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(dao)
Comment 9•11 years ago
|
||
(In reply to Mike de Boer [:mikedeboer] from comment #8)
> Because relevant parts of the findbar code rely on this for these
> properties. I can set them all to null, is that preferred?
I think that would be cleaner.
Flags: needinfo?(dao)
Assignee | ||
Comment 10•11 years ago
|
||
Attachment #787414 -
Attachment is obsolete: true
Attachment #787414 -
Flags: review?(dao)
Attachment #795526 -
Flags: review?(dao)
Comment 11•11 years ago
|
||
Comment on attachment 795526 [details] [diff] [review]
Patch v3: clear timers on findbar close and destroy
>+ <method name="_cancelTimers">
>+ <body><![CDATA[
>+ if (this._flashFindBarTimeout) {
>+ clearInterval(this._flashFindBarTimeout);
>+ this._flashFindBarTimeout = null;
>+ }
>+ if (this._quickFindTimeout) {
>+ clearTimeout(this._quickFindTimeout);
>+ this._quickFindTimeout = null;
>+ }
>+ if (this._highlightTimeout) {
>+ clearTimeout(this._highlightTimeout);
>+ this._highlightTimeout = null;
>+ }
>+ if (this._findResetTimeout) {
>+ clearTimeout(this._findResetTimeout);
>+ this._findResetTimeout = null;
>+ }
>+ ]]></body>
>+ </method>
</method> is indented too far.
Attachment #795526 -
Flags: review?(dao) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Reporter | ||
Comment 13•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Reporter | ||
Comment 14•11 years ago
|
||
If I understand correctly, this affects Fx25, but not 24, correct? If so, please request Aurora uplift on this patch.
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 795526 [details] [diff] [review]
Patch v3: clear timers on findbar close and destroy
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 776708
User impact if declined: mochitest-bc intermittent failures, no known user impact
Testing completed (on m-c, etc.): 2 days on m-c
Risk to taking this patch (and alternatives if risky): low
String or IDL/UUID changes made by this patch: none
Attachment #795526 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Attachment #795526 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Reporter | ||
Comment 18•11 years ago
|
||
Comment 19•11 years ago
|
||
seems its back
https://bugzilla.mozilla.org/show_bug.cgi?id=899286
Comment 20•11 years ago
|
||
Comment hidden (Legacy TBPL/Treeherder Robot) |
Comment 22•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•