Showing the changes to libraries/script-engine/src/v8/ScriptValueIteratorV8Wrapper.cpp (1 of 6 files). Show all
Unified · Split
| @@ -31,6 +31,16 @@ V8ScriptValueIterator::V8ScriptValueIterator(ScriptEngineV8* engine, v8::Local<v · 30 unmodified lines | |||
| 31 | _currentIndex = -1; | 31 | _currentIndex = -1; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | V8ScriptValueIterator::~V8ScriptValueIterator() { | ||
| 35 | auto isolate = _engine->getIsolate(); | ||
| 36 | v8::Locker locker(isolate); | ||
| 37 | v8::Isolate::Scope isolateScope(isolate); | ||
| 38 | v8::HandleScope handleScope(isolate); | ||
| 39 | _propertyNames.Reset(); | ||
| 40 | _object.Reset(); | ||
| 41 | _context.Reset(); | ||
| 42 | } | ||
| 43 | |||
| 34 | bool V8ScriptValueIterator::hasNext() const { | 44 | bool V8ScriptValueIterator::hasNext() const { |
| 35 | return _currentIndex < _length - 1; | 45 | return _currentIndex < _length - 1; |
| 36 | } | 46 | } |