No issue - add API to tell Profile Timeline Recording state to JS engine

Based-on: m-c 1342070/5
This commit is contained in:
Martok 2023-01-21 22:48:18 +01:00 committed by roytam1
commit 531906eb87
3 changed files with 37 additions and 0 deletions

View file

@ -1276,6 +1276,20 @@ JS::detail::ComputeThis(JSContext* cx, Value* vp)
return thisv;
}
static bool gProfileTimelineRecordingEnabled = false;
JS_PUBLIC_API(void)
JS::SetProfileTimelineRecordingEnabled(bool enabled)
{
gProfileTimelineRecordingEnabled = enabled;
}
JS_PUBLIC_API(bool)
JS::IsProfileTimelineRecordingEnabled()
{
return gProfileTimelineRecordingEnabled;
}
JS_PUBLIC_API(void*)
JS_malloc(JSContext* cx, size_t nbytes)
{