Temporarily disable libunwind exception throwing on Mac
authorSimon Hausmann <simon.hausmann@digia.com>
Wed, 2 Oct 2013 18:43:25 +0000 (20:43 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 3 Oct 2013 07:24:51 +0000 (09:24 +0200)
The run-time appears to have a slightly different behaviour wrt exception
ownership. We don't strictly need this code path on Mac, so use regular C++
exceptions until I can figure out what happens there.

Change-Id: Idd540c8656d25ffdb4002843f398114881e33214
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/jsruntime.pri
src/qml/jsruntime/qv4stacktrace.cpp

index d5c29e8..14701fe 100644 (file)
@@ -110,7 +110,7 @@ linux*|mac {
     LIBS += -ldl
 }
 
-!win32:!ios {
+!win32:!ios:!mac {
     *g++*:equals(QT_ARCH, "arm") {
         static_libgcc = $$system($$QMAKE_CXX -print-file-name=libgcc.a)
         LIBS += $$static_libgcc
index c715b62..7b7060d 100644 (file)
@@ -49,7 +49,7 @@
 #include "qv4engine_p.h"
 #include "qv4unwindhelper_p.h"
 
-#ifdef V4_CXX_ABI_EXCEPTION
+#if defined(V4_CXX_ABI_EXCEPTION) || defined(Q_OS_DARWIN)
 #include <unwind.h>
 
 struct BacktraceHelper
@@ -95,7 +95,7 @@ NativeStackTrace::NativeStackTrace(ExecutionContext *context)
     engine = context->engine;
     currentNativeFrame = 0;
 
-#ifdef V4_CXX_ABI_EXCEPTION
+#if defined(V4_CXX_ABI_EXCEPTION) || defined(Q_OS_DARWIN)
     UnwindHelper::prepareForUnwind(context);
 
     nativeFrameCount = get_backtrace_from_libunwind(&trace[0], sizeof(trace) / sizeof(trace[0]));