--- a/src/qtwebkit/Source/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/qtwebkit/Source/WebCore/bridge/qt/qt_runtime.cpp @@ -1440,7 +1440,8 @@ JSValueRef QtRuntimeMethod::connectOrDisconnect(JSContextRef context, JSObjectRe // Yep, disconnect it QMetaObject::disconnect(sender, signalIndex, conn, conn->metaObject()->methodOffset()); - delete conn; // this will also remove it from the map + // this will also remove it from the map + conn->deleteLater(); return JSValueMakeUndefined(context); } @@ -1582,7 +1582,14 @@ void QtConnectionObject::execute(void** argv) args[i] = convertQVariantToValue(m_context, m_rootObject, QVariant(argType, argv[i+1]), ignoredException); } - JSObjectCallAsFunction(m_context, m_receiverFunction, m_receiver, argc, args.data(), 0); + JSValueRef call_exception = 0; + JSObjectCallAsFunction(m_context, m_receiverFunction, m_receiver, argc, args.data(), &call_exception); + + if (call_exception) { + ExecState* exec = toJS(m_context); + APIEntryShim shim(exec); + WebCore::reportException(exec, toJS(exec, call_exception)); + } } bool QtConnectionObject::match(JSContextRef context, QObject* sender, int signalIndex, JSObjectRef receiver, JSObjectRef receiverFunction)