Avatar
omochimetaru 4/7/2024 2:32 AM
#if JAVASCRIPTKIT_WITHOUT_WEAKREFS // MARK: - Legacy Closure Types extension JSClosure { public func release() { isReleased = true Self.sharedClosures[hostFuncRef] = nil } } @_cdecl("_free_host_function_impl") func _free_host_function_impl(_ hostFuncRef: JavaScriptHostFuncRef) {} #else extension JSClosure { @available(*, deprecated, message: "JSClosure.release() is no longer necessary") public func release() {} } @_cdecl("_free_host_function_impl") func _free_host_function_impl(_ hostFuncRef: JavaScriptHostFuncRef) { JSClosure.sharedClosures[hostFuncRef] = nil } #endif