MCPcopy Create free account
hub / github.com/NativeScript/android / GetCastType

Method GetCastType

test-app/runtime/src/main/cpp/NumericCasts.cpp:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25CastType NumericCasts::GetCastType(Isolate* isolate, const Local<Object>& object) {
26 auto ret = CastType::None;
27 auto key = ArgConverter::ConvertToV8String(isolate, s_castMarker);
28 Local<Value> hidden;
29 V8GetPrivateValue(isolate, object, key, hidden);
30 if (!hidden.IsEmpty()) {
31 auto context = isolate->GetCurrentContext();
32 ret = static_cast<CastType>(hidden->Int32Value(context).ToChecked());
33 }
34
35 return ret;
36}
37
38Local<Value> NumericCasts::GetCastValue(const Local<Object>& object) {
39 auto isolate = object->GetIsolate();

Callers

nothing calls this directly

Calls 2

ToCheckedMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected