diff --git a/packages/bun-uws/src/PerMessageDeflate.h b/packages/bun-uws/src/PerMessageDeflate.h index 67f63321c314..c7e1a8f4ac1b 100644 --- a/packages/bun-uws/src/PerMessageDeflate.h +++ b/packages/bun-uws/src/PerMessageDeflate.h @@ -107,8 +107,6 @@ struct DeflationStream { /* Memory usage is given by 2 ^ (windowBits + 2) + 2 ^ (memLevel + 9) */ int windowBits = -(int) ((compressOptions & _COMPRESSOR_MASK) >> 4), memLevel = compressOptions & 0xF; - //printf("windowBits: %d, memLevel: %d\n", windowBits, memLevel); - deflateInit2(&deflationStream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, windowBits, memLevel, Z_DEFAULT_STRATEGY); } diff --git a/packages/bun-uws/src/WebSocketProtocol.h b/packages/bun-uws/src/WebSocketProtocol.h index 1947efa57d03..88130a86295f 100644 --- a/packages/bun-uws/src/WebSocketProtocol.h +++ b/packages/bun-uws/src/WebSocketProtocol.h @@ -194,8 +194,6 @@ static inline size_t formatMessage(char *dst, const char *src, size_t length, Op dst[0] = (char) ((fin ? 128 : 0) | ((compressed && opCode) ? SND_COMPRESSED : 0) | (char) opCode); - //printf("%d\n", (int)dst[0]); - char mask[4]; if (!isServer) { dst[1] |= 0x80; diff --git a/src/codegen/bindgen.ts b/src/codegen/bindgen.ts index bb9837503b68..2a2ef70c1b85 100644 --- a/src/codegen/bindgen.ts +++ b/src/codegen/bindgen.ts @@ -590,7 +590,6 @@ function getArgumentExceptionHandler(type: TypeImpl, argumentIndex: number, name `WebCore::expectedEnumerationValues<${type.cppClassName()}>()`, ].join(", ")});`, }; - break; } } } @@ -1184,7 +1183,7 @@ cpp.line(); if (needsWebCore) { cpp.line(`namespace WebCore {`); cpp.line(); - for (const [type, reachableType] of typeHashToReachableType) { + for (const [, reachableType] of typeHashToReachableType) { switch (reachableType.kind) { case "stringEnum": emitConvertEnumFunction(cpp, reachableType); diff --git a/src/js/builtins/BunBuiltinNames.h b/src/js/builtins/BunBuiltinNames.h index e2c71153286d..54b95e6c1e9c 100644 --- a/src/js/builtins/BunBuiltinNames.h +++ b/src/js/builtins/BunBuiltinNames.h @@ -229,7 +229,6 @@ class BunBuiltinNames { BUN_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(BUN_DECLARE_BUILTIN_IDENTIFIER_ACCESSOR) #undef BUN_DECLARE_BUILTIN_IDENTIFIER_ACCESSOR - const JSC::Identifier& publicName(Name name) const { return m_publicNames[static_cast(name)]; } const JSC::Identifier& privateName(Name name) const { return m_privateNames[static_cast(name)]; } const JSC::Identifier& resolvePublicName() const { return m_vm.propertyNames->resolve;} diff --git a/src/js/internal/fs/streams.ts b/src/js/internal/fs/streams.ts index 8547718d143b..da7f54225ae5 100644 --- a/src/js/internal/fs/streams.ts +++ b/src/js/internal/fs/streams.ts @@ -519,7 +519,6 @@ function writeAll(data, size, pos, cb, retries = 0) { // Try writing non-zero number of bytes up to 5 times. if (retries > 5) { - // cb($ERR_SYSTEM_ERROR('write failed')); cb(new Error("write failed")); } else if (size) { writeAll.$call(this, buffer.slice(bytesWritten), size, pos, cb, retries); @@ -549,7 +548,6 @@ function writevAll(chunks, size, pos, cb, retries = 0) { // Try writing non-zero number of bytes up to 5 times. if (retries > 5) { - // cb($ERR_SYSTEM_ERROR('writev failed')); cb(new Error("writev failed")); } else if (size) { writevAll.$call(this, [Buffer.concat(buffers).slice(bytesWritten)], size, pos, cb, retries); diff --git a/src/js/internal/util/inspect.js b/src/js/internal/util/inspect.js index 5c89a5cc51e2..e68627735977 100644 --- a/src/js/internal/util/inspect.js +++ b/src/js/internal/util/inspect.js @@ -1028,7 +1028,6 @@ function initializeWellKnownPrototypes() { wellKnownPrototypes.set(Map.prototype, { name: "Map", constructor: Map }); wellKnownPrototypes.set(Object.prototype, { name: "Object", constructor: Object }); wellKnownPrototypes.set(Set.prototype, { name: "Set", constructor: Set }); - // wellKnownPrototypes.set(TypedArray.prototype, { name: "TypedArray", constructor: TypedArray }); } function getConstructorName(obj, ctx, recurseTimes, protoProps) { diff --git a/src/jsc/bindings/BakeAdditionsToGlobalObject.cpp b/src/jsc/bindings/BakeAdditionsToGlobalObject.cpp index ac403b5ec3ec..7ee663fd130a 100644 --- a/src/jsc/bindings/BakeAdditionsToGlobalObject.cpp +++ b/src/jsc/bindings/BakeAdditionsToGlobalObject.cpp @@ -17,7 +17,6 @@ void createDevServerFrameworkRequestArgsStructure(JSC::LazyClassStructure::Initi structure = structure->addPropertyTransition(init.vm, structure, JSC::Identifier::fromString(init.vm, "styles"_s), 0, offset); structure = structure->addPropertyTransition(init.vm, structure, JSC::Identifier::fromString(init.vm, "params"_s), 0, offset); - // init.setPrototype(init.global->objectPrototype()); init.setStructure(structure); } diff --git a/src/jsc/bindings/BunInjectedScriptHost.cpp b/src/jsc/bindings/BunInjectedScriptHost.cpp index dba0f19aecb7..d3a7b0df59dd 100644 --- a/src/jsc/bindings/BunInjectedScriptHost.cpp +++ b/src/jsc/bindings/BunInjectedScriptHost.cpp @@ -68,8 +68,6 @@ static JSObject* objectForEventTargetListeners(VM& vm, JSGlobalObject* exec, Eve continue; auto& jsListener = downcast(eventListener->callback()); - // if (jsListener.isolatedWorld() != ¤tWorld(*exec)) - // continue; auto* jsFunction = jsListener.ensureJSFunction(*scriptExecutionContext); if (!jsFunction) diff --git a/src/jsc/bindings/DOMWrapperWorld.h b/src/jsc/bindings/DOMWrapperWorld.h index 4354ded283c4..5b3de2b54405 100644 --- a/src/jsc/bindings/DOMWrapperWorld.h +++ b/src/jsc/bindings/DOMWrapperWorld.h @@ -39,7 +39,6 @@ inline DOMWrapperWorld& worldForDOMObject(JSC::JSObject& object); inline bool isWorldCompatible(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value) { return true; - // return !value.isObject() || &worldForDOMObject(*value.getObject()) == ¤tWorld(lexicalGlobalObject); } inline DOMWrapperWorld& currentWorld(JSC::JSGlobalObject& lexicalGlobalObject) diff --git a/src/jsc/bindings/ImportMetaObject.cpp b/src/jsc/bindings/ImportMetaObject.cpp index 5eee041298e5..d769dae213f0 100644 --- a/src/jsc/bindings/ImportMetaObject.cpp +++ b/src/jsc/bindings/ImportMetaObject.cpp @@ -7,7 +7,6 @@ #include "ExtendedDOMClientIsoSubspaces.h" #include "ExtendedDOMIsoSubspaces.h" #include "IDLTypes.h" -// #include "JSBlob.h" #include "JSDOMAttribute.h" #include "JSDOMBinding.h" #include "JSDOMConstructor.h" diff --git a/src/jsc/bindings/InspectorHTTPServerAgent.h b/src/jsc/bindings/InspectorHTTPServerAgent.h index 9a8d0ead5ccf..b4051056ba81 100644 --- a/src/jsc/bindings/InspectorHTTPServerAgent.h +++ b/src/jsc/bindings/InspectorHTTPServerAgent.h @@ -13,7 +13,6 @@ namespace Inspector { class FrontendRouter; -class BackendDispatcher; class HTTPServerFrontendDispatcher; enum class DisconnectReason; diff --git a/src/jsc/bindings/JSBuffer.cpp b/src/jsc/bindings/JSBuffer.cpp index 95986d0d7b33..86d1aa728652 100644 --- a/src/jsc/bindings/JSBuffer.cpp +++ b/src/jsc/bindings/JSBuffer.cpp @@ -21,7 +21,6 @@ #include "ExtendedDOMClientIsoSubspaces.h" #include "ExtendedDOMIsoSubspaces.h" #include "IDLTypes.h" -// #include "JSBlob.h" #include "JSDOMAttribute.h" #include "JSDOMBinding.h" #include "JSDOMConstructor.h" @@ -72,7 +71,6 @@ #include #include -// #include #include #include #include diff --git a/src/jsc/bindings/JSMockFunction.cpp b/src/jsc/bindings/JSMockFunction.cpp index 5c09121b9372..ac9deb8e7e27 100644 --- a/src/jsc/bindings/JSMockFunction.cpp +++ b/src/jsc/bindings/JSMockFunction.cpp @@ -1596,7 +1596,6 @@ BUN_DEFINE_HOST_FUNCTION(JSMock__jsSpyOn, (JSC::JSGlobalObject * lexicalGlobalOb object->putDirectAccessor(globalObject, propertyKey, JSC::GetterSetter::create(vm, globalObject, mock, mock), attributes); } - // mock->setName(propertyKey.publicName()); RETURN_IF_EXCEPTION(scope, {}); pushImpl(mock, globalObject, JSMockImplementation::Kind::ReturnValue, value); diff --git a/src/jsc/bindings/SQLClient.cpp b/src/jsc/bindings/SQLClient.cpp index 2a534053e41c..00602609f839 100644 --- a/src/jsc/bindings/SQLClient.cpp +++ b/src/jsc/bindings/SQLClient.cpp @@ -34,7 +34,6 @@ typedef struct ExternColumnIdentifier { BunString name; }; - bool isIndexedColumn() const { return tag == 1; } bool isNamedColumn() const { return tag == 2; } bool isDuplicateColumn() const { return tag == 0; } diff --git a/src/jsc/bindings/napi.h b/src/jsc/bindings/napi.h index 024d45d4b318..a00dc9808993 100644 --- a/src/jsc/bindings/napi.h +++ b/src/jsc/bindings/napi.h @@ -916,7 +916,6 @@ class NapiClass final : public JSC::JSFunction { inline napi_callback constructor() const { return m_constructor; } inline void*& dataPtr() { return m_dataPtr; } - inline void* const& dataPtr() const { return m_dataPtr; } inline napi_env env() const { return m_env; } private: diff --git a/src/jsc/bindings/ncrypto.h b/src/jsc/bindings/ncrypto.h index fcd41c546b0f..cf1fb4bac8d4 100644 --- a/src/jsc/bindings/ncrypto.h +++ b/src/jsc/bindings/ncrypto.h @@ -211,7 +211,6 @@ class X509Pointer; class ECDSASigPointer; class ECGroupPointer; class ECPointPointer; -class ECKeyPointer; class Dsa; class Rsa; class Ec; @@ -229,11 +228,6 @@ template struct Buffer { T* data = nullptr; size_t len = 0; - - static Buffer from(std::span input) - { - return { input.data(), input.size() }; - } }; class Digest final { @@ -255,7 +249,6 @@ class Digest final { size_t size() const; - inline const EVP_MD* get() const { return md_; } inline operator const EVP_MD*() const { return md_; } inline operator bool() const { return md_ != nullptr; } @@ -1038,7 +1031,6 @@ class ECDSASigPointer final { inline bool operator==(std::nullptr_t) noexcept { return sig_ == nullptr; } inline operator bool() const { return sig_ != nullptr; } - inline ECDSA_SIG* get() const { return sig_.get(); } inline operator ECDSA_SIG*() const { return sig_.get(); } void reset(ECDSA_SIG* sig = nullptr); ECDSA_SIG* release(); @@ -1071,7 +1063,6 @@ class ECGroupPointer final { inline bool operator==(std::nullptr_t) noexcept { return group_ == nullptr; } inline operator bool() const { return group_ != nullptr; } - inline EC_GROUP* get() const { return group_.get(); } inline operator EC_GROUP*() const { return group_.get(); } void reset(EC_GROUP* group = nullptr); EC_GROUP* release(); @@ -1208,7 +1199,6 @@ class HMACCtxPointer final { inline bool operator==(std::nullptr_t) noexcept { return ctx_ == nullptr; } inline operator bool() const { return ctx_ != nullptr; } - inline HMAC_CTX* get() const { return ctx_.get(); } inline operator HMAC_CTX*() const { return ctx_.get(); } void reset(HMAC_CTX* ctx = nullptr); HMAC_CTX* release(); diff --git a/src/jsc/bindings/node/JSNodeHTTPServerSocket.h b/src/jsc/bindings/node/JSNodeHTTPServerSocket.h index 0942d0b4772d..9b7afa05b6fe 100644 --- a/src/jsc/bindings/node/JSNodeHTTPServerSocket.h +++ b/src/jsc/bindings/node/JSNodeHTTPServerSocket.h @@ -40,8 +40,6 @@ struct WebSocketData; namespace Bun { -class JSNodeHTTPServerSocketPrototype; - class JSNodeHTTPServerSocket : public JSC::JSDestructibleObject { public: using Base = JSC::JSDestructibleObject; diff --git a/src/jsc/bindings/v8/V8Array.h b/src/jsc/bindings/v8/V8Array.h index f4dde39c616a..b42800e2b629 100644 --- a/src/jsc/bindings/v8/V8Array.h +++ b/src/jsc/bindings/v8/V8Array.h @@ -29,12 +29,9 @@ class Array : public Object { Local context, size_t length, std::function()> next_value_callback); - // Cast a Value to Array (with optional type checking) + // Cast a Value to Array inline static Array* Cast(Value* value) { -#ifdef V8_ENABLE_CHECKS - CheckCast(value); -#endif return static_cast(value); } diff --git a/src/jsc/bindings/webcore/AbortSignal.cpp b/src/jsc/bindings/webcore/AbortSignal.cpp index 93a891a95ace..9ec4516445a6 100644 --- a/src/jsc/bindings/webcore/AbortSignal.cpp +++ b/src/jsc/bindings/webcore/AbortSignal.cpp @@ -28,7 +28,6 @@ #include "AbortAlgorithm.h" #include "DOMException.h" -// #include "DOMTimer.h" #include "Event.h" #include "EventNames.h" #include "JSDOMException.h" diff --git a/src/jsc/bindings/webcore/BufferSource.h b/src/jsc/bindings/webcore/BufferSource.h index 17e8e4a124e1..a2becc8087b3 100644 --- a/src/jsc/bindings/webcore/BufferSource.h +++ b/src/jsc/bindings/webcore/BufferSource.h @@ -43,8 +43,6 @@ class BufferSource { { } - const VariantType& variant() const { return m_variant; } - const uint8_t* data() const { return std::visit([](auto& buffer) -> const uint8_t* { diff --git a/src/jsc/bindings/webcore/CustomEvent.h b/src/jsc/bindings/webcore/CustomEvent.h index 73a93e7ca6b5..2182ed0b9d9e 100644 --- a/src/jsc/bindings/webcore/CustomEvent.h +++ b/src/jsc/bindings/webcore/CustomEvent.h @@ -29,7 +29,6 @@ #include "root.h" #include "Event.h" #include "JSValueInWrappedObject.h" -// #include "SerializedScriptValue.h" namespace WebCore { diff --git a/src/jsc/bindings/webcore/JSAbortSignal.h b/src/jsc/bindings/webcore/JSAbortSignal.h index 7382e1785ca4..cd83a3809054 100644 --- a/src/jsc/bindings/webcore/JSAbortSignal.h +++ b/src/jsc/bindings/webcore/JSAbortSignal.h @@ -89,9 +89,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, AbortSignal*) } JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, AbortSignal&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, AbortSignal* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSAbortSignal; diff --git a/src/jsc/bindings/webcore/JSBroadcastChannel.h b/src/jsc/bindings/webcore/JSBroadcastChannel.h index b45953cf245e..56a0ad6b5e17 100644 --- a/src/jsc/bindings/webcore/JSBroadcastChannel.h +++ b/src/jsc/bindings/webcore/JSBroadcastChannel.h @@ -81,9 +81,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, BroadcastChannel*) } JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, BroadcastChannel&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, BroadcastChannel* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSBroadcastChannel; diff --git a/src/jsc/bindings/webcore/JSCookie.cpp b/src/jsc/bindings/webcore/JSCookie.cpp index 6c44333e31bd..a05f3653355e 100644 --- a/src/jsc/bindings/webcore/JSCookie.cpp +++ b/src/jsc/bindings/webcore/JSCookie.cpp @@ -909,11 +909,6 @@ JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject* globalObj return createWrapper(globalObject, WTF::move(impl)); } -JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, Cookie& impl) -{ - return wrap(lexicalGlobalObject, globalObject, impl); -} - Cookie* JSCookie::toWrapped(JSC::VM& vm, JSC::JSValue value) { if (auto* wrapper = dynamicDowncast(value)) diff --git a/src/jsc/bindings/webcore/JSCookie.h b/src/jsc/bindings/webcore/JSCookie.h index 4cfd1e72a7ef..de4edf0fbc04 100644 --- a/src/jsc/bindings/webcore/JSCookie.h +++ b/src/jsc/bindings/webcore/JSCookie.h @@ -48,10 +48,7 @@ class JSCookie : public JSDOMWrapper { }; JSC::JSValue getInternalProperties(JSC::VM& vm, JSC::JSGlobalObject* lexicalGlobalObject, JSCookie* castedThis); -JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, Cookie&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, Cookie* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSCookie; diff --git a/src/jsc/bindings/webcore/JSDOMConvertPromise.h b/src/jsc/bindings/webcore/JSDOMConvertPromise.h index e3bfe705697b..211d3981953a 100644 --- a/src/jsc/bindings/webcore/JSDOMConvertPromise.h +++ b/src/jsc/bindings/webcore/JSDOMConvertPromise.h @@ -28,7 +28,6 @@ #include "IDLTypes.h" #include "JSDOMConvertBase.h" #include "JSDOMPromise.h" -// #include "WorkerGlobalScope.h" namespace WebCore { diff --git a/src/jsc/bindings/webcore/JSDOMURL.h b/src/jsc/bindings/webcore/JSDOMURL.h index da6d28926b2a..c92897338a62 100644 --- a/src/jsc/bindings/webcore/JSDOMURL.h +++ b/src/jsc/bindings/webcore/JSDOMURL.h @@ -75,7 +75,6 @@ class WEBCORE_EXPORT JSDOMURL : public JSDOMWrapper { WEBCORE_EXPORT JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, DOMURL&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, DOMURL* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSDOMURL; diff --git a/src/jsc/bindings/webcore/JSEventEmitter.h b/src/jsc/bindings/webcore/JSEventEmitter.h index 26abafa8978b..aa119f771808 100644 --- a/src/jsc/bindings/webcore/JSEventEmitter.h +++ b/src/jsc/bindings/webcore/JSEventEmitter.h @@ -64,10 +64,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, EventEmitter*) return &owner.get(); } -JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, EventEmitter&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, EventEmitter* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSEventEmitter; diff --git a/src/jsc/bindings/webcore/JSEventTarget.h b/src/jsc/bindings/webcore/JSEventTarget.h index cfc4b80db1eb..29d73635f60a 100644 --- a/src/jsc/bindings/webcore/JSEventTarget.h +++ b/src/jsc/bindings/webcore/JSEventTarget.h @@ -88,7 +88,6 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, EventTarget*) JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, EventTarget&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, EventTarget* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSEventTarget; diff --git a/src/jsc/bindings/webcore/JSFetchHeaders.h b/src/jsc/bindings/webcore/JSFetchHeaders.h index 19cd9ffb179b..51404bd62ed7 100644 --- a/src/jsc/bindings/webcore/JSFetchHeaders.h +++ b/src/jsc/bindings/webcore/JSFetchHeaders.h @@ -73,7 +73,6 @@ JSC::JSValue getInternalProperties(JSC::VM& vm, JSC::JSGlobalObject* lexicalGlob JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, FetchHeaders&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, FetchHeaders* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSFetchHeaders; diff --git a/src/jsc/bindings/webcore/JSMessageChannelCustom.cpp b/src/jsc/bindings/webcore/JSMessageChannelCustom.cpp index c78026bcfbcb..acf678de8c14 100644 --- a/src/jsc/bindings/webcore/JSMessageChannelCustom.cpp +++ b/src/jsc/bindings/webcore/JSMessageChannelCustom.cpp @@ -27,9 +27,7 @@ #include "DOMWrapperWorld.h" #include "JSMessageChannel.h" -// #include "JSNodeCustom.h" #include "MessagePort.h" -// #include "WebCoreOpaqueRootInlines.h" #include namespace WebCore { diff --git a/src/jsc/bindings/webcore/JSMessageEvent.h b/src/jsc/bindings/webcore/JSMessageEvent.h index 412b2d8380ea..d3857b3b3428 100644 --- a/src/jsc/bindings/webcore/JSMessageEvent.h +++ b/src/jsc/bindings/webcore/JSMessageEvent.h @@ -77,9 +77,7 @@ class JSMessageEvent : public JSEvent { }; JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, MessageEvent&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, MessageEvent* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSMessageEvent; diff --git a/src/jsc/bindings/webcore/JSMessagePort.cpp b/src/jsc/bindings/webcore/JSMessagePort.cpp index fc6e9d1dffa2..f0d298419a74 100644 --- a/src/jsc/bindings/webcore/JSMessagePort.cpp +++ b/src/jsc/bindings/webcore/JSMessagePort.cpp @@ -43,7 +43,6 @@ #include "JSStructuredSerializeOptions.h" #include "ScriptExecutionContext.h" #include "WebCoreJSClientData.h" -// #include "WebCoreOpaqueRootInlines.h" #include #include #include diff --git a/src/jsc/bindings/webcore/JSMessagePort.h b/src/jsc/bindings/webcore/JSMessagePort.h index 9b87bc659ab0..93984386d8f9 100644 --- a/src/jsc/bindings/webcore/JSMessagePort.h +++ b/src/jsc/bindings/webcore/JSMessagePort.h @@ -87,7 +87,6 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, MessagePort*) WEBCORE_EXPORT JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, MessagePort&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, MessagePort* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSMessagePort; diff --git a/src/jsc/bindings/webcore/JSPerformance.h b/src/jsc/bindings/webcore/JSPerformance.h index ac3ff45a173b..b83f1d2d144c 100644 --- a/src/jsc/bindings/webcore/JSPerformance.h +++ b/src/jsc/bindings/webcore/JSPerformance.h @@ -84,7 +84,6 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, Performance*) JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, Performance&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, Performance* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformance; diff --git a/src/jsc/bindings/webcore/JSPerformanceEntry.h b/src/jsc/bindings/webcore/JSPerformanceEntry.h index eb7e35f31f07..e1e650d809e5 100644 --- a/src/jsc/bindings/webcore/JSPerformanceEntry.h +++ b/src/jsc/bindings/webcore/JSPerformanceEntry.h @@ -79,7 +79,6 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, PerformanceEntry*) JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, PerformanceEntry&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, PerformanceEntry* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformanceEntry; diff --git a/src/jsc/bindings/webcore/JSPerformanceMark.h b/src/jsc/bindings/webcore/JSPerformanceMark.h index 851345f61e76..0bd92950be4f 100644 --- a/src/jsc/bindings/webcore/JSPerformanceMark.h +++ b/src/jsc/bindings/webcore/JSPerformanceMark.h @@ -70,9 +70,7 @@ class JSPerformanceMark : public JSPerformanceEntry { }; JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, PerformanceMark&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, PerformanceMark* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformanceMark; diff --git a/src/jsc/bindings/webcore/JSPerformanceObserver.h b/src/jsc/bindings/webcore/JSPerformanceObserver.h index ea0c9640d69b..119220790d88 100644 --- a/src/jsc/bindings/webcore/JSPerformanceObserver.h +++ b/src/jsc/bindings/webcore/JSPerformanceObserver.h @@ -82,9 +82,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, PerformanceObserver* } JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, PerformanceObserver&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, PerformanceObserver* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformanceObserver; diff --git a/src/jsc/bindings/webcore/JSPerformanceObserverEntryList.h b/src/jsc/bindings/webcore/JSPerformanceObserverEntryList.h index c66697cdd35d..dbfda0f5257b 100644 --- a/src/jsc/bindings/webcore/JSPerformanceObserverEntryList.h +++ b/src/jsc/bindings/webcore/JSPerformanceObserverEntryList.h @@ -64,9 +64,7 @@ class JSPerformanceObserverEntryList : public JSDOMWrapper&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformanceObserverEntryList; diff --git a/src/jsc/bindings/webcore/JSPerformanceServerTiming.h b/src/jsc/bindings/webcore/JSPerformanceServerTiming.h index ef742fdbdeee..8af042e9e19a 100644 --- a/src/jsc/bindings/webcore/JSPerformanceServerTiming.h +++ b/src/jsc/bindings/webcore/JSPerformanceServerTiming.h @@ -78,9 +78,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, PerformanceServerTim } JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, PerformanceServerTiming&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, PerformanceServerTiming* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformanceServerTiming; diff --git a/src/jsc/bindings/webcore/JSPerformanceTiming.h b/src/jsc/bindings/webcore/JSPerformanceTiming.h index 722dcc933e70..1caee6b26692 100644 --- a/src/jsc/bindings/webcore/JSPerformanceTiming.h +++ b/src/jsc/bindings/webcore/JSPerformanceTiming.h @@ -79,7 +79,6 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, PerformanceTiming*) JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, PerformanceTiming&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, PerformanceTiming* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSPerformanceTiming; diff --git a/src/jsc/bindings/webcore/JSURLSearchParams.h b/src/jsc/bindings/webcore/JSURLSearchParams.h index 9089dc2ca5ff..74b3100dd2b6 100644 --- a/src/jsc/bindings/webcore/JSURLSearchParams.h +++ b/src/jsc/bindings/webcore/JSURLSearchParams.h @@ -65,9 +65,7 @@ class JSURLSearchParams : public JSDOMWrapper { }; JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, URLSearchParams&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, URLSearchParams* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } JSC::JSValue getInternalProperties(JSC::VM& vm, JSC::JSGlobalObject* lexicalGlobalObject, JSURLSearchParams* castedThis); diff --git a/src/jsc/bindings/webcore/JSWebSocket.h b/src/jsc/bindings/webcore/JSWebSocket.h index f4e29bd79f38..aaf59d666039 100644 --- a/src/jsc/bindings/webcore/JSWebSocket.h +++ b/src/jsc/bindings/webcore/JSWebSocket.h @@ -82,9 +82,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, WebSocket*) } JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, WebSocket&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, WebSocket* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSWebSocket; diff --git a/src/jsc/bindings/webcore/JSWorker.h b/src/jsc/bindings/webcore/JSWorker.h index c7f717a253fb..1adb71faa545 100644 --- a/src/jsc/bindings/webcore/JSWorker.h +++ b/src/jsc/bindings/webcore/JSWorker.h @@ -81,9 +81,7 @@ inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, Worker*) } JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, Worker&); -inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, Worker* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSWorker; diff --git a/src/jsc/bindings/webcore/MessageEvent.cpp b/src/jsc/bindings/webcore/MessageEvent.cpp index 7847f3bc2bf5..684b3716762f 100644 --- a/src/jsc/bindings/webcore/MessageEvent.cpp +++ b/src/jsc/bindings/webcore/MessageEvent.cpp @@ -28,7 +28,6 @@ #include "config.h" #include "MessageEvent.h" -// #include "Blob.h" #include "EventNames.h" #include "JSDOMConvert.h" #include "JSMessageEvent.h" diff --git a/src/jsc/bindings/webcore/PerformanceEntry.cpp b/src/jsc/bindings/webcore/PerformanceEntry.cpp index e44f67a685aa..b357c8d08080 100644 --- a/src/jsc/bindings/webcore/PerformanceEntry.cpp +++ b/src/jsc/bindings/webcore/PerformanceEntry.cpp @@ -35,8 +35,6 @@ #include "PerformanceMeasure.h" #include "PerformanceResourceTiming.h" -// #include "DeprecatedGlobalSettings.h" - namespace WebCore { DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(PerformanceEntry); diff --git a/src/jsc/bindings/webcore/ResourceTiming.h b/src/jsc/bindings/webcore/ResourceTiming.h index 587b0d7707cf..05f425c6fd06 100644 --- a/src/jsc/bindings/webcore/ResourceTiming.h +++ b/src/jsc/bindings/webcore/ResourceTiming.h @@ -25,7 +25,6 @@ #pragma once -// #include "LoaderMalloc.h" #include "NetworkLoadMetrics.h" #include "ResourceLoadTiming.h" #include "ServerTiming.h" diff --git a/src/jsc/bindings/webcrypto/JSCryptoKey.h b/src/jsc/bindings/webcrypto/JSCryptoKey.h index 60572bd76fa6..e6f67422187d 100644 --- a/src/jsc/bindings/webcrypto/JSCryptoKey.h +++ b/src/jsc/bindings/webcrypto/JSCryptoKey.h @@ -73,7 +73,6 @@ class JSCryptoKey : public JSDOMWrapper { JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, CryptoKey&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, CryptoKey* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSCryptoKey; diff --git a/src/jsc/bindings/webcrypto/JSSubtleCrypto.h b/src/jsc/bindings/webcrypto/JSSubtleCrypto.h index bc85a2031a22..e50ece9fbbf8 100644 --- a/src/jsc/bindings/webcrypto/JSSubtleCrypto.h +++ b/src/jsc/bindings/webcrypto/JSSubtleCrypto.h @@ -67,7 +67,6 @@ class JSSubtleCrypto : public JSDOMWrapper { JSC::JSValue toJS(JSC::JSGlobalObject*, JSDOMGlobalObject*, SubtleCrypto&); inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, SubtleCrypto* impl) { return impl ? toJS(lexicalGlobalObject, globalObject, *impl) : JSC::jsNull(); } JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject*, JSDOMGlobalObject*, Ref&&); -inline JSC::JSValue toJSNewlyCreated(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalObject* globalObject, RefPtr&& impl) { return impl ? toJSNewlyCreated(lexicalGlobalObject, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSSubtleCrypto; diff --git a/src/runtime/bake/bun-framework-react/client.tsx b/src/runtime/bake/bun-framework-react/client.tsx index 1220d1ce3aba..0889096993c2 100644 --- a/src/runtime/bake/bun-framework-react/client.tsx +++ b/src/runtime/bake/bun-framework-react/client.tsx @@ -81,7 +81,6 @@ const root = hydrateRoot(document, , { // Keep a cache of page objects to avoid re-fetching a page when pressing the // back button. The cache is indexed by the date it was created. const cachedPages = new Map(); -// const defaultPageExpiryTime = 1000 * 60 * 5; // 5 minutes interface Page { css: string[]; element: unknown; diff --git a/src/runtime/bake/client/overlay.ts b/src/runtime/bake/client/overlay.ts index 218e8e976817..ca147604179a 100644 --- a/src/runtime/bake/client/overlay.ts +++ b/src/runtime/bake/client/overlay.ts @@ -335,8 +335,7 @@ export async function onRuntimeError(err: any, fatal = false, async = false) { function expandHighlight(line: string, col: number) { let rest = line.slice(Math.max(0, col - 1)); - let len = 1; - len = 0; + let len = 0; let prev = line.slice(0, col - 1); // expand forward from new if (rest.match(/^new\s/)) { diff --git a/src/runtime/bake/client/stack-trace.ts b/src/runtime/bake/client/stack-trace.ts index 41d074483223..6ba7829bf171 100644 --- a/src/runtime/bake/client/stack-trace.ts +++ b/src/runtime/bake/client/stack-trace.ts @@ -82,7 +82,7 @@ function parseV8OrIE(stack: string): Frame[] { function parseFFOrSafari(stack: string): Frame[] { // Using string literal "\n" does not work in Safari. - return stack.split(/\n/g).map((source, i) => { + return stack.split(/\n/g).map(source => { let fn = ""; let file: string | null = null; let line: number | null = null; @@ -92,7 +92,7 @@ function parseFFOrSafari(stack: string): Frame[] { fn = source.slice(0, -1); } else if (source.indexOf("@") === -1 && source.indexOf(":") === -1) { // Safari eval frames only have function names and nothing else - fn = source.endsWith("@") ? source.slice(0, -1) : source; + fn = source; } else { var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/; var matches = source.match(functionNameRegex); diff --git a/src/uws_sys/_libusockets.h b/src/uws_sys/_libusockets.h index 395398448b62..6854a1fe69fc 100644 --- a/src/uws_sys/_libusockets.h +++ b/src/uws_sys/_libusockets.h @@ -64,13 +64,6 @@ enum uws_sendstatus_t : uint32_t { BACKPRESSURE, SUCCESS, DROPPED }; -typedef struct { - - int port; - const char* host; - int options; -} uws_app_listen_config_t; - struct uws_app_s; struct uws_req_s; struct uws_res_s; diff --git a/src/uws_sys/libuwsockets_h2.cpp b/src/uws_sys/libuwsockets_h2.cpp index 59a9173e956f..5f7ee2118491 100644 --- a/src/uws_sys/libuwsockets_h2.cpp +++ b/src/uws_sys/libuwsockets_h2.cpp @@ -13,7 +13,6 @@ // clang-format on using uWS::H2App; -using uWS::Http2Request; using uWS::Http2Response; using uWS::Http2ResponseData;