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

Unified Diff: content/browser/renderer_host/java/java_bridge_channel_host.h

Issue 8834013: Fix a race condition in the Java Bridge when adding objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/java/java_bridge_channel_host.h
diff --git a/content/browser/renderer_host/java/java_bridge_channel_host.h b/content/browser/renderer_host/java/java_bridge_channel_host.h
index 424d42eec6fbc6013d40cb97392cc6a6bec610c6..f8948464b2ee7eaa5a78763738c5646f38d577f5 100644
--- a/content/browser/renderer_host/java/java_bridge_channel_host.h
+++ b/content/browser/renderer_host/java/java_bridge_channel_host.h
@@ -11,7 +11,13 @@
class JavaBridgeChannelHost : public NPChannelBase {
public:
static JavaBridgeChannelHost* GetJavaBridgeChannelHost(
- int renderer_id, base::MessageLoopProxy*);
+ int renderer_id,
+ base::MessageLoopProxy* ipc_message_loop);
+
+ // A threadsafe function to generate a unique route ID. Used by the
+ // JavaBridgeDispatcherHost on the UI thread and this class on the WEBKIT
+ // thread.
+ static int ThreadsafeGenerateRouteID();
// NPChannelBase implementation:
virtual int GenerateRouteID() OVERRIDE;
@@ -31,6 +37,9 @@ class JavaBridgeChannelHost : public NPChannelBase {
return new JavaBridgeChannelHost();
}
+ // Message handlers
+ void OnGenerateRouteID(int* route_id);
+
DISALLOW_COPY_AND_ASSIGN(JavaBridgeChannelHost);
};

Powered by Google App Engine
This is Rietveld 408576698