|
@@ -12,6 +12,7 @@
|
|
|
#include "atom/common/promise_util.h"
|
|
|
#include "base/bind.h"
|
|
|
#include "base/files/file_util.h"
|
|
|
+#include "base/threading/thread_restrictions.h"
|
|
|
#include "content/public/browser/tracing_controller.h"
|
|
|
#include "native_mate/dictionary.h"
|
|
|
|
|
@@ -58,6 +59,11 @@ scoped_refptr<TracingController::TraceDataEndpoint> GetTraceDataEndpoint(
|
|
|
const base::FilePath& path,
|
|
|
const CompletionCallback& callback) {
|
|
|
base::FilePath result_file_path = path;
|
|
|
+
|
|
|
+ // base::CreateTemporaryFile prevents blocking so we need to allow it
|
|
|
+ // for now since offloading this to a different sequence would require
|
|
|
+ // changing the api shape
|
|
|
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
|
|
|
if (result_file_path.empty() && !base::CreateTemporaryFile(&result_file_path))
|
|
|
LOG(ERROR) << "Creating temporary file failed";
|
|
|
|