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

Side by Side Diff: chrome/browser/browser_accessibility_manager.cc

Issue 12402: Don't reenter Webkit, while it waits for outgoing sync calls to complete. Thi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/browser_accessibility_manager.h" 5 #include "chrome/browser/browser_accessibility_manager.h"
6 6
7 #include "chrome/browser/browser_accessibility.h" 7 #include "chrome/browser/browser_accessibility.h"
8 #include "chrome/browser/render_process_host.h" 8 #include "chrome/browser/render_process_host.h"
9 #include "chrome/browser/render_widget_host.h" 9 #include "chrome/browser/render_widget_host.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 IPC::SyncMessage* msg = 102 IPC::SyncMessage* msg =
103 new ViewMsg_GetAccessibilityInfo( 103 new ViewMsg_GetAccessibilityInfo(
104 members->render_widget_host_->routing_id(), in_params, &out_params_); 104 members->render_widget_host_->routing_id(), in_params, &out_params_);
105 105
106 bool success = false; 106 bool success = false;
107 if (members->render_widget_host_->process() && 107 if (members->render_widget_host_->process() &&
108 members->render_widget_host_->process()->channel()) { 108 members->render_widget_host_->process()->channel()) {
109 // Necessary for the send to keep the UI responsive. 109 // Necessary for the send to keep the UI responsive.
110 msg->EnableMessagePumping(); 110 msg->EnableMessagePumping();
111 // By default sync calls are unblocking, i.e if the receiver is an outgoing
112 // sync call, it will process received sync calls. Webkit is not reentrant.
113 // We don't want to reenter Webkit if it is in an outgoing sync call.
114 msg->set_unblock(false);
111 success = members->render_widget_host_->process()->channel()-> 115 success = members->render_widget_host_->process()->channel()->
112 SendWithTimeout(msg, kAccessibilityMessageTimeOut); 116 SendWithTimeout(msg, kAccessibilityMessageTimeOut);
113 } 117 }
114 118
115 return success; 119 return success;
116 } 120 }
117 121
118 ViewHostMsg_Accessibility_Out_Params BrowserAccessibilityManager::response() { 122 ViewHostMsg_Accessibility_Out_Params BrowserAccessibilityManager::response() {
119 return out_params_; 123 return out_params_;
120 } 124 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 168
165 // Delete entry also from InstanceMap. 169 // Delete entry also from InstanceMap.
166 InstanceMap::iterator it2 = instance_map_.find(it->second->instance_id()); 170 InstanceMap::iterator it2 = instance_map_.find(it->second->instance_id());
167 171
168 if (it2 != instance_map_.end()) 172 if (it2 != instance_map_.end())
169 instance_map_.erase(it2); 173 instance_map_.erase(it2);
170 174
171 // Only delete the first entry once it is no longer in use. 175 // Only delete the first entry once it is no longer in use.
172 render_process_host_map_.erase(it); 176 render_process_host_map_.erase(it);
173 } 177 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698