Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: content/browser/renderer_host/text_input_client_mac.mm

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/text_input_client_mac.mm
===================================================================
--- content/browser/renderer_host/text_input_client_mac.mm (revision 133458)
+++ content/browser/renderer_host/text_input_client_mac.mm (working copy)
@@ -6,6 +6,7 @@
#include "base/memory/singleton.h"
#include "base/metrics/histogram.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/text_input_client_messages.h"
@@ -41,6 +42,8 @@
RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh);
rwhi->Send(new TextInputClientMsg_CharacterIndexForPoint(rwhi->GetRoutingID(),
point));
+ // http://crbug.com/121917
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
condition_.TimedWait(base::TimeDelta::FromMilliseconds(kWaitTimeout));
AfterRequest();
@@ -60,6 +63,8 @@
rwhi->Send(
new TextInputClientMsg_FirstRectForCharacterRange(rwhi->GetRoutingID(),
ui::Range(range)));
+ // http://crbug.com/121917
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
condition_.TimedWait(base::TimeDelta::FromMilliseconds(kWaitTimeout));
AfterRequest();
@@ -79,6 +84,8 @@
RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh);
rwhi->Send(new TextInputClientMsg_StringForRange(rwhi->GetRoutingID(),
ui::Range(range)));
+ // http://crbug.com/121917
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
condition_.TimedWait(base::TimeDelta::FromMilliseconds(kWaitTimeout));
AfterRequest();
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.cc ('k') | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698