create binding to idweakmap
This commit is contained in:
parent
eae7c840b7
commit
ac4df34ecd
8 changed files with 135 additions and 40 deletions
|
@ -8,18 +8,6 @@
|
|||
|
||||
#include "native_mate/converter.h"
|
||||
|
||||
namespace mate {
|
||||
|
||||
template<typename T>
|
||||
struct Converter<v8::MaybeLocal<T>> {
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
v8::MaybeLocal<T> val) {
|
||||
return ConvertToV8(isolate, val.ToLocalChecked());
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace mate
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace {
|
||||
|
@ -106,13 +94,4 @@ int32_t IDWeakMap::GetNextID() {
|
|||
return ++next_id_;
|
||||
}
|
||||
|
||||
mate::ObjectTemplateBuilder IDWeakMap::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return mate::ObjectTemplateBuilder(isolate)
|
||||
.SetMethod("set", &IDWeakMap::Set)
|
||||
.SetMethod("get", &IDWeakMap::Get)
|
||||
.SetMethod("has", &IDWeakMap::Has)
|
||||
.SetMethod("remove", &IDWeakMap::Remove);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue