Skip to content

Commit

Permalink
Merge pull request #60 from oven-sh/dylan/upgrade-webkit
Browse files Browse the repository at this point in the history
Dylan/upgrade webkit
  • Loading branch information
Jarred-Sumner authored Jun 29, 2024
2 parents 5ace260 + 7044e17 commit 4732da5
Show file tree
Hide file tree
Showing 18,915 changed files with 1,580,054 additions and 442,817 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,16 @@
# JavaScriptCore

/Source/JavaScriptCore @WebKit/jsc-reviewers
/Source/JavaScriptCore/debugger @dcrousso @patrickangle
/Source/JavaScriptCore/inspector @dcrousso @patrickangle
/JSTests @WebKit/jsc-reviewers
/LayoutTests/js @WebKit/jsc-reviewers
/Tools/TestWebKitAPI/Tests/JavaScriptCore @WebKit/jsc-reviewers

# ================================================================================
# Web Inspector

/Source/JavaScriptCore/debugger @dcrousso @patrickangle
/Source/JavaScriptCore/inspector @dcrousso @patrickangle
/Source/WebCore/inspector @dcrousso @patrickangle
/Source/WebInspectorUI @dcrousso @patrickangle
/Source/WebKit/UIProcess/Inspector @dcrousso @patrickangle
/Source/WebKit/WebProcess/Inspector @dcrousso @patrickangle
/Tools/Scripts/webkitpy/inspector @dcrousso @patrickangle
/LayoutTests/http/tests/inspector @dcrousso @patrickangle
/LayoutTests/http/tests/websocket/tests/hybi/inspector @dcrousso @patrickangle
Expand Down Expand Up @@ -112,6 +109,7 @@
/Source/WebCore/bindings @cdumez
/Source/WebCore/html @cdumez @rniwa
/Source/WebCore/html/UserActivation.* @marcoscaceres
/Source/WebCore/inspector @dcrousso @patrickangle
/Source/WebCore/loader @cdumez
/Source/WebCore/page/Quirks.cpp @brentfulgham @karlcow
/Source/WebCore/workers @cdumez
Expand Down Expand Up @@ -150,9 +148,11 @@
/Source/WebKit/Shared/Sandbox @brentfulgham @pvollan
/Source/WebKit/UIProcess @cdumez
/Source/WebKit/UIProcess/Extensions @b-weinstein @xeenon
/Source/WebKit/UIProcess/Inspector @dcrousso @patrickangle
/Source/WebKit/WebProcess @cdumez
/Source/WebKit/WebProcess/ApplePay @aprotyas
/Source/WebKit/WebProcess/Extensions @b-weinstein @xeenon
/Source/WebKit/WebProcess/Inspector @dcrousso @patrickangle
/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in @brentfulgham @pvollan

# ================================================================================
Expand Down
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
# latter in particular handles loading a bunch of shared CMake definitions
# and loading the cross-compilation settings from CMAKE_TOOLCHAIN_FILE.

cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.20)
project(WebKit)

# Remove this cmake_policy() after upgrading cmake_minimum_required() to 3.20.
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20")
cmake_policy(SET CMP0116 NEW)
endif ()

# -----------------------------------------------------------------------------
# Common configuration
#------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions Configurations/CommonBase.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ OTHER_CPLUSPLUSFLAGS = $(inherited) $(WK_COMMON_OTHER_CPLUSPLUSFLAGS);
WK_COMMON_OTHER_LDFLAGS = $(WK_SANITIZER_OTHER_LDFLAGS);
OTHER_LDFLAGS = $(inherited) $(WK_COMMON_OTHER_LDFLAGS);

WK_COMMON_OTHER_TAPI_FLAGS = -x objective-c++ -std=c++2a -fno-rtti $(WK_SANITIZER_OTHER_TAPI_FLAGS);
WK_COMMON_OTHER_TAPI_FLAGS = -x objective-c++ -std=c++2b -fno-rtti $(WK_SANITIZER_OTHER_TAPI_FLAGS);
OTHER_TAPI_FLAGS = $(inherited) $(WK_COMMON_OTHER_TAPI_FLAGS);

WK_COMMON_WARNING_CFLAGS = -Wall -Wc99-designator -Wconditional-uninitialized -Wextra -Wdeprecated-enum-enum-conversion -Wdeprecated-enum-float-conversion -Wenum-float-conversion -Wfinal-dtor-non-final-class -Wformat=2 -Wmisleading-indentation -Wreorder-init-list -Wundef;
WK_COMMON_WARNING_CFLAGS = -Wall -Wc99-designator -Wconditional-uninitialized -Wextra -Wdeprecated-enum-enum-conversion -Wdeprecated-enum-float-conversion -Wenum-float-conversion -Wfinal-dtor-non-final-class -Wformat=2 -Wmisleading-indentation -Wreorder-init-list -Wundef -Wvla;
WARNING_CFLAGS = $(inherited) $(WK_COMMON_WARNING_CFLAGS) $(WK_SANITIZER_WARNING_CFLAGS);

CLANG_CXX_STANDARD_LIBRARY_HARDENING = extensive;
Expand Down
1 change: 1 addition & 0 deletions Configurations/SDKVariant.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
WK_DEFAULT_PLATFORM_NAME = $(WK_DEFAULT_PLATFORM_NAME_$(WK_EMPTY_$(FALLBACK_PLATFORM_NAME)));
WK_DEFAULT_PLATFORM_NAME_YES = $(PLATFORM_NAME);
WK_DEFAULT_PLATFORM_NAME_ = $(FALLBACK_PLATFORM_NAME);
WK_DEFAULT_PLATFORM_NAME_[sdk=xr*.internal] = $(PLATFORM_NAME);

WK_ALTERNATE_FRAMEWORKS_DIR = $(WK_ALTERNATE_FRAMEWORKS_DIR_$(SDK_VARIANT));
WK_ALTERNATE_FRAMEWORKS_DIR_iosmac = /System/iOSSupport;
Expand Down
4 changes: 3 additions & 1 deletion Configurations/Version.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

MAJOR_VERSION = 619;
MINOR_VERSION = 1;
TINY_VERSION = 13;
TINY_VERSION = 21;
MICRO_VERSION = 0;
NANO_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION);
Expand All @@ -40,6 +40,8 @@ SYSTEM_VERSION_PREFIX_macosx_110000 = 16;
SYSTEM_VERSION_PREFIX_macosx_120000 = 17;
SYSTEM_VERSION_PREFIX_macosx_130000 = 18;
SYSTEM_VERSION_PREFIX_macosx_140000 = 19;
SYSTEM_VERSION_PREFIX_macosx_150000 = 20;
SYSTEM_VERSION_PREFIX_macosx_160000 = 21;
SYSTEM_VERSION_PREFIX[sdk=iphone*] = 8;

// The production build always uses the full version with a system version prefix.
Expand Down
2 changes: 1 addition & 1 deletion Configurations/WebKitProjectPaths.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH = $(BUILT_PRODUCTS_DIR)$(WK_LIBRARY_HEADE
WK_WEBKITADDITIONS_HEADERS_FOLDER_PATH[config=Production] = $(SDK_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH)/WebKitAdditions;

// The root directory of the workspace / WebKit repo is determined by how many directories up "Source" or "Tools" is from the SRCROOT.
WK_WORKSPACE_DIR = $(WK_WORKSPACE_DIR_1_$(SRCROOT:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_2_$(SRCROOT:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_3_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_4_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_5_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath)$(WK_WORKSPACE_DIR_6_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath);
WK_WORKSPACE_DIR = $(WK_WORKSPACE_DIR_1_$(SRCROOT:dir:standardizepath:file):standardizepath:default=$(WK_WORKSPACE_DIR_2_$(SRCROOT:dir:standardizepath:dir:standardizepath:file):standardizepath:default=$(WK_WORKSPACE_DIR_3_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath:default=$(WK_WORKSPACE_DIR_4_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath:default=$(WK_WORKSPACE_DIR_5_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath:default=$(WK_WORKSPACE_DIR_6_$(SRCROOT:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:dir:standardizepath:file):standardizepath))))));
WK_WORKSPACE_DIR_1_Source = $(SRCROOT)/../..;
WK_WORKSPACE_DIR_1_Tools = $(SRCROOT)/../..;
WK_WORKSPACE_DIR_2_Source = $(SRCROOT)/../../..;
Expand Down
12 changes: 10 additions & 2 deletions Configurations/WebKitTargetConditionals.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,19 @@ WK_WATCHOS_11_YES = _WATCHOS_BEFORE_11;
// Xcode

WK_XCODE_BEFORE_15 = $(WK_XCODE_BEFORE_15_$(XCODE_VERSION_MAJOR));
WK_XCODE_BEFORE_15_1200 = YES;
WK_XCODE_BEFORE_15_1300 = YES;
WK_XCODE_BEFORE_15_1400 = YES;

WK_XCODE_15 = $(WK_XCODE_15_$(WK_XCODE_BEFORE_15));
WK_XCODE_15_ = _XCODE_SINCE_15;
WK_XCODE_15_YES = _XCODE_BEFORE_15;

WK_XCODE_BEFORE_15_3 = $(WK_XCODE_BEFORE_15_3$(WK_XCODE_15));
WK_XCODE_BEFORE_15_3_XCODE_BEFORE_15 = YES;
WK_XCODE_BEFORE_15_3_XCODE_SINCE_15 = $(WK_XCODE_BEFORE_15_3_$(XCODE_VERSION_MINOR));
WK_XCODE_BEFORE_15_3_1500 = YES;
WK_XCODE_BEFORE_15_3_1510 = YES;
WK_XCODE_BEFORE_15_3_1520 = YES;

WK_XCODE_15_3 = $(WK_XCODE_15_3_$(WK_XCODE_BEFORE_15_3));
WK_XCODE_15_3_ = _XCODE_SINCE_15_3;
WK_XCODE_15_3_YES = _XCODE_BEFORE_15_3;
4 changes: 2 additions & 2 deletions JSTests/microbenchmarks/exceptions-simd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//@ skip unless $isWasmPlatform
//@ skip unless $isSIMDPlatform
//@ requireOptions("--useWebAssemblySIMD=1")
//@ skip if !$isSIMDPlatform
//@ skip if !$isFTLPlatform
//@ requireOptions("--useExecutableAllocationFuzz=false")

// The purpose of this test is to compare SIMD and non-SIMD versions of this code.
Expand Down
3 changes: 2 additions & 1 deletion JSTests/microbenchmarks/interpreter-wasm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion JSTests/microbenchmarks/large-empty-array-join.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ $skipModes << :lockdown if $memoryLimited
//@ $skipModes << :lockdown if $memoryLimited or $buildType == "debug"
const array = [];
for (let i = 0; i < 100; ++i)
array.push(new Array(1e6).join('—' + i));
6 changes: 2 additions & 4 deletions JSTests/microbenchmarks/memcpy-wasm-large.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if !$isFTLPlatform
//@ skip unless $isWasmPlatform
//@ $skipModes << :lockdown
//@ requireOptions("--useExecutableAllocationFuzz=false")
// Source in wasm/stress/memcpy-wasm
if (typeof WebAssembly === "object") {

function eq(a, b) {
if (a !== b)
Expand Down Expand Up @@ -38,4 +37,3 @@ try {
if (jscOptions().useExecutableAllocationFuzz === false)
throw e
}
}
8 changes: 2 additions & 6 deletions JSTests/microbenchmarks/memcpy-wasm-medium.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if !$isFTLPlatform
//@ skip unless $isWasmPlatform
//@ $skipModes << :lockdown
//@ requireOptions("--useExecutableAllocationFuzz=false")
// Source in wasm/stress/memcpy-wasm

if (typeof WebAssembly === "object") {

function eq(a, b) {
if (a !== b)
throw new Error("Not equal: " + a + " " + b);
Expand Down Expand Up @@ -39,5 +37,3 @@ try {
if (jscOptions().useExecutableAllocationFuzz === false)
throw e
}

}
7 changes: 2 additions & 5 deletions JSTests/microbenchmarks/memcpy-wasm-small.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if !$isFTLPlatform
//@ skip unless $isWasmPlatform
//@ $skipModes << :lockdown
//@ requireOptions("--useExecutableAllocationFuzz=false")
// Source in wasm/stress/memcpy-wasm
if (typeof WebAssembly === "object") {

function eq(a, b) {
if (a !== b)
Expand Down Expand Up @@ -32,5 +31,3 @@ try {
if (jscOptions().useExecutableAllocationFuzz === false)
throw e
}

}
6 changes: 2 additions & 4 deletions JSTests/microbenchmarks/memcpy-wasm.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//@ skip unless $isWasmPlatform
//@ $skipModes << :lockdown
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
//@ skip if !$isFTLPlatform
//@ requireOptions("--useExecutableAllocationFuzz=false")
// Source in wasm/stress/memcpy-wasm
if (typeof WebAssembly === "object") {

function eq(a, b) {
if (a !== b)
Expand Down Expand Up @@ -37,5 +37,3 @@ try {
if (jscOptions().useExecutableAllocationFuzz === false)
throw e
}

}
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/motionmark-image.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions JSTests/microbenchmarks/regexp-match-alphanumeric.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function() {
var result = 0;
var n = 10000000;
let src = "foo bar BAZ1 23% 456q Uu X {Xyzz y78} 9 $$$0Abc";
for (let i = 0; i < n; ++i) {
let re = /[A-Za-z0-9]{3,4}/g;
while (re.test(src))
++result;
}
if (result != n * 7) /* Expect [foo, bar, BAZ1, 456q, Xyzz, y78, 0Abc] */
throw "Error: bad result: " + result;
})();
12 changes: 12 additions & 0 deletions JSTests/microbenchmarks/regexp-match-multiple-single-chars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function() {
var result = 0;
var n = 10000000;
let src = "foo bar BAZ1 23% 456q Uu X {Xyzz y78} 9 $$$0Abc";
for (let i = 0; i < n; ++i) {
let re = /[AaCeGgJjMmNnQqTtWwZz]/g;
while (re.test(src))
++result;
}
if (result != n * 7) /* Expect [a, A, Z, q, z, z, A] */
throw "Error: bad result: " + result;
})();
31 changes: 31 additions & 0 deletions JSTests/microbenchmarks/regexp-match-separators.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
(function() {
var result = 0;
var n = 1000000;
let src = `
function cross(vec<float, 3> a, vec<float, 3> b) {
vec<float, 3> result = {
a.y * b.z - a.z * b.y,
a.z * b.x - a.x * b.z,
a.x * b.y - a.y * b.x
};
return result;
}
function dot(vec<float, 3> a, vec<float, 3> b) {
return a.x * b.x + a.y * b.y + a.z * b.z;
}
function test() {
vec<float, 3> a = { 1, 2, 3 };
vec<float, 3> b = { 400, 500, 600 };
vec<float, 3> c = cross(a, b);
assert(dot(a, c) == 0);
assert(dot(b, c) == 0);
}
`;
for (let i = 0; i < n; ++i) {
let re = /[\(\)\{\}\[\]\<\>\,\.\;]/g;
while (re.test(src))
++result;
}
if (result != n * 89)
throw "Error: bad result: " + result;
})();
2 changes: 2 additions & 0 deletions JSTests/microbenchmarks/segmentation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion JSTests/microbenchmarks/typed-array-from-array.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ $skipModes << :lockdown if $memoryLimited
//@ $skipModes << :lockdown if $memoryLimited or $buildType == "debug"
// Here we're using $memoryLimited as a proxy for "slower device" and this test is very slow in lockdown.

var a1 = new Array(1024 * 1024 * 1);
Expand Down
5 changes: 4 additions & 1 deletion JSTests/microbenchmarks/wasm-cc-int-to-int.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//@runDefault("--useWebAssembly=1")
//@ skip unless $isWasmPlatform
//@ $skipModes << :lockdown
//@ runDefaultWasm("--useWebAssembly=1")

var wasm_code;
try {
wasm_code = read('../../JSTests/microbenchmarks/wasm-cc-int-to-int.wasm', 'binary')
Expand Down
5 changes: 4 additions & 1 deletion JSTests/stress/bigint-toLocaleString.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ shouldBe(BigInt(1).toLocaleString(), '1');
shouldThrow(() => 0n.toLocaleString('i'), RangeError);

// Test that locale parameter is passed through properly.
shouldBe(123456789n.toLocaleString('ar'), '١٢٣٬٤٥٦٬٧٨٩');
if ($vm.icuVersion() >= 74 && $vm.icuMinorVersion() >= 2)
shouldBe(123456789n.toLocaleString('ar'), '123,456,789');
else
shouldBe(123456789n.toLocaleString('ar'), '١٢٣٬٤٥٦٬٧٨٩');
shouldBe(123456789n.toLocaleString('zh-Hans-CN-u-nu-hanidec'), '一二三,四五六,七八九');

// Test that options parameter is passed through properly.
Expand Down
73 changes: 73 additions & 0 deletions JSTests/stress/bound-constructor-change-prototype-clears-cache.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
function empty() {

}

function test1() {
const newTarget = (function () {}).bind();
newTarget.prototype = Object.prototype;

const a = Reflect.construct(Promise, [empty], newTarget);

newTarget.prototype = Array.prototype;

const b = Reflect.construct(Promise, [empty], newTarget);

if (a.__proto__ === b.__proto__)
throw new Error('They should be different.');
}

function test2() {
const newTarget = (function () {}).bind();
newTarget.prototype = Object.prototype;

const newTargetWrapper = Function.prototype.apply;
newTargetWrapper.prototype = newTarget;

class Opt extends Promise {
constructor() {
newTargetWrapper.prototype = new.target;
empty instanceof newTargetWrapper;

super(empty);
}
}

for (let i = 0; i < 200000; i++) {
Reflect.construct(Opt, [], newTarget);
}

const a = Reflect.construct(Opt, [], newTarget);

newTarget.prototype = Array.prototype;
Reflect.construct(Object, [], newTarget);

const b = Reflect.construct(Opt, [], newTarget);

if (a.__proto__ === b.__proto__)
throw new Error('They should be different.');
}

function test3() {
const newTarget = (function () {}).bind();
let prototype = Object.prototype;
Object.defineProperty(newTarget, "prototype", { get() { return prototype; }});

const a = Reflect.construct(Promise, [empty], newTarget);

prototype = Array.prototype;

const b = Reflect.construct(Promise, [empty], newTarget);

if (a.__proto__ == b.__proto__)
throw new Error('They should be different.');
}

function main() {
test1();

test2();

test3();
}

main();
8 changes: 8 additions & 0 deletions JSTests/stress/cloning-check-prototype.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

class Test {field1 = 'foo';}
const t1 = { ...new Test() };
shouldBe(t1 instanceof Test, false);
Loading

0 comments on commit 4732da5

Please sign in to comment.