Skip to content

Commit 39f37f7

Browse files
committed
fix: Errors during merge
* Use `makeString` instead of the removed `String::format` * Fix typos * Revive `JSON` in `CommonIdentifiers` * Remove wrongly duplicated or resurrected lines in `JSObject`, `ThrowScope` and `VM` * Fix CMake script errors * Add `gnu++17` option in WebKitCompilerFlags.cmake (taken from the `WebKit.xcworkspace`)
1 parent 0daa219 commit 39f37f7

File tree

12 files changed

+24
-27
lines changed

12 files changed

+24
-27
lines changed

Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString& errorString, int li
467467
int columnNumber = optionalColumnNumber ? *optionalColumnNumber : 0;
468468
bool isRegex = optionalURLRegex;
469469

470-
String breakpointIdentifier = makeString(isRegex ? "/" + url + "/" : optionalScriptHash ? "#" + url : url), ':', String::number(lineNumber), ':', String::number(columnNumber);
470+
String breakpointIdentifier = makeString(isRegex ? "/" + url + "/" : optionalScriptHash ? "#" + url : url, ':', String::number(lineNumber), ':', String::number(columnNumber));
471471
if (m_javaScriptBreakpoints.contains(breakpointIdentifier)) {
472472
errorString = "Breakpoint at specified location already exists."_s;
473473
return;

Source/JavaScriptCore/parser/ModuleAnalyzer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void ModuleAnalyzer::ensureDefaultExportIfNothingExported() {
168168
if (error.isValid()) {
169169
auto consoleMsgArgs = Inspector::ScriptArguments::create(*m_exec,
170170
{
171-
Strong<JSC::Unknown>(*m_vm, jsString(m_exec, String::format("Error parsing default export for key: %s. Source: '%s'", m_moduleRecord->moduleKey().utf8().data(), defaultExportSrc))),
171+
Strong<JSC::Unknown>(*m_vm, jsString(m_exec, makeString("Error parsing default export for key: ", m_moduleRecord->moduleKey().utf8().data(), ". Source: '", defaultExportSrc,"'"))),
172172
Strong<JSC::Unknown>(*m_vm, jsString(m_exec, error.message())),
173173
});
174174
ConsoleClient::printConsoleMessageWithArguments(MessageSource::JS,

Source/JavaScriptCore/runtime/CommonIdentifiers.h

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
macro(Function) \
4040
macro(Infinity) \
4141
macro(Intl) \
42+
macro(JSON) \
4243
macro(Loader) \
4344
macro(Map) \
4445
macro(NaN) \

Source/JavaScriptCore/runtime/JSGlobalObject.h

-4
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,6 @@ class JSGlobalObject : public JSSegmentedVariableObject {
510510
ConsoleClient* m_consoleClient { nullptr };
511511
Optional<unsigned> m_stackTraceLimit;
512512

513-
#if !ASSERT_DISABLED
514-
const ExecState* m_callFrameAtDebuggerEntry { nullptr };
515-
#endif
516-
517513
#if !ASSERT_DISABLED
518514
const ExecState* m_callFrameAtDebuggerEntry { nullptr };
519515
#endif

Source/JavaScriptCore/runtime/JSObject.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,8 @@ bool JSObject::putInlineSlow(ExecState* exec, PropertyName propertyName, JSValue
795795
obj->methodTable(vm)->doPutPropertySecurityCheck(obj, exec, propertyName, slot);
796796
RETURN_IF_EXCEPTION(scope, false);
797797
}
798+
798799
unsigned attributes;
799-
PropertyOffset offset = obj->structure(vm)->get(vm, propertyName, attributes);
800800
auto getOwnPropertySlotPtr = obj->methodTable(vm)->getOwnPropertySlot;
801801
if (getOwnPropertySlotPtr != JSObject::getOwnPropertySlot && getOwnPropertySlotPtr != JSFunction::getOwnPropertySlot) {
802802
auto scope = DECLARE_CATCH_SCOPE(vm);
@@ -807,7 +807,8 @@ bool JSObject::putInlineSlow(ExecState* exec, PropertyName propertyName, JSValue
807807
scope.clearException();
808808
}
809809
}
810-
PropertyOffset offset = structure->get(vm, propertyName, attributes);
810+
811+
PropertyOffset offset = obj->structure(vm)->get(vm, propertyName, attributes);
811812
if (isValidOffset(offset)) {
812813
if (attributes & PropertyAttribute::ReadOnly) {
813814
ASSERT(this->prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this);

Source/JavaScriptCore/runtime/ThrowScope.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ Exception* ThrowScope::throwException(ExecState* exec, JSValue error)
5656

5757
Exception* ThrowScope::throwException(ExecState* exec, JSObject* obj)
5858
{
59-
if (!jsDynamicCast<Exception*>(m_vm, obj))
60-
m_vm.verifyExceptionCheckNeedIsSatisfied(m_recursionDepth, m_location);
61-
6259
#ifndef NDEBUG
6360
m_vm.verifyExceptionCheckNeedIsSatisfied(m_recursionDepth, m_location);
6461
#endif // NDEBUG

Source/JavaScriptCore/runtime/VM.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ VM::VM(VMType vmType, HeapType heapType)
327327
, functionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSFunction)
328328
, internalFunctionSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), InternalFunction)
329329
, nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable)
330-
, nativeStdFunctionSpace ISO_SUBSPACE_INIT(heap, cellJSValueOOBHeapCellType.get(), JSNativeStdFunction)
331330

332331
, tnsFunctionWrapperSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), _TNS_FunctionWrapper)
333332
, tnsCFunctionWrapperSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), _TNS_CFunctionWrapper)

Source/JavaScriptCore/runtime/VM.h

-7
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,6 @@ class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> {
373373
CompleteSubspace destructibleObjectSpace;
374374
CompleteSubspace eagerlySweptDestructibleObjectSpace;
375375

376-
IsoSubspace arrayBufferConstructorSpace;
377-
IsoSubspace asyncFunctionSpace;
378-
IsoSubspace asyncGeneratorFunctionSpace;
379-
IsoSubspace boundFunctionSpace;
380-
IsoSubspace callbackFunctionSpace;
381-
IsoSubspace customGetterSetterFunctionSpace;
382-
IsoSubspace errorConstructorSpace;
383376
IsoSubspace executableToCodeBlockEdgeSpace;
384377
IsoSubspace functionSpace;
385378
IsoSubspace internalFunctionSpace;

Source/WTF/wtf/PlatformMac.cmake

+6-6
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ list(APPEND WTF_SOURCES
8787
)
8888

8989
# TODO Check if we need to remove this
90-
#list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
91-
# ${WTF_DERIVED_SOURCES_DIR}
92-
#)
93-
#
94-
#file(COPY mac/MachExceptions.defs DESTINATION ${WTF_DERIVED_SOURCES_DIR})
95-
#file(COPY "${WTF_DIR}/icu/unicode" DESTINATION ${WTF_DERIVED_SOURCES_DIR})
90+
list(APPEND WTF_PRIVATE_INCLUDE_DIRECTORIES
91+
${WTF_DERIVED_SOURCES_DIR}
92+
)
93+
94+
file(COPY mac/MachExceptions.defs DESTINATION ${WTF_DERIVED_SOURCES_DIR})
95+
file(COPY "${WTF_DIR}/icu/unicode" DESTINATION ${WTF_DERIVED_SOURCES_DIR})
9696

9797
add_custom_command(
9898
OUTPUT

Source/cmake/OptionsMac.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ WEBKIT_OPTION_BEGIN()
44
# Private options shared with other WebKit ports. Add options here only if
55
# we need a value different from the default defined in WebKitFeatures.cmake.
66
# FIXME: Many of these defaults differ from the XCode build.
7-
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_OVERFLOW_SCROLLING PRIVATE ON)
87
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_OVERFLOW_SCROLLING_TOUCH PRIVATE ON)
98

109
#TODO: DELETE IF UNUSED

Source/cmake/WebKitCompilerFlags.cmake

+11
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target)
8787
endmacro()
8888

8989

90+
if (CMAKE_GENERATOR STREQUAL "Xcode")
91+
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS("$(inherited)")
92+
endif ()
93+
9094
if (COMPILER_IS_GCC_OR_CLANG)
9195
WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-strict-aliasing)
9296

@@ -104,6 +108,13 @@ if (COMPILER_IS_GCC_OR_CLANG)
104108
WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
105109
WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti)
106110

111+
check_cxx_compiler_flag("-std=gnu++17" CXX_COMPILER_SUPPORTS_CXX17)
112+
if (CXX_COMPILER_SUPPORTS_CXX17)
113+
WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=gnu++17)
114+
else ()
115+
message(FATAL_ERROR "Compiler with C++17 support is required")
116+
endif ()
117+
107118
if (WIN32)
108119
WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-mno-ms-bitfields)
109120
WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-unknown-pragmas)

Tools/Scripts/webkitperl/FeatureList.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ my @features = (
192192
define => "ENABLE_ACCELERATED_2D_CANVAS", value => \$accelerated2DCanvasSupport },
193193

194194
{ option => "accelerated-overflow-scrolling", desc => "Toggle accelerated scrolling support",
195-
define => "ENABLE_ACCELERATED_OVERFLOW_SCROLLING", value => \$acceleratedOverflowScrollingSupport },
195+
define => "ENABLE_OVERFLOW_SCROLLING_TOUCH", value => \$acceleratedOverflowScrollingSupport },
196196

197197
{ option => "apple-pay", desc => "Toggle Apply Pay support",
198198
define => "ENABLE_APPLE_PAY", value => \$applePaySupport },

0 commit comments

Comments
 (0)