Skip to content

Commit 91d1f15

Browse files
committed
Fix crash in testapi when JSC attempts to use MemoryPressureHandler
JSC attempts to use pressure handler in JSC::Heap::overCriticalMemoryThreshold when BMALLOC_MEMORY_FOOTPRINT_API is enabled.
1 parent 34fe42b commit 91d1f15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/JavaScriptCore/API/tests/testapi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <wtf/Expected.h>
3636
#include <wtf/Noncopyable.h>
3737
#include <wtf/NumberOfCores.h>
38+
#include <wtf/MainThread.h>
3839
#include <wtf/Vector.h>
3940
#include <wtf/text/MakeString.h>
4041
#include <wtf/text/StringCommon.h>
@@ -1184,6 +1185,7 @@ void TestAPI::testBigInt()
11841185

11851186
void configureJSCForTesting()
11861187
{
1188+
WTF::initializeMainThread();
11871189
JSC::Config::configureForTesting();
11881190
JSC::Options::machExceptionHandlerSandboxPolicy = JSC::Options::SandboxPolicy::Allow;
11891191
}

0 commit comments

Comments
 (0)