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 | connections = _connections; | 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 | withReadLock([&]{ | 1092 | withReadLock([&]{ |
| 1091 | //for (ConnectionList::iterator iter = connections.begin(); iter != connections.end(); ++iter) { | 1093 | //for (ConnectionList::iterator iter = connections.begin(); iter != connections.end(); ++iter) { |
| 1092 | for (ConnectionList::iterator iter = _connections.begin(); iter != _connections.end(); ++iter) { | 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 | Q_ASSERT(!conn.callback.get().IsEmpty()); | 1102 | Q_ASSERT(!conn.callback.get().IsEmpty()); |
| 1101 | Q_ASSERT(!conn.callback.get()->IsUndefined()); | 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 | if (!conn.callback.get()->IsFunction()) { | 1109 | if (!conn.callback.get()->IsFunction()) { |
| 1104 | auto stringV8 = conn.callback.get()->ToDetailString(functionContext).ToLocalChecked(); | 1110 | auto stringV8 = conn.callback.get()->ToDetailString(functionContext).ToLocalChecked(); |
| 1105 | QString error = *v8::String::Utf8Value(_engine->getIsolate(), stringV8); | 1111 | QString error = *v8::String::Utf8Value(_engine->getIsolate(), stringV8); |