Skip to content

Commit 56fad7d

Browse files
authored
Merge pull request #1220 from NativeScript/bektchiev/webkit-13
Update WebKit to 13.2
2 parents a744ddb + 562e4b4 commit 56fad7d

45 files changed

Lines changed: 118 additions & 96 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ set(MAIN_TEMPLATE "${CMAKE_SOURCE_DIR}/cmake/main.m")
5555
set(INFO_PLIST_TEMPLATE "${CMAKE_SOURCE_DIR}/cmake/Info.plist")
5656

5757
#WTF uses unsigned short for UCHAR_TYPE and we need to match it
58-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -stdlib=libc++ -DUCHAR_TYPE=\"unsigned short\"")
58+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -stdlib=libc++ -DUCHAR_TYPE=\"unsigned short\"")
5959

6060
# Override RelWithDebInfo configuration's default optimization O2 to O3
6161
# because we've started releasing NativeScript.framework from it

src/NativeScript/Calling/CFunctionWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CFunctionCall : public FFICall {
2525

2626
DECLARE_INFO;
2727

28-
template <typename CellType>
28+
template <typename CellType, JSC::SubspaceAccess mode>
2929
static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) {
3030
return &vm.tnsCFunctionWrapperSpace;
3131
}

src/NativeScript/Calling/FFICall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class FFICall {
134134
auto scope = DECLARE_THROW_SCOPE(vm);
135135

136136
if (!this->_argumentCountValidator(this, execState)) {
137-
WTF::String message = WTF::String::format("Actual arguments count: \"%lu\". Expected: \"%lu\".", execState->argumentCount(), this->parametersCount());
137+
WTF::String message = makeString("Actual arguments count: \"", execState->argumentCount(), "\". Expected: \"", this->parametersCount(), "\".");
138138
throwException(execState, scope, JSC::createError(execState, message, defaultSourceAppender));
139139
return;
140140
}

src/NativeScript/Calling/FunctionWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class FunctionWrapper : public JSC::InternalFunction {
2424

2525
DECLARE_INFO;
2626

27-
template <typename CellType>
27+
template <typename CellType, JSC::SubspaceAccess mode>
2828
static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) {
2929
return &vm.tnsFunctionWrapperSpace;
3030
}

src/NativeScript/GlobalObject.mm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static EncodedJSValue JSC_HOST_CALL time(ExecState* execState) {
128128
static EncodedJSValue JSC_HOST_CALL releaseNativeCounterpart(ExecState* execState) {
129129
if (execState->argumentCount() != 1) {
130130
auto scope = DECLARE_THROW_SCOPE(execState->vm());
131-
WTF::String message = WTF::String::format("Actual arguments count: \"%lu\". Expected: \"%lu\".", execState->argumentCount(), 1);
131+
WTF::String message = makeString("Actual arguments count: \"", execState->argumentCount(), "\". Expected: \"", 1, "\".");
132132
return JSValue::encode(throwException(execState, scope, JSC::createError(execState, message, defaultSourceAppender)));
133133
}
134134

@@ -412,8 +412,7 @@ static void runLoopBeforeWaitingPerformWork(CFRunLoopObserverRef observer, CFRun
412412
}
413413

414414
if (!symbolWrapper) {
415-
WTF::String errorMessage = WTF::String::format("Metadata for \"%s.%s\" found but symbol not available at runtime.",
416-
symbolMeta->topLevelModule()->getName(), symbolMeta->name(), symbolMeta->name());
415+
WTF::String errorMessage = makeString("Metadata for \"", symbolMeta->topLevelModule()->getName(), ".", symbolMeta->name(), "\" found but symbol not available at runtime.");
417416
JSC::VM& vm = execState->vm();
418417
auto scope = DECLARE_THROW_SCOPE(vm);
419418

src/NativeScript/GlobalObject.moduleLoader.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static mode_t stat(NSString* path) {
298298
}
299299

300300
if (!absoluteFilePath) {
301-
WTF::String errorMessage = WTF::String::format("Could not find module '%s'. Computed path '%s'.", keyValue.toWTFString(execState).utf8().data(), absolutePath.UTF8String);
301+
WTF::String errorMessage = makeString("Could not find module '", keyValue.toWTFString(execState), "'. Computed path '", absolutePath.UTF8String, "'.");
302302
throwException(execState, scope, createError(execState, errorMessage, defaultSourceAppender));
303303
return Identifier();
304304
}
@@ -328,7 +328,7 @@ static mode_t stat(NSString* path) {
328328

329329
String moduleContentStr = WTF::String::fromUTF8((const LChar*)moduleContent.bytes, moduleContent.length);
330330
if (moduleContentStr.isNull() && moduleContent.length > 0) {
331-
return deferred->reject(execState, createTypeError(execState, WTF::String::format("Only UTF-8 character encoding is supported: %s", keyValue.toWTFString(execState).utf8().data())));
331+
return deferred->reject(execState, createTypeError(execState, makeString("Only UTF-8 character encoding is supported: ", keyValue.toWTFString(execState))));
332332
}
333333

334334
WTF::StringBuilder moduleUrl;

src/NativeScript/Interop.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static EncodedJSValue JSC_HOST_CALL interopFuncFree(ExecState* execState) {
165165

166166
if (!pointerValue.inherits(vm, PointerInstance::info())) {
167167
const char* className = PointerInstance::info()->className;
168-
return JSValue::encode(scope.throwException(execState, createError(execState, pointerValue, WTF::String::format("must be a %s.", className), defaultSourceAppender)));
168+
return JSValue::encode(scope.throwException(execState, createError(execState, pointerValue, makeString("must be a ", className, "."), defaultSourceAppender)));
169169
}
170170

171171
PointerInstance* pointer = jsCast<PointerInstance*>(pointerValue);
@@ -187,7 +187,7 @@ static EncodedJSValue JSC_HOST_CALL interopFuncAdopt(ExecState* execState) {
187187
auto scope = DECLARE_THROW_SCOPE(vm);
188188

189189
const char* className = PointerInstance::info()->className;
190-
return JSValue::encode(scope.throwException(execState, createError(execState, WTF::String::format("Argument must be a %s", className))));
190+
return JSValue::encode(scope.throwException(execState, createError(execState, makeString("Argument must be a ", className, "."))));
191191
}
192192

193193
PointerInstance* pointer = jsCast<PointerInstance*>(pointerValue);

src/NativeScript/JSClientData.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <heap/MarkingConstraint.h>
3434
#include <heap/SubspaceInlines.h>
3535
#include <runtime/JSDestructibleObjectHeapCellType.h>
36-
#include <runtime/JSSegmentedVariableObjectHeapCellType.h>
3736
#include <runtime/VM.h>
3837
#include <wtf/MainThread.h>
3938

src/NativeScript/LiveEdit/ClearChangedCellsFunctor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ void ClearChangedCellsFunctor::visit(JSC::HeapCell* heapCell) const {
5555
if (JSC::FunctionCodeBlock* functionCodeBlock = executable->codeBlockForCall()) {
5656
functionCodeBlock->unlinkIncomingCalls();
5757
}
58-
executable->clearNumParametersForCall();
59-
auto& subspace = JSC::VM::ScriptExecutableSpaceAndSet::clearableCodeSetFor(*executable->subspace());
58+
auto& subspace = JSC::VM::SpaceAndSet::setFor(*executable->subspace());
6059
executable->clearCode(subspace);
6160
executable->unlinkedExecutable()->clearCode(m_vm);
6261
}

src/NativeScript/Marshalling/FunctionReference/FunctionReferenceInstance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FunctionReferenceInstance : public JSC::InternalFunction {
2727

2828
DECLARE_INFO;
2929

30-
template <typename CellType>
30+
template <typename CellType, JSC::SubspaceAccess mode>
3131
static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) {
3232
return &vm.tnsFunctionReferenceInstanceSpace;
3333
}

0 commit comments

Comments
 (0)