Closed
Bug 751873
Opened 13 years ago
Closed 13 years ago
Permanent orange: TEST-UNEXPECTED-FAIL | test_iteratorUtils.js | TypeError: childArray is null
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
VERIFIED
FIXED
Thunderbird 15.0
People
(Reporter: standard8, Assigned: mconley)
References
Details
(Keywords: intermittent-failure, regression, Whiteboard: [perma-orange])
Attachments
(1 file, 2 obsolete files)
5.91 KB,
patch
|
mconley
:
review+
|
Details | Diff | Splinter Review |
Since the compartments landing, we've been seeing this failure:
>>>>>>>
TEST-INFO | (xpcshell/head.js) | test 1 pending
TEST-PASS | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/base/test/unit/test_iteratorUtils.js | [test_toArray_NodeList : 68] rootnode == rootnode
TEST-PASS | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/base/test/unit/test_iteratorUtils.js | [test_toArray_NodeList : 72] true == true
TEST-UNEXPECTED-FAIL | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/base/test/unit/test_iteratorUtils.js:74 | TypeError: childArray is null - See following stack:
JS frame :: test_toArray_NodeList@/buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/base/test/unit/test_iteratorUtils.js:74
JS frame :: run_test@/buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/base/test/unit/test_iteratorUtils.js:123
JS frame :: _execute_test@/buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js:326
JS frame :: @-e:1
<<<<<<<
Reporter | ||
Comment 1•13 years ago
|
||
Links to relevant code:
http://hg.mozilla.org/comm-central/annotate/9b83555adeb2/mailnews/base/util/iteratorUtils.jsm#l58
http://hg.mozilla.org/comm-central/annotate/9b83555adeb2/mailnews/base/test/unit/test_iteratorUtils.js#l74
Changing the function to return just Array.prototype.slice.call(aObj) "worked". Using items like aObj = XPCNativeWrapper.unwrap(aObj) didn't work.
Comment 2•13 years ago
|
||
As mentioned in irc, it looks like this test relies on .constructor.name for a dom object, which isn't something that can be relied on. It just happened to work for some reason before CPG.
Comment 3•13 years ago
|
||
So if NodeLists aren't nsIDOMNodeLists any more and constructor.name is out, how would you check whether something's a node list or iterator in a way that works across globals?
Comment 4•13 years ago
|
||
You could toString the constructor. You could also just duck-type it and expect it to do the right thing.
Comment 5•13 years ago
|
||
SM 2.12 has this bug too:
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1336185053.1336188629.28028.gz
WINNT 5.2 comm-central-trunk debug test xpcshell on 2012/05/04 19:30:53
{
TEST-UNEXPECTED-FAIL | e:\builds\slave\test\build\xpcshell\tests\mailnews\base\test\unit\test_iteratorUtils.js | test failed (with xpcshell return code: 0), see following log:
TEST-UNEXPECTED-FAIL | e:/builds/slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_iteratorUtils.js:74 | TypeError: childArray is null - See following stack:
}
Whiteboard: [tb-orange] → [tb-orange] [perma-orange]
Target Milestone: --- → Thunderbird 15.0
Version: 12 → Trunk
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mconley
Assignee | ||
Comment 6•13 years ago
|
||
Taking bholley's advice and checking the constructor toString. Test passes with this change.
What do you think, Sid?
Attachment #621590 -
Flags: review?(sagarwal)
Assignee | ||
Comment 7•13 years ago
|
||
Sid gave me a review over IRC. Addressing his comments in this patch, and adding tests for content iterators as requested.
Attachment #621590 -
Attachment is obsolete: true
Attachment #621590 -
Flags: review?(sagarwal)
Attachment #621658 -
Flags: review?(sagarwal)
Comment 8•13 years ago
|
||
Comment on attachment 621658 [details] [diff] [review]
Patch v2
Review of attachment 621658 [details] [diff] [review]:
-----------------------------------------------------------------
I haven't run the patch, but r+ assuming tests pass.
::: mail/test/mozmill/utils/test-iteratorUtils.js
@@ +11,5 @@
> +const RELATIVE_ROOT = '../shared-modules';
> +const MODULE_REQUIRES = ['folder-display-helpers',
> + 'content-tab-helpers',]
> +
> +var iteratorUtils = {};
At this point I think we should exclusively use let for new files.
@@ +27,5 @@
> +
> + gOriginalWhatsNew = Services.prefs.getCharPref(kWhatsNewPref);
> + Services.prefs.setCharPref(kWhatsNewPref, gCollectionsUrl);
> + gTab = open_content_tab_with_click(mc.menus.helpMenu.whatsNew,
> + gCollectionsUrl);
- Please fix the indentation.
- Can we do the open_content_tab outside setupModule?
Updated•13 years ago
|
Attachment #621658 -
Flags: review?(sagarwal) → review+
Assignee | ||
Comment 9•13 years ago
|
||
Thanks Sid! Comments addressed in this patch.
Attachment #621658 -
Attachment is obsolete: true
Attachment #621685 -
Flags: review+
Assignee | ||
Comment 10•13 years ago
|
||
comm-central: https://hg.mozilla.org/comm-central/rev/945f1b82c5ad
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 11•13 years ago
|
||
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1336469848.1336473505.24387.gz
WINNT 5.2 comm-central-trunk debug test xpcshell on 2012/05/08 02:37:28
V.Fixed
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Updated•12 years ago
|
Keywords: intermittent-failure
Updated•12 years ago
|
Whiteboard: [tb-orange] [perma-orange] → [perma-orange]
You need to log in
before you can comment on or make changes to this bug.
Description
•