Fix missing files in OSS build

Reviewed By: danzimm, alexeylang

Differential Revision: D5488648

fbshipit-source-id: 63226fecb374d319e9d5976b724c4c1bdc5181f9
This commit is contained in:
Pieter De Baets
2017-07-26 05:41:05 -07:00
committed by Facebook Github Bot
parent c3e616555e
commit f9808f07c8
6 changed files with 141 additions and 51 deletions

View File

@@ -166,6 +166,14 @@ static bool canUseInspector(JSContextRef context) {
#endif
}
static bool canUseSamplingProfiler(JSContextRef context) {
#if defined(__APPLE__) || defined(WITH_JSC_EXTRA_TRACING)
return JSC_JSSamplingProfilerEnabled(context);
#else
return false;
#endif
}
void JSCExecutor::initOnJSVMThread() throw(JSException) {
SystraceSection s("JSCExecutor::initOnJSVMThread");
@@ -222,7 +230,7 @@ void JSCExecutor::initOnJSVMThread() throw(JSException) {
JSCNativeHooks::installPerfHooks(m_context);
if (JSC_JSSamplingProfilerEnabled(m_context)) {
if (canUseSamplingProfiler(m_context)) {
initSamplingProfilerOnMainJSCThread(m_context);
}
}