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 | 18 | v8::HandleScope handleScope(isolate); |
| 19 | 19 | _context.Reset(isolate, _engine->getContext()); |
| 20 | 20 | auto context = _context.Get(isolate); |
| 21 | − v8::Local<v8::Object> v8Object; | |
| 22 | − if (!object->ToObject(context).ToLocal(&v8Object)) { | |
| 23 | − Q_ASSERT(false); | |
| 24 | − } | |
| 21 | + Q_ASSERT(object->IsObject()); | |
| 22 | + v8::Local<v8::Object> v8Object = v8::Local<v8::Object>::Cast(object); | |
| 25 | 23 | _object.Reset(isolate, v8Object); |
| 26 | 24 | _propertyNames.Reset(isolate, v8Object->GetOwnPropertyNames(context).ToLocalChecked()); |
| 27 | 25 | _length = _propertyNames.Get(isolate)->Length(); |