Closed
Bug 1122181
Opened 9 years ago
Closed 7 years ago
Stop using ::Gestalt in XPCOM
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: milan, Assigned: milan)
References
Details
Attachments
(1 file, 3 obsolete files)
5.68 KB,
patch
|
milan
:
review+
|
Details | Diff | Splinter Review |
There are just two places in XPCOM that use Gestalt - and one of them isn't necessary as we are only using it to see if we're on 10.5, which we don't support anymore.
Assignee | ||
Comment 1•9 years ago
|
||
Steven, you were involved in the first crack at the whole Gestalt thing, so I thought I'd run this by you first.
Attachment #8549818 -
Flags: review?(smichaud)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → milan
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8549818 -
Attachment is obsolete: true
Attachment #8549818 -
Flags: review?(smichaud)
Attachment #8549821 -
Flags: review?(smichaud)
Comment 3•9 years ago
|
||
Comment on attachment 8549821 [details] [diff] [review] Stop using Gestalt for version in XPCOM. This looks fine to me. Thanks for the patch.
Attachment #8549821 -
Flags: review?(smichaud) → review+
Assignee | ||
Comment 4•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=60d61fe2fb21
Assignee | ||
Updated•9 years ago
|
Attachment #8549821 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 6•9 years ago
|
||
Hi Milan, the try run shows a bustage could you take a look at this ?
Flags: needinfo?(milan)
Keywords: checkin-needed
Assignee | ||
Comment 7•9 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #6) > Hi Milan, the try run shows a bustage could you take a look at this ? That's plain strange, I was convinced I looked and saw it green. Especially as https://treeherder.mozilla.org/#/jobs?repo=try&revision=4a672195c672 (opt, mind you) which also included this change set was.
Flags: needinfo?(milan)
Assignee | ||
Comment 8•9 years ago
|
||
My bad; we don't seem to be able to resolve functions from widget/ in xpcom/ at a first glance: 09:55:42 INFO - Undefined symbols for architecture x86_64: 09:55:42 INFO - "nsCocoaFeatures::OnLionOrLater()", referenced from: 09:55:42 INFO - StackWalkInitCriticalAddress() in nsStackWalk.o
Comment 9•9 years ago
|
||
Here's the problem. (And yes, I also missed it.) - MOZ_ASSERT(OnLionOrLater() || gCriticalAddress.mAddr != nullptr); + MOZ_ASSERT(nsCocoaFeatures::OnLionOrLater() || gCriticalAddress.mAddr != nullptr); You need an "#if defined(MOZ_WIDGET_COCOA)" block around this.
Comment 10•9 years ago
|
||
(Following up comment #9) Oops, that's not right. Instead try getting rid of this: +#if defined (DEBUG) && defined(MOZ_WIDGET_COCOA) +#include "nsCocoaFeatures.h" +#endif and adding this here: #include "nsCocoaFeatures.h" http://hg.mozilla.org/mozilla-central/annotate/c2df1daf74c3/xpcom/base/nsStackWalk.cpp#l53 Do an all platform tryserver build to test it out.
Assignee | ||
Comment 11•9 years ago
|
||
Fix the includes.
Attachment #8551413 -
Attachment is obsolete: true
Attachment #8552564 -
Flags: review+
Assignee | ||
Comment 12•9 years ago
|
||
Still a problem (https://treeherder.mozilla.org/#/jobs?repo=try&revision=0a6d653155d1). Regarding comment 10, if it was "just" an include problem, wouldn't we have a compile time, rather than a link time error? I wonder if xpcom/base doesn't link "to enough", compared to xpcom/io or xpcom/components which use nsCocoaFeatures and don't have this problem?
Comment 13•9 years ago
|
||
It looks like the link problem is with libdmd. Maybe it builds its own copy of nsStackWalk? Glandium may have some ideas.
Comment 14•9 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #13) > It looks like the link problem is with libdmd. Maybe it builds its own copy > of nsStackWalk? It does. See https://dxr.mozilla.org/mozilla-central/source/memory/replace/dmd/moz.build#16 Also note that libdmd is built for debug builds on the test machines but not for opt builds. So that explains why opt builds are succeeding. Is there some library you have to link with in order to use nsCocoaFeatures::OnLionOrLater()?
Comment 15•9 years ago
|
||
To replicate this locally, add |ac_add_options --enable-dmd| to your mozconfig.
Comment 16•9 years ago
|
||
Milan, I think you should get rid of the part of your patch that imports nsCocoaFeatures::OnLionOrLater(). Just keep the part that eliminates the unnecessary OS X 10.5 version check, which (of course) is no longer needed.
Comment 17•9 years ago
|
||
Oops, sorry. I didn't really mean for you to keep the call to Gestalt(). Instead copy over from nsCocoaFeatures.mm as much code as you need to do the OnLionOrLater() version check. Note that you can do this without using any Objective-C syntax (which would be forbidden in a *.c/cpp file).
Comment 18•7 years ago
|
||
There is no ::Gestalt anymore in XPCOM. The last one was removed in Bug 1059424.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•