| 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, |
nothing calls this directly
no test coverage detected