Showing the changes to libraries/script-engine/src/v8/ScriptValueIteratorV8Wrapper.cpp (1 of 10 files). Show all
Unified · Split
| @@ -18,10 +18,8 @@ V8ScriptValueIterator::V8ScriptValueIterator(ScriptEngineV8* engine, v8::Local<v · 17 unmodified lines | |||
| 18 | v8::HandleScope handleScope(isolate); | 18 | v8::HandleScope handleScope(isolate); |
| 19 | _context.Reset(isolate, _engine->getContext()); | 19 | _context.Reset(isolate, _engine->getContext()); |
| 20 | auto context = _context.Get(isolate); | 20 | auto context = _context.Get(isolate); |
| 21 | v8::Local<v8::Object> v8Object; | 21 | Q_ASSERT(object->IsObject()); |
| 22 | if (!object->ToObject(context).ToLocal(&v8Object)) { | 22 | v8::Local<v8::Object> v8Object = v8::Local<v8::Object>::Cast(object); |
| 23 | Q_ASSERT(false); | ||
| 24 | } | ||
| 25 | _object.Reset(isolate, v8Object); | 23 | _object.Reset(isolate, v8Object); |
| 26 | _propertyNames.Reset(isolate, v8Object->GetOwnPropertyNames(context).ToLocalChecked()); | 24 | _propertyNames.Reset(isolate, v8Object->GetOwnPropertyNames(context).ToLocalChecked()); |
| 27 | _length = _propertyNames.Get(isolate)->Length(); | 25 | _length = _propertyNames.Get(isolate)->Length(); |