Run Tizen Webapps in single process mode
[platform/framework/web/crosswalk-tizen.git] / atom / browser / atom_download_manager_delegate.cc
index ccbc434..dc42d4e 100644 (file)
@@ -18,6 +18,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/download_manager.h"
 #include "net/base/filename_util.h"
+#include "tizen/common/env_variables.h"
 
 namespace atom {
 
@@ -38,7 +39,8 @@ AtomDownloadManagerDelegate::~AtomDownloadManagerDelegate() {
 void AtomDownloadManagerDelegate::GetItemSavePath(content::DownloadItem* item,
                                                   base::FilePath* path) {
   v8::Isolate* isolate = v8::Isolate::GetCurrent();
-  v8::Locker locker(isolate);
+  if (!::tizen::is_single_process)
+    v8::Locker locker(isolate);
   v8::HandleScope handle_scope(isolate);
   api::DownloadItem* download = api::DownloadItem::FromWrappedClass(isolate,
                                                                     item);
@@ -102,7 +104,8 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
                                           path.DirName());
 
     v8::Isolate* isolate = v8::Isolate::GetCurrent();
-    v8::Locker locker(isolate);
+    if (!::tizen::is_single_process)
+      v8::Locker locker(isolate);
     v8::HandleScope handle_scope(isolate);
     api::DownloadItem* download_item = api::DownloadItem::FromWrappedClass(
         isolate, item);