| 993 | v8::Local<v8::Value> val = fromValdiJSValue(_isolate, value, exceptionTracker); |
| 994 | if (!val->IsTypedArray()) { |
| 995 | exceptionTracker.onError("Value is not TypedArray"); |
| 996 | return JSTypedArray(); |
| 997 | } |
| 998 | v8::Local<v8::TypedArray> arr = v8::Local<v8::TypedArray>::Cast(val); |
| 999 | const auto type = getTypedArrayType(val); |
| 1000 | void* data = arr->Buffer()->Data(); |
| 1001 | const size_t length = arr->ByteLength(); |
| 1002 | return JSTypedArray(type, data, length, toRetainedJSValueRef(IndirectV8Persistent::make(_isolate, val))); |
| 1003 | } |
| 1004 | |
| 1005 | Ref<JSFunction> V8JavaScriptContext::valueToFunction(const JSValue& value, JSExceptionTracker& exceptionTracker) { |
| 1006 | v8::HandleScope handleScope(_isolate); |
| 1007 | |
| 1008 | auto val = v8::Local<v8::Function>::Cast(fromValdiJSValue(_isolate, value, exceptionTracker)); |
no test coverage detected