Closed Bug 738662 Opened 12 years ago Closed 12 years ago

Add tracing/warning information to help debug XUL overlay problems

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: Irving, Assigned: Irving)

Details

Attachments

(1 file, 2 obsolete files)

While trying to track down some overlay-related issues, I added useful details to several error and warning messages. Most of these only come out with NSPR_LOG_MODULES=nsXULDocument:4, but it's better than nothing.
"File Not Found" is so much nicer when it actually tells you *which* file...
Attachment #608765 - Flags: review?(bzbarsky)
Comment on attachment 608765 [details] [diff] [review]
Add details to various error/warning messages

Instead of hand-unrolling the NS_WARNING in PutScript, just dynamically construct the string for it, please (#ifdef DEBUG, of course).

The changes to nsExpatDriver::HandleExternalEntityRef are wrong; that function doesn't return nsresult, so returning rv is broken.

The rest looks fine, though the toolkit change should get review from someone who knows that code.
Attachment #608765 - Flags: review?(bzbarsky) → review-
Addressed bz's comments, added enndeakin to review XUL toolkit change.
Attachment #608797 - Flags: review?(enndeakin)
Attachment #608797 - Flags: review?(bzbarsky)
Comment on attachment 608797 [details] [diff] [review]
Add details to various error/warning messages, take 2

r=me
Attachment #608797 - Flags: review?(bzbarsky) → review+
Comment on attachment 608797 [details] [diff] [review]
Add details to various error/warning messages, take 2

>+            if (!toolbox) {
>+              let tbName = this.getAttribute("toolbarName");

This should be 'toolbarname' (all lowercase) or this.toolbarName

>+              throw("toolbar ID " + this.getAttribute("id") + tbname + ": toolboxid attribute '" + toolboxId + "' points to a toolbox which doesn't exist");

Use this.id and print a space between the id and the name.
Clean up toolbox.xml comments from Neil Deakin.

If toolbarName isn't null, the tbName string is built with a leading space so I don't add one in the throw().
Attachment #608765 - Attachment is obsolete: true
Attachment #608797 - Attachment is obsolete: true
Attachment #608797 - Flags: review?(enndeakin)
Attachment #609437 - Flags: review?(enndeakin)
Attachment #609437 - Flags: review?(enndeakin) → review+
https://hg.mozilla.org/mozilla-central/rev/2f58de36c53a
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: