| 371 | } |
| 372 | |
| 373 | void SetInstanceMethod(v8::Isolate *isolate, |
| 374 | Local <v8::FunctionTemplate> that, |
| 375 | const char *name, |
| 376 | v8::FunctionCallback callback, |
| 377 | Local <v8::Value> data) { |
| 378 | Local<v8::Signature> signature = v8::Signature::New(isolate, that); |
| 379 | Local<v8::FunctionTemplate> t = |
| 380 | NewFunctionTemplate(isolate, |
| 381 | callback, |
| 382 | data, |
| 383 | signature, |
| 384 | v8::ConstructorBehavior::kThrow, |
| 385 | v8::SideEffectType::kHasSideEffect); |
| 386 | // kInternalized strings are created in the old space. |
| 387 | const v8::NewStringType type = v8::NewStringType::kInternalized; |
| 388 | Local<v8::String> name_string = |
| 389 | v8::String::NewFromUtf8(isolate, name, type).ToLocalChecked(); |
| 390 | that->InstanceTemplate()->Set(name_string, t); |
| 391 | t->SetClassName(name_string); |
| 392 | } |
| 393 | |
| 394 | void SetConstructorFunction(Local <v8::Context> context, |
| 395 | Local <v8::Object> that, |
nothing calls this directly
no test coverage detected