Add jsc initialization markers to cxx bridge

Reviewed By: lexs

Differential Revision: D3303919

fbshipit-source-id: 0dbbe89de9de165a9d7a1597be050f37ed10a878
This commit is contained in:
Michał Gregorczyk
2016-05-17 04:21:19 -07:00
committed by Facebook Github Bot 3
parent 12fcacb58f
commit 89b68419ff

View File

@@ -184,8 +184,15 @@ void JSCExecutor::initOnJSVMThread() {
configureJSCForAndroid(m_jscConfig);
#endif
auto globalClass = JSClassCreate(&kJSClassDefinitionEmpty);
m_context = JSGlobalContextCreateInGroup(nullptr, globalClass);
JSClassRef globalClass = nullptr;
{
SystraceSection s("JSClassCreate");
globalClass = JSClassCreate(&kJSClassDefinitionEmpty);
}
{
SystraceSection s("JSGlobalContextCreateInGroup");
m_context = JSGlobalContextCreateInGroup(nullptr, globalClass);
}
JSClassRelease(globalClass);
// Add a pointer to ourselves so we can retrieve it later in our hooks