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

Unified Diff: content/browser/android/java/gin_java_bridge_dispatcher_host.h

Issue 498633003: Cache pending JS bridge sync IPC replies, and send in case of RenderFrame deletion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove logging Created 6 years, 4 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: content/browser/android/java/gin_java_bridge_dispatcher_host.h
diff --git a/content/browser/android/java/gin_java_bridge_dispatcher_host.h b/content/browser/android/java/gin_java_bridge_dispatcher_host.h
index 615c2b03770af4197ec1a0799a0cfe3bc4191b65..dc3ee5f3932988438394b9f8049eb9353bb04a6b 100644
--- a/content/browser/android/java/gin_java_bridge_dispatcher_host.h
+++ b/content/browser/android/java/gin_java_bridge_dispatcher_host.h
@@ -114,6 +114,12 @@ class GinJavaBridgeDispatcherHost
typedef std::map<std::string, GinJavaBoundObject::ObjectID> NamedObjectMap;
NamedObjectMap named_objects_;
+ // Keep track of pending calls out to Java such that we can send a synchronous
+ // reply to the renderer waiting on the response should the RenderFrame be
+ // destroyed while the reply is pending.
+ // Only used on the UI thread.
+ std::map<RenderFrameHost*, IPC::Message*> pending_replies_;
boliu 2014/08/22 21:05:17 nit, typedef the type to save typing
benm (inactive) 2014/08/26 15:42:40 Done.
+
DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcherHost);
};

Powered by Google App Engine
This is Rietveld 408576698