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

Unified Diff: android_webview/native/aw_contents_io_thread_client_impl.cc

Issue 135443002: Fix race condition introduced in r242200 where AwContentsIoThreadClient is queried before a subfram… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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
Index: android_webview/native/aw_contents_io_thread_client_impl.cc
===================================================================
--- android_webview/native/aw_contents_io_thread_client_impl.cc (revision 244357)
+++ android_webview/native/aw_contents_io_thread_client_impl.cc (working copy)
@@ -166,6 +166,22 @@
}
// static
+void AwContentsIoThreadClient::SubFrameCreated(int render_process_id,
+ int parent_render_frame_id,
+ int child_render_frame_id) {
+ pair<int, int> parent_rfh_id(render_process_id, parent_render_frame_id);
+ pair<int, int> child_rfh_id(render_process_id, child_render_frame_id);
+ IoThreadClientData client_data;
+ if (!RfhToIoThreadClientMap::GetInstance()->Get(parent_rfh_id,
+ &client_data)) {
+ NOTREACHED();
+ return;
+ }
+
+ RfhToIoThreadClientMap::GetInstance()->Set(child_rfh_id, client_data);
+}
+
+// static
void AwContentsIoThreadClientImpl::RegisterPendingContents(
WebContents* web_contents) {
IoThreadClientData client_data;
« no previous file with comments | « android_webview/common/render_view_messages.h ('k') | android_webview/renderer/aw_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698