Skip to content

Commit

Permalink
Report JavaScript errors from Qt signals and slots
Browse files Browse the repository at this point in the history
Issue: #12973
Upstream issue: https://bugreports.qt.io/browse/QTBUG-37899
  • Loading branch information
vitallium committed Mar 15, 2016
1 parent 6cf54a3 commit e09b87b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/WebCore/bridge/qt/qt_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,12 @@ 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;
ExecState* exec = toJS(m_context);
JSObjectCallAsFunction(m_context, m_receiverFunction, m_receiver, argc, args.data(), &call_exception);
if (call_exception) {
WebCore::reportException(exec, toJS(exec, call_exception));
}
}

bool QtConnectionObject::match(JSContextRef context, QObject* sender, int signalIndex, JSObjectRef receiver, JSObjectRef receiverFunction)
Expand Down

0 comments on commit e09b87b

Please sign in to comment.