WebWorkerObserver should be destroyed on exit
authorCheng Zhao <zcbenz@gmail.com>
Fri, 10 Mar 2017 06:35:44 +0000 (15:35 +0900)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 20 Mar 2017 19:52:46 +0000 (12:52 -0700)
atom/renderer/web_worker_observer.cc

index 65ca81c..aa335a9 100644 (file)
@@ -68,6 +68,7 @@ void WebWorkerObserver::ContextWillDestroy(v8::Local<v8::Context> context) {
   node::FreeEnvironment(env);
   atom_bindings_.reset();
   node_bindings_.reset();
+  delete this;
 }
 
 }  // namespace atom