Showing the changes to libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1087,6 +1087,8 @@ int ScriptSignalV8Proxy::qt_metacall(QMetaObject::Call call, int id, void** argu · 1086 unmodified lines | ||
| 1087 | 1087 | connections = _connections; |
| 1088 | 1088 | });*/ |
| 1089 | 1089 | |
| 1090 | + // V8TODO: this may cause deadlocks on connect/disconnect, so the connect/disconnect procedure needs to be reworked. | |
| 1091 | + // It should probably add events to a separate list that would be processed before and after all the events for the signal. | |
| 1090 | 1092 | withReadLock([&]{ |
| 1091 | 1093 | //for (ConnectionList::iterator iter = connections.begin(); iter != connections.end(); ++iter) { |
| 1092 | 1094 | for (ConnectionList::iterator iter = _connections.begin(); iter != _connections.end(); ++iter) { |
| @@ -1099,7 +1101,11 @@ int ScriptSignalV8Proxy::qt_metacall(QMetaObject::Call call, int id, void** argu · 6 unmodified lines | ||
| 1099 | 1101 | |
| 1100 | 1102 | Q_ASSERT(!conn.callback.get().IsEmpty()); |
| 1101 | 1103 | Q_ASSERT(!conn.callback.get()->IsUndefined()); |
| 1102 | − Q_ASSERT(!conn.callback.get()->IsNull()); | |
| 1104 | + if(conn.callback.get()->IsNull()) { | |
| 1105 | + qDebug() << "ScriptSignalV8Proxy::qt_metacall: Connection callback is Null"; | |
| 1106 | + _engine->popContext(); | |
| 1107 | + continue; | |
| 1108 | + } | |
| 1103 | 1109 | if (!conn.callback.get()->IsFunction()) { |
| 1104 | 1110 | auto stringV8 = conn.callback.get()->ToDetailString(functionContext).ToLocalChecked(); |
| 1105 | 1111 | QString error = *v8::String::Utf8Value(_engine->getIsolate(), stringV8); |