Adding gc tests: fixing a memory leak with C++ URLRequest objects.

This commit is contained in:
ali.ibrahim 2016-10-17 19:02:25 +02:00
parent 9b4e9c642a
commit c198828e58
4 changed files with 95 additions and 27 deletions

View file

@ -215,6 +215,7 @@ URLRequest::BuildArgsArray(ArgTypes... args) const {
template <typename... ArgTypes>
void URLRequest::EmitRequestEvent(ArgTypes... args) {
v8::HandleScope handle_scope(isolate());
auto arguments = BuildArgsArray(args...);
v8::Local<v8::Function> _emitRequestEvent;
auto wrapper = GetWrapper();
@ -225,6 +226,7 @@ void URLRequest::EmitRequestEvent(ArgTypes... args) {
template <typename... ArgTypes>
void URLRequest::EmitResponseEvent(ArgTypes... args) {
v8::HandleScope handle_scope(isolate());
auto arguments = BuildArgsArray(args...);
v8::Local<v8::Function> _emitResponseEvent;
auto wrapper = GetWrapper();