Last Comment Bug 738662 - Add tracing/warning information to help debug XUL overlay problems
: Add tracing/warning information to help debug XUL overlay problems
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XUL (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: :Irving Reid (No longer working on Firefox)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-23 08:35 PDT by :Irving Reid (No longer working on Firefox)
Modified: 2012-03-30 13:06 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add details to various error/warning messages (9.06 KB, patch)
2012-03-23 10:51 PDT, :Irving Reid (No longer working on Firefox)
bzbarsky: review-
Details | Diff | Splinter Review
Add details to various error/warning messages, take 2 (7.89 KB, patch)
2012-03-23 11:44 PDT, :Irving Reid (No longer working on Firefox)
bzbarsky: review+
Details | Diff | Splinter Review
Add details to various error/warning messages, take 3 (7.85 KB, patch)
2012-03-26 12:45 PDT, :Irving Reid (No longer working on Firefox)
enndeakin: review+
Details | Diff | Splinter Review

Description :Irving Reid (No longer working on Firefox) 2012-03-23 08:35:31 PDT
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.
Comment 1 :Irving Reid (No longer working on Firefox) 2012-03-23 10:51:27 PDT
Created attachment 608765 [details] [diff] [review]
Add details to various error/warning messages

"File Not Found" is so much nicer when it actually tells you *which* file...
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2012-03-23 11:03:29 PDT
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.
Comment 3 :Irving Reid (No longer working on Firefox) 2012-03-23 11:44:39 PDT
Created attachment 608797 [details] [diff] [review]
Add details to various error/warning messages, take 2

Addressed bz's comments, added enndeakin to review XUL toolkit change.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2012-03-23 12:20:02 PDT
Comment on attachment 608797 [details] [diff] [review]
Add details to various error/warning messages, take 2

r=me
Comment 5 Neil Deakin (away until Oct 3) 2012-03-26 10:18:08 PDT
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.
Comment 6 :Irving Reid (No longer working on Firefox) 2012-03-26 12:45:23 PDT
Created attachment 609437 [details] [diff] [review]
Add details to various error/warning messages, take 3

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().
Comment 8 Ed Morley [:emorley] 2012-03-30 13:06:39 PDT
https://hg.mozilla.org/mozilla-central/rev/2f58de36c53a

Note You need to log in before you can comment on or make changes to this bug.