void ExtensionServer::RegisterExtension(const std::string& path) {
Extension* ext = new Extension(path, this);
- LOGGER(DEBUG) << "Register " << path;
if (!ext->Initialize() || !RegisterSymbols(ext)) {
delete ext;
return;
}
extensions_[ext->name()] = ext;
+ LOGGER(DEBUG) << ext->name() << " is registered.";
}
void ExtensionServer::RegisterSystemExtensions() {
// set callbacks
using std::placeholders::_1;
- instance->SetSendSyncReplyCallback(
- std::bind(&ExtensionServer::SyncReplyCallback, this, _1, invocation));
instance->SetPostMessageCallback(
std::bind(&ExtensionServer::PostMessageToJSCallback,
this, connection, instance_id, _1));
}
ExtensionInstance* instance = it->second;
+
+ using std::placeholders::_1;
+ instance->SetSendSyncReplyCallback(
+ std::bind(&ExtensionServer::SyncReplyCallback, this, _1, invocation));
+
instance->HandleSyncMessage(msg);
// reponse will be sent by SyncReplyCallback()