Skip to content

Commit 5058969

Browse files
author
Samuel Groß
committed
Updated JSC patch
1 parent 0a83e0c commit 5058969

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Targets/JavaScriptCore/Patches/webkit.patch

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp
2-
index 8afb7634bef9..a738c6ed75e8 100644
2+
index da90478332a7..0a4861c29640 100644
33
--- a/Source/JavaScriptCore/jsc.cpp
44
+++ b/Source/JavaScriptCore/jsc.cpp
5-
@@ -157,7 +157,96 @@ struct MemoryFootprint {
5+
@@ -158,7 +158,96 @@ struct MemoryFootprint {
66
#if !defined(PATH_MAX)
77
#define PATH_MAX 4096
88
#endif
@@ -99,15 +99,15 @@ index 8afb7634bef9..a738c6ed75e8 100644
9999
using namespace JSC;
100100

101101
namespace {
102-
@@ -365,6 +454,7 @@ static JSC_DECLARE_HOST_FUNCTION(functionFlashHeapAccess);
102+
@@ -368,6 +457,7 @@ static JSC_DECLARE_HOST_FUNCTION(functionFlashHeapAccess);
103103
static JSC_DECLARE_HOST_FUNCTION(functionDisableRichSourceInfo);
104104
static JSC_DECLARE_HOST_FUNCTION(functionMallocInALoop);
105105
static JSC_DECLARE_HOST_FUNCTION(functionTotalCompileTime);
106106
+static JSC_DECLARE_HOST_FUNCTION(functionFuzzilli);
107107

108108
static JSC_DECLARE_HOST_FUNCTION(functionSetUnhandledRejectionCallback);
109109
static JSC_DECLARE_HOST_FUNCTION(functionAsDoubleNumber);
110-
@@ -384,7 +474,8 @@ struct Script {
110+
@@ -387,7 +477,8 @@ struct Script {
111111

112112
enum class CodeSource {
113113
File,
@@ -117,15 +117,15 @@ index 8afb7634bef9..a738c6ed75e8 100644
117117
};
118118

119119
StrictMode strictMode;
120-
@@ -420,6 +511,7 @@ public:
120+
@@ -421,6 +512,7 @@ public:
121121
String m_profilerOutput;
122122
String m_uncaughtExceptionName;
123123
bool m_interactive { false };
124124
+ bool m_reprl { false };
125125
bool m_dump { false };
126126
bool m_module { false };
127127
bool m_exitCode { false };
128-
@@ -658,6 +750,8 @@ private:
128+
@@ -662,6 +754,8 @@ private:
129129
addFunction(vm, "mallocInALoop", functionMallocInALoop, 0);
130130
addFunction(vm, "totalCompileTime", functionTotalCompileTime, 0);
131131

@@ -134,15 +134,15 @@ index 8afb7634bef9..a738c6ed75e8 100644
134134
addFunction(vm, "setUnhandledRejectionCallback", functionSetUnhandledRejectionCallback, 1);
135135

136136
addFunction(vm, "asDoubleNumber", functionAsDoubleNumber, 1);
137-
@@ -706,6 +800,7 @@ private:
137+
@@ -710,6 +804,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-
@@ -729,7 +824,7 @@ const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = {
145+
@@ -733,7 +828,7 @@ const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = {
146146
&moduleLoaderFetch,
147147
&moduleLoaderCreateImportMetaProperties,
148148
nullptr, // moduleLoaderEvaluate
@@ -151,7 +151,7 @@ index 8afb7634bef9..a738c6ed75e8 100644
151151
&reportUncaughtExceptionAtEventLoop,
152152
&currentScriptExecutionOwner,
153153
&scriptExecutionStatus,
154-
@@ -1231,6 +1326,18 @@ JSObject* GlobalObject::moduleLoaderCreateImportMetaProperties(JSGlobalObject* g
154+
@@ -1226,6 +1321,18 @@ JSObject* GlobalObject::moduleLoaderCreateImportMetaProperties(JSGlobalObject* g
155155
return metaProperties;
156156
}
157157

@@ -170,7 +170,7 @@ index 8afb7634bef9..a738c6ed75e8 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+
@@ -1292,6 +1399,55 @@ JSC_DEFINE_HOST_FUNCTION(functionPrintStdErr, (JSGlobalObject* globalObject, Cal
174174
return printInternal(globalObject, callFrame, stderr);
175175
}
176176

@@ -226,7 +226,7 @@ index 8afb7634bef9..a738c6ed75e8 100644
226226
JSC_DEFINE_HOST_FUNCTION(functionDebug, (JSGlobalObject* globalObject, CallFrame* callFrame))
227227
{
228228
VM& vm = globalObject->vm();
229-
@@ -2970,7 +3126,15 @@ static void runWithOptions(GlobalObject* globalObject, CommandLine& options, boo
229+
@@ -2994,7 +3150,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 8afb7634bef9..a738c6ed75e8 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-
@@ -3122,6 +3286,7 @@ static NO_RETURN void printUsageStatement(bool help = false)
246+
@@ -3146,6 +3310,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-
@@ -3206,6 +3371,11 @@ void CommandLine::parseArguments(int argc, char** argv)
254+
@@ -3231,6 +3396,11 @@ void CommandLine::parseArguments(int argc, char** argv)
255255
m_interactive = true;
256256
continue;
257257
}
@@ -263,7 +263,7 @@ index 8afb7634bef9..a738c6ed75e8 100644
263263
if (!strcmp(arg, "-d")) {
264264
m_dump = true;
265265
continue;
266-
@@ -3386,7 +3556,37 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
266+
@@ -3416,7 +3586,37 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
267267
#endif
268268

269269
int result;
@@ -302,7 +302,7 @@ index 8afb7634bef9..a738c6ed75e8 100644
302302
GlobalObject* globalObject = nullptr;
303303
{
304304
JSLockHolder locker(vm);
305-
@@ -3403,7 +3603,7 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
305+
@@ -3433,7 +3633,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 8afb7634bef9..a738c6ed75e8 100644
311311
runInteractive(globalObject);
312312
}
313313

314-
@@ -3468,6 +3668,23 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
314+
@@ -3498,6 +3698,23 @@ int runJSC(const CommandLine& options, bool isWorker, const Func& func)
315315
#endif
316316
}
317317

Targets/JavaScriptCore/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c1ed562241eeccf01038f48494c9e3532012e07f
1+
9b4220af4d501aff6ec5e6a5b1217d62ffb36fa2

0 commit comments

Comments
 (0)