diff --git a/cmake/tools/SetupWebKit.cmake b/cmake/tools/SetupWebKit.cmake index 85bac91e7b..6e2ce7d677 100644 --- a/cmake/tools/SetupWebKit.cmake +++ b/cmake/tools/SetupWebKit.cmake @@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use") option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading") if(NOT WEBKIT_VERSION) - set(WEBKIT_VERSION 2317e1413969bff5e86d240f9f50aa2120776414) + set(WEBKIT_VERSION 863778130931e0081a688f48e8479b8ee61b9507) endif() string(SUBSTRING ${WEBKIT_VERSION} 0 16 WEBKIT_VERSION_PREFIX) diff --git a/src/bun.js/bindings/Serialization.cpp b/src/bun.js/bindings/Serialization.cpp index 5385e153db..caaec599f8 100644 --- a/src/bun.js/bindings/Serialization.cpp +++ b/src/bun.js/bindings/Serialization.cpp @@ -54,7 +54,9 @@ extern "C" SerializedValueSlice Bun__serializeJSValue(JSGlobalObject* globalObje extern "C" void Bun__SerializedScriptSlice__free(SerializedScriptValue* value) { - delete value; + // Use deref() instead of delete to properly handle CHECK_REF_COUNTED_LIFECYCLE. + // The value was leaked via leakRef() which leaves refcount at 1, so deref() will delete it. + value->deref(); } extern "C" EncodedJSValue Bun__JSValue__deserialize(JSGlobalObject* globalObject, const uint8_t* bytes, size_t size)