Implementing error, close, finish, abort events management.
This commit is contained in:
parent
bde30b90e8
commit
ec1fc5a17b
7 changed files with 391 additions and 117 deletions
|
@ -29,7 +29,9 @@ void Net::BuildPrototype(v8::Isolate* isolate,
|
|||
v8::Local<v8::FunctionTemplate> prototype) {
|
||||
prototype->SetClassName(mate::StringToV8(isolate, "Net"));
|
||||
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
|
||||
.SetProperty("URLRequest", &Net::URLRequest);
|
||||
.SetProperty("URLRequest", &Net::URLRequest)
|
||||
.SetMethod("RequestGarbageCollectionForTesting",
|
||||
&Net::RequestGarbageCollectionForTesting);
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) {
|
||||
|
@ -37,6 +39,11 @@ v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
|
||||
void Net::RequestGarbageCollectionForTesting() {
|
||||
isolate()->RequestGarbageCollectionForTesting(
|
||||
v8::Isolate::GarbageCollectionType::kFullGarbageCollection);
|
||||
}
|
||||
|
||||
|
||||
} // namespace api
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue