Closed
Bug 402627
Opened 16 years ago
Closed 16 years ago
"WARNING: Calling SetWindowTitlebarColor on window that isn't of the ToolbarWindow class."
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: cbarrett)
References
Details
(Keywords: regression, Whiteboard: [not a blocker; needs explicit a+])
Attachments
(2 files, 3 obsolete files)
5.15 KB,
text/plain
|
Details | |
2.68 KB,
patch
|
jaas
:
review+
roc
:
superreview+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
This warning appears when I start Firefox: WARNING: Calling SetWindowTitlebarColor on window that isn't of the ToolbarWindow class.: file /Users/jruderman/trunk/mozilla/widget/src/cocoa/nsCocoaWindow.mm, line 1089 I'm guessing this started happening with the landing of bug 402125.
Assignee | ||
Comment 1•16 years ago
|
||
Can you break on that line and backtrace?
Reporter | ||
Comment 2•16 years ago
|
||
Assignee | ||
Updated•16 years ago
|
Assignee: joshmoz → cbarrett
Assignee | ||
Comment 3•16 years ago
|
||
This is caused by someone trying to set the titlebar color of the hidden window. They should probably stop doing that ;)
Comment 4•16 years ago
|
||
I think you better fail silently, otherwise we'd have to distinguish the hidden window any anything which might be opened as a sheet using pure css selectors...
Assignee | ||
Comment 5•16 years ago
|
||
If we're the hidden window, we should fail silently according to Mano.
Attachment #287616 -
Flags: review?(joshmoz)
Comment on attachment 287616 [details] [diff] [review] fix v1.0 + // Fail silently for the hidden window. + if (SameCOMIdentity(GetHiddenWindowWidget(), (nsIWidget*)this)) + return NS_ERROR_FAILURE; I'm not sure raising an error here is failing silently, and in any case the comment itself is saying nothing new about obvious code so it isn't necessary. Why return an error instead of NS_OK? I'm not sure which is better, error or NS_OK.
Assignee | ||
Comment 7•16 years ago
|
||
This should be a little clearer.
Attachment #287616 -
Attachment is obsolete: true
Attachment #287701 -
Flags: review?(joshmoz)
Attachment #287616 -
Flags: review?(joshmoz)
Comment on attachment 287701 [details] [diff] [review] fix v1.1 + nsIWidget* hiddenWindowWidgetNoCOMPtr = GetHiddenWindowWidget(); return static_cast<nsCocoaWindow*>(hiddenWindowWidgetNoCOMPtr)->GetMenuBar(); If GetHiddenWindowWidget return null this will crash.
Attachment #287701 -
Flags: review?(joshmoz) → review-
Assignee | ||
Comment 9•16 years ago
|
||
Thanks, fixed.
Attachment #287701 -
Attachment is obsolete: true
Attachment #289100 -
Flags: review?(joshmoz)
Comment 10•16 years ago
|
||
Comment on attachment 289100 [details] [diff] [review] fix v1.2 >@@ -1521,6 +1533,7 @@ void patternDraw(void* aInfo, CGContextR > CGColorSpaceRelease(colorSpace); > CGFunctionRelease(function); > CGContextDrawShading(aContext, shading); >+ CGShadingRelease(shading); This won't apply and it has nothing to do with this bug.
Attachment #289100 -
Flags: review?(joshmoz) → review-
Comment 11•16 years ago
|
||
Comment on attachment 289100 [details] [diff] [review] fix v1.2 >+ // Don't output a warning for the hidden window. >+ if (!SameCOMIdentity(GetHiddenWindowWidget(), (nsIWidget*)this)) >+ NS_WARNING("Calling SetWindowTitlebarColor on window that isn't of the ToolbarWindow class."); > return NS_ERROR_FAILURE; > } Since NS_WARNING will only apply in a debug build, I think you should also make the if-statement only run on debug builds by putting it inside #if DEBUG.
NS_WARN_IF_FALSE
Assignee | ||
Comment 13•16 years ago
|
||
Should apply cleanly now that I'm not working from an old source tree. Using NS_WARN_IF_FALSE as well now.
Attachment #289100 -
Attachment is obsolete: true
Attachment #290286 -
Flags: review?(joshmoz)
Attachment #290286 -
Flags: superreview?(roc)
Attachment #290286 -
Flags: review?(joshmoz)
Attachment #290286 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Whiteboard: [not a blocker; needs explicit a+]
Attachment #290286 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 14•16 years ago
|
||
Comment on attachment 290286 [details] [diff] [review] fix v1.3 Want this to land for 1.9. It's silencing a spurious warning during start up, and helps make automated testing easier and real warnings stand out better.
Attachment #290286 -
Flags: approval1.9?
Updated•16 years ago
|
Attachment #290286 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 15•16 years ago
|
||
Checking in widget/src/cocoa/nsCocoaWindow.mm; /cvsroot/mozilla/widget/src/cocoa/nsCocoaWindow.mm,v <-- nsCocoaWindow.mm new revision: 1.120; previous revision: 1.119 done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•