MCPcopy Create free account
hub / github.com/Snapchat/Valdi / isValueUndefined

Method isValueUndefined

valdi/src/valdi/v8/V8JavaScriptContext.cpp:995–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
1005Ref<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));

Callers 14

doOnCompleteMethod · 0.45
doCancelMethod · 0.45
nameFromJSFunctionFunction · 0.45
visitPropertyNameMethod · 0.45
runtimeCreateContextMethod · 0.45
runtimeLoadModuleMethod · 0.45
getValueForObjectKeyMethod · 0.45
getObjectForIdMethod · 0.45
visitPropertyNameMethod · 0.45
valueIsNullMethod · 0.45

Calls 3

clearErrorMethod · 0.80
IsUndefinedMethod · 0.80
fromValdiJSValueFunction · 0.70

Tested by

no test coverage detected