Index: dbus/exported_object.h |
diff --git a/dbus/exported_object.h b/dbus/exported_object.h |
index eae276760c592931b22f85703099b143d616622d..5f74dc2b1e4e68654079ee146299b30abc94004e 100644 |
--- a/dbus/exported_object.h |
+++ b/dbus/exported_object.h |
@@ -66,6 +66,14 @@ class CHROME_DBUS_EXPORT ExportedObject |
// |method_callback| can safely reference objects in the origin thread |
// (i.e. UI thread in most cases). |
// |
+ // IMPORTANT NOTE: You should export all methods before requesting a |
+ // service name by Bus::RequestOwnership/AndBlock(). If you do it in the |
+ // wrong order (i.e. request a service name then export methods), there |
+ // will be a short time period where your service is unable to respond to |
+ // method calls because these methods aren't yet exposed. This race is a |
+ // real problem as clients may start calling methods of your service as |
+ // soon as you acquire a service name, by watching the name owner change. |
+ // |
// BLOCKING CALL. |
virtual bool ExportMethodAndBlock(const std::string& interface_name, |
const std::string& method_name, |