Fix leak of handle when emitting events
This commit is contained in:
parent
0ddf90815b
commit
e99b8c3a2b
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ class EventEmitter : public Wrappable {
|
|||
content::WebContents* sender,
|
||||
IPC::Message* message,
|
||||
const Args&... args) {
|
||||
v8::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
v8::Local<v8::Object> event = CreateJSEvent(isolate(), sender, message);
|
||||
return EmitWithEvent(name, event, args...);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue