chore: remove native_mate (Part 1) (#20085)
* move Destroyable utilities out of native_mate * do not set "destroy" in ObjectTemplateBuilder * remove ObjectTemplateBuilder::MakeDestroyable * do not pollute gin namespace * add more comments * remove hack of Arguments
This commit is contained in:
parent
96b42bddb8
commit
b601f3a031
17 changed files with 108 additions and 42 deletions
|
@ -520,8 +520,8 @@ mate::WrappableBase* URLRequestNS::New(mate::Arguments* args) {
|
|||
void URLRequestNS::BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype) {
|
||||
prototype->SetClassName(mate::StringToV8(isolate, "URLRequest"));
|
||||
gin_helper::Destroyable::MakeDestroyable(isolate, prototype);
|
||||
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
|
||||
.MakeDestroyable()
|
||||
.SetMethod("write", &URLRequestNS::Write)
|
||||
.SetMethod("cancel", &URLRequestNS::Cancel)
|
||||
.SetMethod("setExtraHeader", &URLRequestNS::SetExtraHeader)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue