Showing the changes to libraries/script-engine/src/v8/ScriptValueIteratorV8Wrapper.cpp (1 of 2 files). Show all
Unified · Split
| @@ -83,6 +83,11 @@ V8ScriptValue V8ScriptValueIterator::value() { · 82 unmodified lines | ||
| 83 | 83 | if (!_object.Get(isolate)->Get(context, propertyName->ToString(context).ToLocalChecked()).ToLocal(&v8Value)) { |
| 84 | 84 | Q_ASSERT(false); |
| 85 | 85 | } |
| 86 | + //V8TODO: sometimes no value gets written to v8Value. This needs to be investigated and fixed. | |
| 87 | + if (v8Value.IsEmpty()) { | |
| 88 | + qDebug() << "V8ScriptValueIterator::value: value handle is empty for key: " << *v8::String::Utf8Value(isolate, propertyName->ToString(context).ToLocalChecked()); | |
| 89 | + v8Value = v8::Undefined(isolate); | |
| 90 | + } | |
| 86 | 91 | return V8ScriptValue(_engine, v8Value); |
| 87 | 92 | } |
| 88 | 93 | |