Closed Bug 370453 Opened 18 years ago Closed 18 years ago

Add a (debug only) warning when 'key' cannot be found

Categories

(Core :: XUL, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

Details

Attachments

(1 file)

Add a (debug only) warning when 'key' cannot be found It allows us to find real errors (I'll file them separately): WARNING: Key 'historyHome' of menu item 'Home' could not be found: file nsMenuFrame.cpp, line 1520 WARNING: Key 'manBookmarkKb' of menu item 'Organize Bookmarks...' could not be found: file nsMenuFrame.cpp, line 1520
Attached patch Patch rev. 1Splinter Review
Attachment #255159 - Flags: review?(neil)
Comment on attachment 255159 [details] [diff] [review] Patch rev. 1 Might it be worth including the document URI perhaps?
Attachment #255159 - Flags: review?(neil) → review+
(In reply to comment #2) The current info should be enough to locate the bogus line I think.
Attachment #255159 - Flags: superreview?(bzbarsky)
Comment on attachment 255159 [details] [diff] [review] Patch rev. 1 s/NS_DEBUG/DEBUG/ And I'd do conversion to UTF8, not ASCII -- that way we can catch this in localized builds too. ;) sr=bzbarsky with that.
Attachment #255159 - Flags: superreview?(bzbarsky) → superreview+
(In reply to comment #4) > (From update of attachment 255159 [details] [diff] [review]) > s/NS_DEBUG/DEBUG/ Why? I actually do prefer NS_DEBUG over DEBUG. DEBUG seems a bit too generic for us to assume it's unused. Just grep-ing /usr/include shows several meanings for it and it could cause problems for anyone that takes our code and mixes it with code from other sources. > And I'd do conversion to UTF8, not ASCII Will do.
> Why? Because almost all our debug code uses DEBUG, and --enable-debug enables both, and NS_DEBUG gets defined #ifdef DEBUG. So they're really equivalent, and it's better not to pretend that NS_DEBUG is somehow better, imo...
Nits fixed. Checked in to trunk at 2007-02-23 21:42 PST -> FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: