Run Tizen Webapps in single process mode
[platform/framework/web/crosswalk-tizen.git] / atom / browser / api / event_emitter.h
index ead3bed..b3884b7 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "atom/common/api/event_emitter_caller.h"
 #include "native_mate/wrappable.h"
+#include "tizen/common/env_variables.h"
 
 namespace content {
 class WebContents;
@@ -77,7 +78,8 @@ class EventEmitter : public Wrappable<T> {
                       content::WebContents* sender,
                       IPC::Message* message,
                       const Args&... args) {
-    v8::Locker locker(isolate());
+    if (!::tizen::is_single_process)
+        v8::Locker locker(isolate());
     v8::HandleScope handle_scope(isolate());
     v8::Local<v8::Object> event = internal::CreateJSEvent(
         isolate(), GetWrapper(), sender, message);
@@ -93,7 +95,8 @@ class EventEmitter : public Wrappable<T> {
   bool EmitWithEvent(const base::StringPiece& name,
                      v8::Local<v8::Object> event,
                      const Args&... args) {
-    v8::Locker locker(isolate());
+    if (!::tizen::is_single_process)
+        v8::Locker locker(isolate());
     v8::HandleScope handle_scope(isolate());
     EmitEvent(isolate(), GetWrapper(), name, event, args...);
     return event->Get(