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

Function SetFastMethod

test-app/runtime/src/main/cpp/Util.cpp:201–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 }
200
201 void SetFastMethod(Isolate *isolate,
202 Local <Template> that,
203 const char *name,
204 v8::FunctionCallback slow_callback,
205 const v8::CFunction *c_function,
206 Local <v8::Value> data) {
207 Local<v8::FunctionTemplate> t =
208 NewFunctionTemplate(isolate,
209 slow_callback,
210 data,
211 Local<v8::Signature>(),
212 v8::ConstructorBehavior::kThrow,
213 v8::SideEffectType::kHasSideEffect,
214 c_function);
215 // kInternalized strings are created in the old space.
216 const v8::NewStringType type = v8::NewStringType::kInternalized;
217 Local<v8::String> name_string =
218 v8::String::NewFromUtf8(isolate, name, type).ToLocalChecked();
219 that->Set(name_string, t);
220 }
221
222 void SetFastMethod(Local <v8::Context> context,
223 Local <v8::Object> that,

Callers

nothing calls this directly

Calls 6

NewFunctionTemplateFunction · 0.85
ToLocalCheckedMethod · 0.80
GetFunctionMethod · 0.80
SetMethod · 0.45
GetIsolateMethod · 0.45
CheckMethod · 0.45

Tested by

no test coverage detected