aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4exception_gcc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4exception_gcc.cpp')
-rw-r--r--src/qml/jsruntime/qv4exception_gcc.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4exception_gcc.cpp b/src/qml/jsruntime/qv4exception_gcc.cpp
index 5eb5fc2178..0d230ea3fb 100644
--- a/src/qml/jsruntime/qv4exception_gcc.cpp
+++ b/src/qml/jsruntime/qv4exception_gcc.cpp
@@ -100,25 +100,30 @@ static void exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception *ex)
}
}
+struct DummyException
+{
+ virtual ~DummyException() {}
+};
+
static void exception_destructor(void *ex)
{
- reinterpret_cast<QV4::Exception *>(ex)->~Exception();
+ reinterpret_cast<DummyException *>(ex)->~DummyException();
}
QT_BEGIN_NAMESPACE
using namespace QV4;
-void Exception::throwInternal(ExecutionContext *throwingContext, const ValueRef exceptionValue)
+void Exception::throwInternal()
{
void *rawException = abi::__cxa_allocate_exception(sizeof(QV4::Exception));
gcc_refcounted_compatible_exception *refCountedException = reinterpret_cast<gcc_refcounted_compatible_exception *>(rawException) - 1;
cxa_exception *exception = &refCountedException->x;
- (void)new (rawException) Exception(throwingContext, exceptionValue);
+ (void)new (rawException) DummyException();
refCountedException->refCount = 1;
- exception->typeInfo = const_cast<std::type_info*>(&typeid(Exception));
+ exception->typeInfo = const_cast<std::type_info*>(&typeid(DummyException));
exception->exceptionDestructor = &exception_destructor;
exception->unexpectedHandler = std::unexpected;
exception->terminateHandler = std::terminate;