chore: remove native_mate (Part 10) (#20696)
* refactor: remove direct uses of event_emitter_deprecated.h * refactor: remove event_emitter_deprecated.h in api::App * refactor: use std::move to save a copy * fix: windows and linux builds
This commit is contained in:
parent
77414813b4
commit
be955a9721
24 changed files with 223 additions and 199 deletions
|
@ -24,10 +24,18 @@ v8::Local<v8::Value> ConvertToV8(v8::Isolate* isolate, T&& input) {
|
|||
template <>
|
||||
struct Converter<unsigned long> { // NOLINT(runtime/int)
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
unsigned long val); // NOLINT(runtime/int)
|
||||
unsigned long val) { // NOLINT(runtime/int)
|
||||
return v8::Integer::New(isolate, val);
|
||||
}
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
unsigned long* out); // NOLINT(runtime/int)
|
||||
unsigned long* out) { // NOLINT(runtime/int)
|
||||
auto maybe = val->IntegerValue(isolate->GetCurrentContext());
|
||||
if (maybe.IsNothing())
|
||||
return false;
|
||||
*out = maybe.FromJust();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue