| 1293 | } |
| 1294 | |
| 1295 | jsi::Array V8Runtime::createArray(size_t length) { |
| 1296 | v8::Locker locker(isolate_); |
| 1297 | v8::Isolate::Scope scopedIsolate(isolate_); |
| 1298 | v8::HandleScope scopedHandle(isolate_); |
| 1299 | v8::Context::Scope scopedContext(context_.Get(isolate_)); |
| 1300 | |
| 1301 | v8::Local<v8::Array> v8Array = |
| 1302 | v8::Array::New(isolate_, static_cast<int>(length)); |
| 1303 | return make<jsi::Object>(new V8PointerValue(isolate_, v8Array)) |
| 1304 | .getArray(*this); |
| 1305 | } |
| 1306 | |
| 1307 | jsi::ArrayBuffer V8Runtime::createArrayBuffer( |
| 1308 | std::shared_ptr<jsi::MutableBuffer> buffer) { |