Clear protected value maps in RPCServer destructor

This commit is contained in:
Scott Kyle 2016-05-03 11:42:05 -07:00
parent 4fa35b7a12
commit 32219cf0a3
1 changed files with 4 additions and 0 deletions

View File

@ -190,6 +190,10 @@ RPCServer::RPCServer() {
}
RPCServer::~RPCServer() {
// The protected values should be unprotected before releasing the context.
m_objects.clear();
m_callbacks.clear();
get_rpc_server(m_context) = nullptr;
JSGlobalContextRelease(m_context);
}