Closed Bug 528145 Opened 15 years ago Closed 15 years ago

under e10s have head.js indicate which process is printing xpcshell status messages

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jduell.mcbugs, Assigned: jduell.mcbugs)

References

Details

Attachments

(1 file, 5 obsolete files)

This patch prints either "Child:" or "Parent:" before head.js status messages, when run under e10s.
Attachment #411907 - Flags: review?(jwalden+bmo)
Depends on: 521922
Comment on attachment 411907 [details] [diff] [review] prints either "Child:" or "Parent:" before head.js status messages, when run under e10s. >diff --git a/testing/xpcshell/head.js b/testing/xpcshell/head.js >+function _dump(str) { >+ if (typeof _XPCSHELL_PROCESS == "undefined") { >+ dump(str); >+ } else { >+ dump(_XPCSHELL_PROCESS + ": " + str); >+ } >+} Single-line-if bracing isn't kosher; don't brace either part of this statement. >- while (!_quit) >+ while (!_quit) { > thr.processNextEvent(true); >- >+ } Don't brace this either. I kind of feel like we should have a better name than _dump, but nothing immediately springs to mind.
Attachment #411907 - Flags: review?(jwalden+bmo) → review+
Attached patch Fixes error detection in runxpcshell (obsolete) (deleted) — Splinter Review
This version teaches runxpcshell to search for optional "parent|child :" before TEST-FAIL-UNEXPECTED. Without that, error detection is broken. > Single-line-if bracing isn't kosher I refer you to the following statement in the Mozilla Coding Style page... "Always brace controlled statements, even a single-line consequent of an if else else. This is redundant typically, but it avoids dangling else bugs, so it's safer at scale than fine-tuning." I don't actually agree with this for single-line "if"s (so I took that one out), but I have personally lost time debugging unbraced if-else, so I left that one in. I can take them out if you still object!
Attachment #411907 - Attachment is obsolete: true
Attachment #415422 - Flags: review?(jwalden+bmo)
Attached patch Fix minor bitrot (obsolete) (deleted) — Splinter Review
The latest patch to bug 521922 broke the context for last patch. Fixed.
Attachment #415422 - Attachment is obsolete: true
Attachment #415470 - Flags: review?(jwalden+bmo)
Attachment #415422 - Flags: review?(jwalden+bmo)
Comment on attachment 415470 [details] [diff] [review] Fix minor bitrot > if (truePassedChecks > 0) >- dump("TEST-PASS | (xpcshell/head.js) | " + truePassedChecks + " (+ " + >+ _dump("TEST-PASS | (xpcshell/head.js) | " + truePassedChecks + " (+ " + > _falsePassedChecks + ") check(s) passed\n"); > else > // ToDo: switch to TEST-UNEXPECTED-FAIL when all tests have been updated. (Bug 496443) >- dump("TEST-INFO | (xpcshell/head.js) | No (+ " + _falsePassedChecks + ") checks actually run\n"); >+ _dump("TEST-INFO | (xpcshell/head.js) | No (+ " + _falsePassedChecks + ") checks actually run\n"); I don't remember what this file usually has done (which is why this is only a suggestion), but my (gradually evolving) style sense says both of these are actually multi-line bodies (even the second with a comment for one line and a statement for the other), and therefore both dumps would be braced. If you don't want to change it that's fine, leaving it as is should be good enough for now.
Attachment #415470 - Flags: review?(jwalden+bmo) → review+
Attachment #415470 - Attachment is obsolete: true
This is ready to be checked into the /projects/electrolysis as soon as (or in tandem with) the patch for bug 521922.
Keywords: checkin-needed
Assignee: nobody → jduell.mcbugs
Status: NEW → ASSIGNED
Version: unspecified → Trunk
Whiteboard: [c-n: to e10s]
Attached patch Fix bitrot on approved patch: ready for commit (obsolete) (deleted) — Splinter Review
Attachment #418766 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [c-n: to e10s]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: