Closed Bug 633820 Opened 13 years ago Closed 13 years ago

nsCrashOnException.cpp compilation fails to compile on mingw

Categories

(Core :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jacek, Assigned: jacek)

References

Details

Attachments

(1 file)

Attached patch fix v1.0Splinter Review
After landing bug 589495, there is a compilation error on nsCrashOnException.cpp. Although the patch nicely checks for msvc before using this file, the check in xpcom/base/Makefile.in is toolkit, not compiler, specific. Fixing Makefile.in would be enough for this bug, but I think there is a better approach. We can use new MOZ_SEH_TRY/MOZ_SEH_EXCEPT macros in nsCrashOnException.cpp, making it mingw-compatible. Then, if there is no support for SEH exceptions, the function will be equivalent to plain wndProc call. This way we may remove ifdefs on caller side, so the code is slightly cleaner. Also once GCC will support SEH (it's currently work in progress, GCC 4.6 will have it for x86_64 targets, x86 is planned for later releases), we will be able to turn it on with a simple configure patch.
Attachment #512026 - Flags: review?(ehsan)
Comment on attachment 512026 [details] [diff] [review]
fix v1.0

Looks great to me.  I didn't know about MOZ_SEH_TRY/EXCEPT.  Thanks!
Attachment #512026 - Flags: review?(ehsan) → review+
Attachment #512026 - Flags: approval2.0?
Attachment #512026 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
Thanks for the review. Pushed to m-c:

http://hg.mozilla.org/mozilla-central/rev/8879c180976d
Status: NEW → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: