Skip to content

Commit 6ea46cc

Browse files
committed
allow IO in nw event handlers
1 parent e5534f9 commit 6ea46cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/api/dispatcher_host.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "content/nw/src/api/dispatcher_host.h"
2222

2323
#include "base/logging.h"
24+
#include "base/threading/thread_restrictions.h"
2425
#include "base/values.h"
2526
#include "content/browser/child_process_security_policy_impl.h"
2627
#include "content/browser/web_contents/web_contents_impl.h"
@@ -67,6 +68,7 @@ bool DispatcherHost::Send(IPC::Message* message) {
6768

6869
bool DispatcherHost::OnMessageReceived(const IPC::Message& message) {
6970
bool handled = true;
71+
base::ThreadRestrictions::ScopedAllowIO allow_io;
7072
IPC_BEGIN_MESSAGE_MAP(DispatcherHost, message)
7173
IPC_MESSAGE_HANDLER(ShellViewHostMsg_Allocate_Object, OnAllocateObject)
7274
IPC_MESSAGE_HANDLER(ShellViewHostMsg_Deallocate_Object, OnDeallocateObject)

0 commit comments

Comments
 (0)