Index: content/browser/frame_host/debug_urls.cc |
diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc |
index 29915ef9fa83cab5a83ce9f508bee2f225703257..3f6769bac1fc385235637ef1d93177efb1929159 100644 |
--- a/content/browser/frame_host/debug_urls.cc |
+++ b/content/browser/frame_host/debug_urls.cc |
@@ -15,6 +15,7 @@ |
#include "base/debug/profiler.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/synchronization/waitable_event.h" |
+#include "base/threading/thread_restrictions.h" |
#include "cc/base/switches.h" |
#include "content/browser/gpu/gpu_process_host_ui_shim.h" |
#include "content/public/browser/browser_thread.h" |
@@ -150,6 +151,11 @@ bool HandleAsanDebugURL(const GURL& url) { |
} // namespace |
+class ScopedAllowWaitForDebugURL { |
+ private: |
+ base::ThreadRestrictions::ScopedAllowWait wait; |
+}; |
+ |
bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { |
// Ensure that the user explicitly navigated to this URL, unless |
// kEnableGpuBenchmarking is enabled by Telemetry. |
@@ -177,6 +183,7 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { |
} |
if (url == GURL(kChromeUIBrowserUIHang)) { |
+ ScopedAllowWaitForDebugURL allow_wait; |
base::WaitableEvent(false, false).Wait(); |
return true; |
} |