Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwaldron/89ed9a4bb7a459db8d54c8fe77ead4b1 to your computer and use it in GitHub Desktop.
Save rwaldron/89ed9a4bb7a459db8d54c8fe77ead4b1 to your computer and use it in GitHub Desktop.
From 4aebb770e48493f9ca46ca708a6271c8b0ef3045 Mon Sep 17 00:00:00 2001
From: Rick Waldron <waldron.rick@gmail.com>
Date: Mon, 26 Feb 2018 12:33:54 -0500
Subject: [PATCH] Enable SharedArrayBuffer for Testing
---
Source/WTF/wtf/Platform.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 8ad8441a8..7aad37d3a 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -1217,7 +1217,7 @@
#endif
/* Disable SharedArrayBuffers until Spectre security concerns are mitigated. */
-#define ENABLE_SHARED_ARRAY_BUFFER 0
+#define ENABLE_SHARED_ARRAY_BUFFER 1
#if (OS(DARWIN) && USE(CG)) || (USE(FREETYPE) && !PLATFORM(GTK)) || (PLATFORM(WIN) && (USE(CG) || USE(CAIRO)))
#undef ENABLE_OPENTYPE_MATH
--
2.14.3 (Apple Git-98)
git checkout -- Source/WTF/wtf/Platform.h;
git checkout master;
git pull origin master;
if [ -n `git rev-parse --verify sab-enabled` ]; then
git checkout sab-enabled
else
git checkout -b sab-enabled
fi;
rm 0001-Enable-SharedArrayBuffer-for-Testing.patch
wget https://gist.githubusercontent.com/rwaldron/89ed9a4bb7a459db8d54c8fe77ead4b1/raw/0001-Enable-SharedArrayBuffer-for-Testing.patch
git apply 0001-Enable-SharedArrayBuffer-for-Testing.patch
Tools/Scripts/build-jsc --ftl-jit --debug
# optional, change to correct path
ln -s /Users/rwaldron/clonez/WebKit/WebKitBuild/Debug/jsc /usr/local/bin/jsc-debug
# useful runtime flags
# --useAsyncIterator=true --useBigInt=true --useObjectRestSpread=true
@rwaldron
Copy link
Author

Notes:

Flags cannot be used as boolean:

$ jsc-debug --useAsyncIterator --useBigInt --useObjectRestSpread
ERROR: invalid option: --useAsyncIterator
ERROR: invalid option: --useBigInt
ERROR: invalid option: --useObjectRestSpread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment