Run Tizen Webapps in single process mode
[platform/framework/web/crosswalk-tizen.git] / atom / common / native_mate_converters / callback.cc
index a6a500b..611e19c 100644 (file)
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "atom/common/native_mate_converters/callback.h"
+#include "tizen/common/env_variables.h"
 
 using content::BrowserThread;
 
@@ -60,7 +61,7 @@ v8::Local<v8::Value> BindFunctionWith(v8::Isolate* isolate,
 struct DeleteOnUIThread {
   template<typename T>
   static void Destruct(const T* x) {
-    if (Locker::IsBrowserProcess() &&
+    if ((::tizen::is_single_process || Locker::IsBrowserProcess()) &&
         !BrowserThread::CurrentlyOn(BrowserThread::UI)) {
       BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, x);
     } else {