11diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp
2- index e5befdfd0a3d..7ad0e465b421 100644
2+ index 04f2c970c220..da6b3eb131cb 100644
33--- a/Source/JavaScriptCore/jsc.cpp
44+++ b/Source/JavaScriptCore/jsc.cpp
55@@ -162,7 +162,96 @@ struct MemoryFootprint {
@@ -125,7 +125,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
125125 bool m_dump { false };
126126 bool m_module { false };
127127 bool m_exitCode { false };
128- @@ -667 ,6 +759 ,8 @@ private:
128+ @@ -666 ,6 +758 ,8 @@ private:
129129 addFunction(vm, "mallocInALoop", functionMallocInALoop, 0);
130130 addFunction(vm, "totalCompileTime", functionTotalCompileTime, 0);
131131
@@ -134,15 +134,15 @@ index e5befdfd0a3d..7ad0e465b421 100644
134134 addFunction(vm, "setUnhandledRejectionCallback", functionSetUnhandledRejectionCallback, 1);
135135
136136 addFunction(vm, "asDoubleNumber", functionAsDoubleNumber, 1);
137- @@ -715 ,6 +809 ,7 @@ private:
137+ @@ -714 ,6 +808 ,7 @@ private:
138138 static Identifier moduleLoaderResolve(JSGlobalObject*, JSModuleLoader*, JSValue, JSValue, JSValue);
139139 static JSInternalPromise* moduleLoaderFetch(JSGlobalObject*, JSModuleLoader*, JSValue, JSValue, JSValue);
140140 static JSObject* moduleLoaderCreateImportMetaProperties(JSGlobalObject*, JSModuleLoader*, JSValue, JSModuleRecord*, JSValue);
141141+ static void promiseRejectionTracker(JSGlobalObject*, JSPromise*, JSPromiseRejectionOperation);
142142
143143 static void reportUncaughtExceptionAtEventLoop(JSGlobalObject*, Exception*);
144144 };
145- @@ -738 ,7 +833 ,7 @@ const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = {
145+ @@ -737 ,7 +832 ,7 @@ const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = {
146146 &moduleLoaderFetch,
147147 &moduleLoaderCreateImportMetaProperties,
148148 nullptr, // moduleLoaderEvaluate
@@ -151,7 +151,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
151151 &reportUncaughtExceptionAtEventLoop,
152152 ¤tScriptExecutionOwner,
153153 &scriptExecutionStatus,
154- @@ -1231 ,6 +1326 ,18 @@ JSObject* GlobalObject::moduleLoaderCreateImportMetaProperties(JSGlobalObject* g
154+ @@ -1230 ,6 +1325 ,18 @@ JSObject* GlobalObject::moduleLoaderCreateImportMetaProperties(JSGlobalObject* g
155155 return metaProperties;
156156 }
157157
@@ -170,7 +170,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
170170 static CString cStringFromViewWithString(JSGlobalObject* globalObject, ThrowScope& scope, StringViewWithUnderlyingString& viewWithString)
171171 {
172172 Expected<CString, UTF8ConversionError> expectedString = viewWithString.view.tryGetUtf8();
173- @@ -1297 ,6 +1404 ,55 @@ JSC_DEFINE_HOST_FUNCTION(functionPrintStdErr, (JSGlobalObject* globalObject, Cal
173+ @@ -1296 ,6 +1403 ,55 @@ JSC_DEFINE_HOST_FUNCTION(functionPrintStdErr, (JSGlobalObject* globalObject, Cal
174174 return printInternal(globalObject, callFrame, stderr);
175175 }
176176
@@ -226,7 +226,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
226226 JSC_DEFINE_HOST_FUNCTION(functionDebug, (JSGlobalObject* globalObject, CallFrame* callFrame))
227227 {
228228 VM& vm = globalObject->vm();
229- @@ -3018 ,7 +3174 ,15 @@ static void runWithOptions(GlobalObject* globalObject, CommandLine& options, boo
229+ @@ -3017 ,7 +3173 ,15 @@ static void runWithOptions(GlobalObject* globalObject, CommandLine& options, boo
230230 for (size_t i = 0; i < scripts.size(); i++) {
231231 JSInternalPromise* promise = nullptr;
232232 bool isModule = options.m_module || scripts[i].scriptType == Script::ScriptType::Module;
@@ -243,15 +243,15 @@ index e5befdfd0a3d..7ad0e465b421 100644
243243 fileName = scripts[i].argument;
244244 if (scripts[i].strictMode == Script::StrictMode::Strict)
245245 scriptBuffer.append("\"use strict\";\n", strlen("\"use strict\";\n"));
246- @@ -3173 ,6 +3337 ,7 @@ static NO_RETURN void printUsageStatement(bool help = false)
246+ @@ -3172 ,6 +3336 ,7 @@ static NO_RETURN void printUsageStatement(bool help = false)
247247 fprintf(stderr, " -f Specifies a source file (deprecated)\n");
248248 fprintf(stderr, " -h|--help Prints this help message\n");
249249 fprintf(stderr, " -i Enables interactive mode (default if no files are specified)\n");
250250+ fprintf(stderr, " --reprl Enables REPRL mode (used by the Fuzzilli fuzzer)\n");
251251 fprintf(stderr, " -m Execute as a module\n");
252252 #if OS(UNIX)
253253 fprintf(stderr, " -s Installs signal handlers that exit on a crash (Unix platforms only, lldb will not work with this option) \n");
254- @@ -3258 ,6 +3423 ,11 @@ void CommandLine::parseArguments(int argc, char** argv)
254+ @@ -3257 ,6 +3422 ,11 @@ void CommandLine::parseArguments(int argc, char** argv)
255255 m_interactive = true;
256256 continue;
257257 }
@@ -263,7 +263,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
263263 if (!strcmp(arg, "-d")) {
264264 m_dump = true;
265265 continue;
266- @@ -3448 ,7 +3618 ,37 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
266+ @@ -3447 ,7 +3617 ,37 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
267267 #endif
268268
269269 int result;
@@ -302,7 +302,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
302302 GlobalObject* globalObject = nullptr;
303303 {
304304 JSLockHolder locker(vm);
305- @@ -3465 ,7 +3665 ,7 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
305+ @@ -3461 ,7 +3661 ,7 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
306306 vm.deferredWorkTimer->runRunLoop();
307307 {
308308 JSLockHolder locker(vm);
@@ -311,7 +311,7 @@ index e5befdfd0a3d..7ad0e465b421 100644
311311 runInteractive(globalObject);
312312 }
313313
314- @@ -3535 ,6 +3735 ,23 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
314+ @@ -3530 ,6 +3730 ,23 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
315315 dataLogLn(*vm.jitSizeStatistics);
316316 #endif
317317
0 commit comments