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

Method isValueFunction

valdi/src/valdi/v8/V8JavaScriptContext.cpp:1017–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015 return val->IsNull();
1016}
1017bool V8JavaScriptContext::isValueFunction(const JSValue& value) {
1018 v8::HandleScope handleScope(_isolate);
1019 JSExceptionTracker tracker(*this);
1020
1021 auto val = fromValdiJSValue(_isolate, value, tracker);
1022 if (!tracker) {
1023 tracker.clearError();
1024 return false;
1025 }
1026 return val->IsFunction();
1027}
1028
1029bool V8JavaScriptContext::isValueNumber(const JSValue& value) {
1030 v8::HandleScope handleScope(_isolate);

Callers 4

getGlobalOnMessageFunction · 0.45
jsValueToFunctionFunction · 0.45
updateErrorHandlerFunction · 0.45

Calls 2

clearErrorMethod · 0.80
fromValdiJSValueFunction · 0.70

Tested by

no test coverage detected