diff --git a/src/jsc/bindings/Cookie.h b/src/jsc/bindings/Cookie.h index e7ad07233b4e..e926e262f6f5 100644 --- a/src/jsc/bindings/Cookie.h +++ b/src/jsc/bindings/Cookie.h @@ -113,7 +113,6 @@ class Cookie : public RefCounted { size_t memoryCost() const; static bool isValidCookieName(const String& name); - static bool isValidCookieValue(const String& value); // values are uri component encoded, so this isn't needed static bool isValidCookiePath(const String& path); static bool isValidCookieDomain(const String& domain); diff --git a/src/jsc/bindings/CookieMap.cpp b/src/jsc/bindings/CookieMap.cpp index f2396ee543cd..5b7235898218 100644 --- a/src/jsc/bindings/CookieMap.cpp +++ b/src/jsc/bindings/CookieMap.cpp @@ -54,11 +54,6 @@ CookieMap::CookieMap() { } -CookieMap::CookieMap(Vector>&& cookies) - : m_modifiedCookies(WTF::move(cookies)) -{ -} - CookieMap::CookieMap(Vector>&& cookies) : m_originalCookies(WTF::move(cookies)) { @@ -151,19 +146,6 @@ std::optional CookieMap::get(const String& name) const return std::nullopt; } -Vector> CookieMap::getAll() const -{ - Vector> all; - for (const auto& cookie : m_modifiedCookies) { - if (cookie->value().isEmpty()) continue; - all.append(KeyValuePair(cookie->name(), cookie->value())); - } - for (const auto& cookie : m_originalCookies) { - all.append(KeyValuePair(cookie.key, cookie.value)); - } - return all; -} - bool CookieMap::has(const String& name) const { return get(name).has_value(); diff --git a/src/jsc/bindings/CookieMap.h b/src/jsc/bindings/CookieMap.h index b664acd01d91..6b1369776acd 100644 --- a/src/jsc/bindings/CookieMap.h +++ b/src/jsc/bindings/CookieMap.h @@ -11,11 +11,6 @@ namespace WebCore { -struct CookieStoreGetOptions { - String name {}; - String url {}; -}; - struct CookieStoreDeleteOptions { String name {}; String domain {}; @@ -31,7 +26,6 @@ class CookieMap : public RefCounted { static ExceptionOr> create(std::variant>, HashMap, String>&& init, bool throwOnInvalidCookieString = true); std::optional get(const String& name) const; - Vector> getAll() const; Vector> getAllChanges() const { return m_modifiedCookies; } bool has(const String& name) const; @@ -62,7 +56,6 @@ class CookieMap : public RefCounted { private: CookieMap(); - CookieMap(Vector>&& cookies); CookieMap(Vector>&& cookies); void removeInternal(const String& name); diff --git a/src/jsc/bindings/DOMException.cpp b/src/jsc/bindings/DOMException.cpp index 45f7064e733e..ca05ff2aadc8 100644 --- a/src/jsc/bindings/DOMException.cpp +++ b/src/jsc/bindings/DOMException.cpp @@ -29,8 +29,6 @@ #include "root.h" #include "DOMException.h" -#include "Exception.h" - namespace WebCore { // This array needs to be kept in sync with the ExceptionCode enumeration. @@ -101,12 +99,6 @@ Ref DOMException::create(const String& message, const String& name return adoptRef(*new DOMException(legacyCodeFromName(name), name, message)); } -Ref DOMException::create(const Exception& exception) -{ - auto& description = DOMException::description(exception.code()); - return adoptRef(*new DOMException(description.legacyCode, description.name, exception.message().isEmpty() ? description.message : exception.message())); -} - DOMException::DOMException(LegacyCode legacyCode, const String& name, const String& message) : m_legacyCode(legacyCode) , m_name(name) diff --git a/src/jsc/bindings/DOMException.h b/src/jsc/bindings/DOMException.h index b764393c17b5..7a66b2fe7f4e 100644 --- a/src/jsc/bindings/DOMException.h +++ b/src/jsc/bindings/DOMException.h @@ -34,12 +34,9 @@ namespace WebCore { -class Exception; - class DOMException : public RefCounted { public: static Ref create(ExceptionCode, const String& message = emptyString()); - static Ref create(const Exception&); // For DOM bindings. static Ref create(const String& message, const String& name); @@ -58,9 +55,6 @@ class DOMException : public RefCounted { WEBCORE_EXPORT static const Description& description(ExceptionCode); - static ASCIILiteral name(ExceptionCode ec) { return description(ec).name; } - static ASCIILiteral message(ExceptionCode ec) { return description(ec).message; } - protected: DOMException(LegacyCode, const String& name, const String& message); diff --git a/src/jsc/bindings/DOMFormData.cpp b/src/jsc/bindings/DOMFormData.cpp index e866c2704eb9..2bf5daf577f1 100644 --- a/src/jsc/bindings/DOMFormData.cpp +++ b/src/jsc/bindings/DOMFormData.cpp @@ -83,14 +83,6 @@ extern "C" void DOMFormData__forEach(DOMFormData* form, void* context, void (*ca } } -Ref DOMFormData::clone() const -{ - auto newFormData = adoptRef(*new DOMFormData(scriptExecutionContext())); - newFormData->m_items = m_items; - - return newFormData; -} - // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry static auto createStringEntry(const String& name, const String& value) -> DOMFormData::Item { diff --git a/src/jsc/bindings/DOMFormData.h b/src/jsc/bindings/DOMFormData.h index c8ceab181722..d38b38f48073 100644 --- a/src/jsc/bindings/DOMFormData.h +++ b/src/jsc/bindings/DOMFormData.h @@ -71,7 +71,6 @@ class DOMFormData : public RefCounted, public ContextDestructionObs bool has(const StringView name); void set(const String& name, const String& value); void set(const String& name, RefPtr, const String& filename = {}); - Ref clone() const; size_t count() const { return m_items.size(); } size_t memoryCost() const; diff --git a/src/jsc/bindings/ErrorCode.cpp b/src/jsc/bindings/ErrorCode.cpp index 12684ed4ecdb..4a7583210dcd 100644 --- a/src/jsc/bindings/ErrorCode.cpp +++ b/src/jsc/bindings/ErrorCode.cpp @@ -726,17 +726,6 @@ WTF::String ERR_INVALID_ARG_TYPE(JSC::ThrowScope& scope, JSC::JSGlobalObject* gl return result.toString(); } -WTF::String ERR_INVALID_ARG_TYPE(JSC::ThrowScope& scope, JSC::JSGlobalObject* globalObject, const ZigString* arg_name_string, const ZigString* expected_type_string, JSValue actual_value) -{ - auto arg_name = std::span(arg_name_string->ptr, arg_name_string->len); - ASSERT(WTF::charactersAreAllASCII(arg_name)); - - auto expected_type = std::span(expected_type_string->ptr, expected_type_string->len); - ASSERT(WTF::charactersAreAllASCII(expected_type)); - - return ERR_INVALID_ARG_TYPE(scope, globalObject, arg_name, expected_type, actual_value); -} - WTF::String ERR_INVALID_ARG_TYPE(JSC::ThrowScope& scope, JSC::JSGlobalObject* globalObject, JSValue val_arg_name, JSValue val_expected_type, JSValue val_actual_value) { auto* arg_name_str = val_arg_name.toString(globalObject); @@ -1165,13 +1154,6 @@ JSC::EncodedJSValue INVALID_FILE_URL_HOST(JSC::ThrowScope& throwScope, JSC::JSGl throwScope.release(); return {}; } -JSC::EncodedJSValue INVALID_FILE_URL_HOST(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const ASCIILiteral platform) -{ - auto message = makeString("File URL host must be \"localhost\" or empty on "_s, platform); - throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_INVALID_FILE_URL_HOST, message)); - throwScope.release(); - return {}; -} /// `File URL path {suffix}` JSC::EncodedJSValue INVALID_FILE_URL_PATH(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const ASCIILiteral suffix) { @@ -1397,17 +1379,6 @@ JSC::EncodedJSValue CRYPTO_ECDH_INVALID_FORMAT(ThrowScope& scope, JSGlobalObject return {}; } -JSC::EncodedJSValue CRYPTO_JWK_UNSUPPORTED_CURVE(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, const WTF::String& curve) -{ - WTF::StringBuilder builder; - builder.append("Unsupported JWK EC curve: "_s); - builder.append(curve); - builder.append('.'); - throwScope.throwException(globalObject, createError(globalObject, ErrorCode::ERR_CRYPTO_JWK_UNSUPPORTED_CURVE, builder.toString())); - throwScope.release(); - return {}; -} - JSC::EncodedJSValue CRYPTO_JWK_UNSUPPORTED_CURVE(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject, ASCIILiteral message, const char* curveName) { WTF::StringBuilder builder; diff --git a/src/jsc/bindings/ErrorCode.h b/src/jsc/bindings/ErrorCode.h index 850de5d68457..e397f6962fbe 100644 --- a/src/jsc/bindings/ErrorCode.h +++ b/src/jsc/bindings/ErrorCode.h @@ -65,7 +65,6 @@ JSC::JSObject* createError(Zig::GlobalObject* globalObject, ErrorCode code, cons JSC::JSObject* createError(JSC::JSGlobalObject* globalObject, ErrorCode code, const WTF::String& message); JSC::JSObject* createError(Zig::GlobalObject* globalObject, ErrorCode code, JSC::JSValue message); JSC::JSObject* createError(VM& vm, Zig::GlobalObject* globalObject, ErrorCode code, JSValue message, JSValue options); -JSC::JSValue toJS(JSC::JSGlobalObject*, ErrorCode); JSObject* createInvalidThisError(JSGlobalObject* globalObject, JSValue thisValue, const ASCIILiteral typeName); JSObject* createInvalidThisError(JSGlobalObject* globalObject, const String& message); @@ -121,7 +120,6 @@ JSC::EncodedJSValue CRYPTO_OPERATION_FAILED(JSC::ThrowScope& throwScope, JSC::JS JSC::EncodedJSValue CRYPTO_INVALID_KEYPAIR(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject); JSC::EncodedJSValue CRYPTO_ECDH_INVALID_PUBLIC_KEY(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject); JSC::EncodedJSValue CRYPTO_ECDH_INVALID_FORMAT(JSC::ThrowScope&, JSC::JSGlobalObject*, const WTF::String& formatString); -JSC::EncodedJSValue CRYPTO_JWK_UNSUPPORTED_CURVE(JSC::ThrowScope&, JSC::JSGlobalObject*, const WTF::String&); JSC::EncodedJSValue CRYPTO_JWK_UNSUPPORTED_CURVE(JSC::ThrowScope&, JSC::JSGlobalObject*, ASCIILiteral message, const char* curveName); JSC::EncodedJSValue CRYPTO_JWK_UNSUPPORTED_KEY_TYPE(JSC::ThrowScope&, JSC::JSGlobalObject*); JSC::EncodedJSValue CRYPTO_INVALID_JWK(JSC::ThrowScope& throwScope, JSC::JSGlobalObject* globalObject); diff --git a/src/jsc/bindings/IDLTypes.h b/src/jsc/bindings/IDLTypes.h index 5a12e352de50..7ff9eaeaaf20 100644 --- a/src/jsc/bindings/IDLTypes.h +++ b/src/jsc/bindings/IDLTypes.h @@ -359,8 +359,6 @@ struct IDLDate : IDLType { struct IDLScheduledAction : IDLType> { }; -template struct IDLSerializedScriptValue : IDLWrapper { -}; template struct IDLEventListener : IDLWrapper { }; diff --git a/src/jsc/bindings/ImportMetaObject.h b/src/jsc/bindings/ImportMetaObject.h index 6e3d8bf0efdb..761959f17bb5 100644 --- a/src/jsc/bindings/ImportMetaObject.h +++ b/src/jsc/bindings/ImportMetaObject.h @@ -52,8 +52,6 @@ class ImportMetaObject final : public JSC::JSNonFinalObject { /// stated in https://github.com/oven-sh/bun/pull/9399 static ImportMetaObject* createFromSpecifier(JSC::JSGlobalObject* globalObject, const String& specifier); - static ImportMetaObject* createRequireFunction(VM& vm, JSGlobalObject* lexicalGlobalObject, const WTF::String& pathString); - DECLARE_INFO; DECLARE_VISIT_CHILDREN; diff --git a/src/jsc/bindings/JSCommonJSModule.h b/src/jsc/bindings/JSCommonJSModule.h index eb7bf713307a..74ff85e47755 100644 --- a/src/jsc/bindings/JSCommonJSModule.h +++ b/src/jsc/bindings/JSCommonJSModule.h @@ -76,13 +76,9 @@ class JSCommonJSModule final : public JSC::JSDestructibleObject { static size_t estimatedSize(JSC::JSCell* cell, JSC::VM& vm); - void setSourceCode(JSC::SourceCode&& sourceCode); - static void destroy(JSC::JSCell*); ~JSCommonJSModule(); - void clearSourceCode() { sourceCode = JSC::SourceCode(); } - void finishCreation(JSC::VM& vm, const JSC::SourceCode& sourceCode); static JSC::Structure* createStructure(JSC::JSGlobalObject* globalObject); @@ -127,7 +123,6 @@ class JSCommonJSModule final : public JSC::JSDestructibleObject { return this->get(globalObject(), JSC::PropertyName(WebCore::clientData(vm())->builtinNames().exportsPublicName())); } void setExportsObject(JSC::JSValue exportsObject); - JSValue idOrDot() { return m_id.get(); } JSValue filename() { return m_filename.get(); } bool load(JSC::VM& vm, Zig::GlobalObject* globalObject); diff --git a/src/jsc/bindings/ProcessBindingTTYWrap.cpp b/src/jsc/bindings/ProcessBindingTTYWrap.cpp index 73b896d732db..6dd696ba361c 100644 --- a/src/jsc/bindings/ProcessBindingTTYWrap.cpp +++ b/src/jsc/bindings/ProcessBindingTTYWrap.cpp @@ -190,8 +190,6 @@ const ClassInfo TTYWrapObject::s_info = { &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(TTYWrapObject) }; -JSC::EncodedJSValue Process_functionInternalGetWindowSize(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame); - JSC_DEFINE_HOST_FUNCTION(jsTTYSetMode, (JSC::JSGlobalObject * globalObject, CallFrame* callFrame)) { #if OS(WINDOWS) diff --git a/src/jsc/bindings/Sink.h b/src/jsc/bindings/Sink.h index 524e25416b82..40759e511041 100644 --- a/src/jsc/bindings/Sink.h +++ b/src/jsc/bindings/Sink.h @@ -14,7 +14,5 @@ enum SinkID : uint8_t { FetchRequestBodySink = 8, }; -static constexpr unsigned numberOfSinkIDs - = 9; } diff --git a/src/jsc/bindings/webcore/DOMJITCheckDOM.h b/src/jsc/bindings/webcore/DOMJITCheckDOM.h deleted file mode 100644 index 98554085ab48..000000000000 --- a/src/jsc/bindings/webcore/DOMJITCheckDOM.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2016 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#pragma once - -#include "DOMJITHelpers.h" - -#if ENABLE(JIT) - -// #include "Document.h" -// #include "Element.h" -#include "Event.h" -#include "Node.h" - -namespace WebCore { -namespace DOMJIT { - -template -struct TypeChecker { -}; - -template<> -struct TypeChecker { - static CCallHelpers::Jump branchIfFail(CCallHelpers& jit, GPRReg dom) - { - return DOMJIT::branchIfNotNode(jit, dom); - } -}; - -// template<> -// struct TypeChecker { -// static CCallHelpers::Jump branchIfFail(CCallHelpers& jit, GPRReg dom) -// { -// return DOMJIT::branchIfNotDocumentWrapper(jit, dom); -// } -// }; - -// template<> -// struct TypeChecker { -// static CCallHelpers::Jump branchIfFail(CCallHelpers& jit, GPRReg dom) -// { -// return DOMJIT::branchIfNotDocumentFragment(jit, dom); -// } -// }; - -template<> -struct TypeChecker { - static CCallHelpers::Jump branchIfFail(CCallHelpers& jit, GPRReg dom) - { - return DOMJIT::branchIfNotEvent(jit, dom); - } -}; - -// template<> -// struct TypeChecker { -// static CCallHelpers::Jump branchIfFail(CCallHelpers& jit, GPRReg dom) -// { -// return DOMJIT::branchIfNotElement(jit, dom); -// } -// }; - -template -Ref checkDOM() -{ - Ref snippet = JSC::Snippet::create(); - snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) { - return TypeChecker::branchIfFail(jit, params[0].gpr()); - }); - return snippet; -} - -} -} - -#endif diff --git a/src/jsc/bindings/webcore/DOMJITHelpers.cpp b/src/jsc/bindings/webcore/DOMJITHelpers.cpp index 4666ea358d64..9f05e4c5a797 100644 --- a/src/jsc/bindings/webcore/DOMJITHelpers.cpp +++ b/src/jsc/bindings/webcore/DOMJITHelpers.cpp @@ -1,57 +1,2 @@ -/* - * Copyright (C) 2016 Apple Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - #include "config.h" -#include "DOMJITHelpers.h" - -#if ENABLE(JIT) - -// #include "Document.h" -#include "JSDOMBinding.h" -#include "Node.h" - -namespace WebCore { -namespace DOMJIT { - -using JSC::CCallHelpers; -using JSC::GPRReg; -using JSC::JSValueRegs; -using JSC::MacroAssembler; - -// void loadDocument(MacroAssembler& jit, GPRReg node, GPRReg output) -// { -// jit.loadPtr(CCallHelpers::Address(node, Node::treeScopeMemoryOffset()), output); -// jit.loadPtr(CCallHelpers::Address(output, TreeScope::documentScopeMemoryOffset()), output); -// } - -// void loadDocumentElement(MacroAssembler& jit, GPRReg document, GPRReg output) -// { -// jit.loadPtr(CCallHelpers::Address(document, Document::documentElementMemoryOffset()), output); -// } - -} -} - -#endif +// Empty: DOMJITHelpers.cpp was dead. Kept so unified-source bundles don't shift. diff --git a/src/jsc/bindings/webcore/DOMJITHelpers.h b/src/jsc/bindings/webcore/DOMJITHelpers.h index a28f35b71012..f1f482a14874 100644 --- a/src/jsc/bindings/webcore/DOMJITHelpers.h +++ b/src/jsc/bindings/webcore/DOMJITHelpers.h @@ -27,190 +27,5 @@ #pragma once #include "JSDOMWrapper.h" -#include "Node.h" #include #include - -#if ENABLE(JIT) - -IGNORE_WARNINGS_BEGIN("frame-address") - -namespace WebCore { -namespace DOMJIT { - -using JSC::CCallHelpers; -using JSC::GPRReg; -using JSC::JSValueRegs; -using JSC::MacroAssembler; - -static_assert(std::is_same::value, "GPRReg is the alias to the MacroAssembler::RegisterID"); - -inline CCallHelpers::Jump branchIfNotWorldIsNormal(CCallHelpers& jit, GPRReg globalObject) -{ - return jit.branchTest8(CCallHelpers::Zero, CCallHelpers::Address(globalObject, JSDOMGlobalObject::offsetOfWorldIsNormal())); -} - -inline CCallHelpers::Jump branchIfNotWeakIsLive(CCallHelpers& jit, GPRReg weakImpl) -{ - return jit.branchTestPtr(CCallHelpers::NonZero, CCallHelpers::Address(weakImpl, JSC::WeakImpl::offsetOfWeakHandleOwner()), CCallHelpers::TrustedImm32(JSC::WeakImpl::StateMask)); -} - -template -JSC::EncodedJSValue toWrapperSlowImpl(JSC::JSGlobalObject* globalObject, void* result) -{ - return JSC::JSValue::encode(toJS(globalObject, static_cast(globalObject), *static_cast(result))); -} - -template -void tryLookUpWrapperCache(CCallHelpers& jit, CCallHelpers::JumpList& failureCases, GPRReg wrapped, GPRReg resultGPR) -{ - jit.loadPtr(CCallHelpers::Address(wrapped, ScriptWrappable::offsetOfWrapper()), resultGPR); - failureCases.append(jit.branchTestPtr(CCallHelpers::Zero, resultGPR)); - failureCases.append(branchIfNotWeakIsLive(jit, resultGPR)); - jit.loadPtr(CCallHelpers::Address(resultGPR, JSC::WeakImpl::offsetOfJSValue() + JSC::JSValue::offsetOfPayload()), resultGPR); -} - -template -void toWrapper(CCallHelpers& jit, JSC::SnippetParams& params, GPRReg wrapped, GPRReg globalObject, JSValueRegs result, ToJSFunction function, JSC::JSValue globalObjectConstant) -{ - ASSERT(wrapped != result.payloadGPR()); - ASSERT(globalObject != result.payloadGPR()); - GPRReg payloadGPR = result.payloadGPR(); - CCallHelpers::JumpList slowCases; - - if (globalObjectConstant) { - if (!uncheckedDowncast(globalObjectConstant)->worldIsNormal()) { - slowCases.append(jit.jump()); - params.addSlowPathCall(slowCases, jit, function, result, globalObject, wrapped); - return; - } - } else - slowCases.append(branchIfNotWorldIsNormal(jit, globalObject)); - - tryLookUpWrapperCache(jit, slowCases, wrapped, payloadGPR); - jit.boxCell(payloadGPR, result); - params.addSlowPathCall(slowCases, jit, function, result, globalObject, wrapped); -} - -inline CCallHelpers::Jump branchIfDOMWrapper(CCallHelpers& jit, GPRReg target) -{ - return jit.branch8( - CCallHelpers::AboveOrEqual, - CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), - CCallHelpers::TrustedImm32(JSC::JSType(JSDOMWrapperType))); -} - -inline CCallHelpers::Jump branchIfUint8Array(CCallHelpers& jit, GPRReg target) -{ - return jit.branch8( - CCallHelpers::Equal, - CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), - CCallHelpers::TrustedImm32(JSC::JSType(Uint8ArrayType))); -} - -inline CCallHelpers::Jump branchIfNotDOMWrapper(CCallHelpers& jit, GPRReg target) -{ - return jit.branch8( - CCallHelpers::Below, - CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), - CCallHelpers::TrustedImm32(JSC::JSType(JSDOMWrapperType))); -} - -inline CCallHelpers::Jump branchIfEvent(CCallHelpers& jit, GPRReg target) -{ - return jit.branchIfType(target, JSC::JSType(JSEventType)); -} - -inline CCallHelpers::Jump branchIfNotEvent(CCallHelpers& jit, GPRReg target) -{ - return jit.branchIfNotType(target, JSC::JSType(JSEventType)); -} - -inline CCallHelpers::Jump branchIfNode(CCallHelpers& jit, GPRReg target) -{ - return jit.branch8( - CCallHelpers::AboveOrEqual, - CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), - CCallHelpers::TrustedImm32(JSC::JSType(JSNodeType))); -} - -inline CCallHelpers::Jump branchIfNotNode(CCallHelpers& jit, GPRReg target) -{ - return jit.branch8( - CCallHelpers::Below, - CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), - CCallHelpers::TrustedImm32(JSC::JSType(JSNodeType))); -} - -// inline CCallHelpers::Jump branchIfElement(CCallHelpers& jit, GPRReg target) -// { -// return jit.branch8( -// CCallHelpers::Equal, -// CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), -// CCallHelpers::TrustedImm32(JSC::JSType(JSElementType))); -// } - -// inline CCallHelpers::Jump branchIfNotElement(CCallHelpers& jit, GPRReg target) -// { -// return jit.branch8( -// CCallHelpers::NotEqual, -// CCallHelpers::Address(target, JSC::JSCell::typeInfoTypeOffset()), -// CCallHelpers::TrustedImm32(JSC::JSType(JSElementType))); -// } - -// inline CCallHelpers::Jump branchIfDocumentFragment(CCallHelpers& jit, GPRReg target) -// { -// return jit.branchIfType(target, JSC::JSType(JSDocumentFragmentNodeType)); -// } - -// inline CCallHelpers::Jump branchIfNotDocumentFragment(CCallHelpers& jit, GPRReg target) -// { -// return jit.branchIfNotType(target, JSC::JSType(JSDocumentFragmentNodeType)); -// } - -// inline CCallHelpers::Jump branchIfDocumentWrapper(CCallHelpers& jit, GPRReg target) -// { -// return jit.branchIfType(target, JSC::JSType(JSDocumentWrapperType)); -// } - -// inline CCallHelpers::Jump branchIfNotDocumentWrapper(CCallHelpers& jit, GPRReg target) -// { -// return jit.branchIfNotType(target, JSC::JSType(JSDocumentWrapperType)); -// } - -// void loadDocument(MacroAssembler&, GPRReg node, GPRReg output); -// void loadDocumentElement(MacroAssembler&, GPRReg document, GPRReg output); - -// inline CCallHelpers::Jump branchTestIsElementFlagOnNode(MacroAssembler& jit, CCallHelpers::ResultCondition condition, GPRReg nodeAddress) -// { -// return jit.branchTest32(condition, CCallHelpers::Address(nodeAddress, Node::nodeFlagsMemoryOffset()), CCallHelpers::TrustedImm32(Node::flagIsElement())); -// } - -// inline CCallHelpers::Jump branchTestIsShadowRootFlagOnNode(MacroAssembler& jit, CCallHelpers::ResultCondition condition, GPRReg nodeAddress) -// { -// return jit.branchTest32(condition, CCallHelpers::Address(nodeAddress, Node::nodeFlagsMemoryOffset()), CCallHelpers::TrustedImm32(Node::flagIsShadowRoot())); -// } - -// inline CCallHelpers::Jump branchTestIsElementOrShadowRootFlagOnNode(MacroAssembler& jit, CCallHelpers::ResultCondition condition, GPRReg nodeAddress) -// { -// return jit.branchTest32(condition, CCallHelpers::Address(nodeAddress, Node::nodeFlagsMemoryOffset()), -// CCallHelpers::TrustedImm32(Node::flagIsShadowRoot() | Node::flagIsElement())); -// } - -// inline CCallHelpers::Jump branchTestIsHTMLFlagOnNode(MacroAssembler& jit, CCallHelpers::ResultCondition condition, GPRReg nodeAddress) -// { -// return jit.branchTest32(condition, CCallHelpers::Address(nodeAddress, Node::nodeFlagsMemoryOffset()), CCallHelpers::TrustedImm32(Node::flagIsHTML())); -// } - -JSC_DECLARE_JIT_OPERATION(operationToJSNode, JSC::EncodedJSValue, (JSC::JSGlobalObject*, void*)); -JSC_DECLARE_JIT_OPERATION(operationToJSContainerNode, JSC::EncodedJSValue, (JSC::JSGlobalObject*, void*)); -// JSC_DECLARE_JIT_OPERATION(operationToJSElement, JSC::EncodedJSValue, (JSC::JSGlobalObject*, void*)); -// JSC_DECLARE_JIT_OPERATION(operationToJSHTMLElement, JSC::EncodedJSValue, (JSC::JSGlobalObject*, void*)); -// JSC_DECLARE_JIT_OPERATION(operationToJSDocument, JSC::EncodedJSValue, (JSC::JSGlobalObject*, void*)); - -} -} - -IGNORE_WARNINGS_END - -#endif diff --git a/src/jsc/bindings/webcore/EventContext.cpp b/src/jsc/bindings/webcore/EventContext.cpp index 5b3b6c9240bf..b618b830e692 100644 --- a/src/jsc/bindings/webcore/EventContext.cpp +++ b/src/jsc/bindings/webcore/EventContext.cpp @@ -28,42 +28,8 @@ #include "config.h" #include "EventContext.h" -// #include "DOMWindow.h" -// #include "Document.h" -#include "EventNames.h" -// #include "FocusEvent.h" -// #include "HTMLFormElement.h" -// #include "MouseEvent.h" -// #include "TouchEvent.h" - namespace WebCore { EventContext::~EventContext() = default; -void EventContext::handleLocalEvents(Event& event, EventInvokePhase phase) const -{ - event.setTarget(m_target.get()); - event.setCurrentTarget(m_currentTarget.get(), m_currentTargetIsInShadowTree); - - if (!m_node || m_type == Type::Window) [[unlikely]] { - m_currentTarget->fireEventListeners(event, phase); - return; - } - - if (!m_node->hasEventTargetData()) - return; - - m_node->fireEventListeners(event, phase); -} - -#if ASSERT_ENABLED - -bool EventContext::isUnreachableNode(EventTarget* target) const -{ - // FIXME: Checks also for SVG elements. - return false; -} - -#endif - } diff --git a/src/jsc/bindings/webcore/EventContext.h b/src/jsc/bindings/webcore/EventContext.h index 98c1479bb191..c4729f852e59 100644 --- a/src/jsc/bindings/webcore/EventContext.h +++ b/src/jsc/bindings/webcore/EventContext.h @@ -30,133 +30,27 @@ #include "root.h" #include "Event.h" -#include "Node.h" - namespace WebCore { class EventContext { WTF_DEPRECATED_MAKE_FAST_ALLOCATED(EventContext); public: - using EventInvokePhase = EventTarget::EventInvokePhase; - - enum class Type : uint8_t { - Normal = 0, - MouseOrFocus, - Touch, - Window, - }; - - EventContext(Type, Node*, EventTarget* currentTarget, EventTarget* origin, int closedShadowDepth); - EventContext(Type, Node&, Node* currentTarget, EventTarget* origin, int closedShadowDepth); + EventContext(EventTarget* currentTarget, int closedShadowDepth); ~EventContext(); - Node* node() const { return m_node.get(); } EventTarget* currentTarget() const { return m_currentTarget.get(); } - // bool isCurrentTargetInShadowTree() const { return m_currentTargetIsInShadowTree; } - bool isCurrentTargetInShadowTree() const { return false; } - EventTarget* target() const { return m_target.get(); } - // int closedShadowDepth() const { return m_closedShadowDepth; } - int closedShadowDepth() const { return 0; } - - void handleLocalEvents(Event&, EventInvokePhase) const; - - // bool isMouseOrFocusEventContext() const { return m_type == Type::MouseOrFocus; } - bool isMouseOrFocusEventContext() const { return false; } - // bool isTouchEventContext() const { return m_type == Type::Touch; } - bool isTouchEventContext() const { return false; } - // bool isWindowContext() const { return m_type == Type::Window; } - bool isWindowContext() const { return false; } - - Node* relatedTarget() const { return m_relatedTarget.get(); } - void setRelatedTarget(Node*); - -#if ENABLE(TOUCH_EVENTS) - enum TouchListType { Touches, - TargetTouches, - ChangedTouches }; - TouchList& touchList(TouchListType); -#endif + int closedShadowDepth() const { return m_closedShadowDepth; } private: - inline EventContext(Type, Node* currentNode, RefPtr&& currentTarget, EventTarget* origin, int closedShadowDepth, bool currentTargetIsInShadowTree = false); - -#if ENABLE(TOUCH_EVENTS) - void initializeTouchLists(); -#endif - -#if ASSERT_ENABLED - bool isUnreachableNode(EventTarget*) const; -#endif - - RefPtr m_node; RefPtr m_currentTarget; - RefPtr m_target; - RefPtr m_relatedTarget; -#if ENABLE(TOUCH_EVENTS) - RefPtr m_touches; - RefPtr m_targetTouches; - RefPtr m_changedTouches; -#endif - [[maybe_unused]] int m_closedShadowDepth { 0 }; - [[maybe_unused]] bool m_currentTargetIsInShadowTree { false }; - [[maybe_unused]] bool m_contextNodeIsFormElement { false }; - Type m_type { Type::Normal }; + int m_closedShadowDepth { 0 }; }; -inline EventContext::EventContext(Type type, Node* node, RefPtr&& currentTarget, EventTarget* origin, int closedShadowDepth, bool currentTargetIsInShadowTree) - : m_node { node } - , m_currentTarget { WTF::move(currentTarget) } - , m_target { origin } +inline EventContext::EventContext(EventTarget* currentTarget, int closedShadowDepth) + : m_currentTarget { currentTarget } , m_closedShadowDepth { closedShadowDepth } - , m_currentTargetIsInShadowTree { currentTargetIsInShadowTree } - , m_type { type } -{ - // ASSERT(!isUnreachableNode(m_target.get())); - // #if ENABLE(TOUCH_EVENTS) - // if (m_type == Type::Touch) - // initializeTouchLists(); - // #else - // ASSERT(m_type != Type::Touch); - // #endif -} - -inline EventContext::EventContext(Type type, Node* node, EventTarget* currentTarget, EventTarget* origin, int closedShadowDepth) - : EventContext(type, node, RefPtr { currentTarget }, origin, closedShadowDepth) -{ - // ASSERT(!is(currentTarget)); -} - -// This variant avoids calling EventTarget::ref() which is a virtual function call. -inline EventContext::EventContext(Type type, Node& node, Node* currentTarget, EventTarget* origin, int closedShadowDepth) - : EventContext(type, &node, RefPtr { currentTarget }, origin, closedShadowDepth, false) { - m_contextNodeIsFormElement = false; - // m_contextNodeIsFormElement = is(node); } -inline void EventContext::setRelatedTarget(Node* relatedTarget) -{ - ASSERT(!isUnreachableNode(relatedTarget)); - m_relatedTarget = relatedTarget; -} - -// #if ENABLE(TOUCH_EVENTS) - -// inline TouchList& EventContext::touchList(TouchListType type) -// { -// switch (type) { -// case Touches: -// return *m_touches; -// case TargetTouches: -// return *m_targetTouches; -// case ChangedTouches: -// return *m_changedTouches; -// } -// ASSERT_NOT_REACHED(); -// return *m_touches; -// } - -// #endif - } // namespace WebCore diff --git a/src/jsc/bindings/webcore/EventListenerMap.cpp b/src/jsc/bindings/webcore/EventListenerMap.cpp index 023f3c39ce82..dc6312c44d5e 100644 --- a/src/jsc/bindings/webcore/EventListenerMap.cpp +++ b/src/jsc/bindings/webcore/EventListenerMap.cpp @@ -35,8 +35,6 @@ #include "AddEventListenerOptions.h" #include "Event.h" -#include "EventTarget.h" -#include "JSEventListener.h" #include #include #include @@ -160,47 +158,4 @@ EventListenerVector* EventListenerMap::find(const AtomString& eventType) return nullptr; } -static void removeFirstListenerCreatedFromMarkup(EventListenerVector& listenerVector) -{ - bool foundListener = listenerVector.removeFirstMatching([](const auto& registeredListener) { - if (JSEventListener::wasCreatedFromMarkup(registeredListener->callback())) { - registeredListener->markAsRemoved(); - return true; - } - return false; - }); - ASSERT_UNUSED(foundListener, foundListener); -} - -void EventListenerMap::removeFirstEventListenerCreatedFromMarkup(const AtomString& eventType) -{ - releaseAssertOrSetThreadUID(); - Locker locker { m_lock }; - - for (unsigned i = 0; i < m_entries.size(); ++i) { - if (m_entries[i].first == eventType) { - removeFirstListenerCreatedFromMarkup(m_entries[i].second); - if (m_entries[i].second.isEmpty()) - m_entries.removeAt(i); - return; - } - } -} - -static void copyListenersNotCreatedFromMarkupToTarget(const AtomString& eventType, EventListenerVector& listenerVector, EventTarget* target) -{ - for (auto& registeredListener : listenerVector) { - // Event listeners created from markup have already been transfered to the shadow tree during cloning. - if (JSEventListener::wasCreatedFromMarkup(registeredListener->callback())) - continue; - target->addEventListener(eventType, registeredListener->callback(), registeredListener->useCapture()); - } -} - -void EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget(EventTarget* target) -{ - for (auto& entry : m_entries) - copyListenersNotCreatedFromMarkupToTarget(entry.first, entry.second, target); -} - } // namespace WebCore diff --git a/src/jsc/bindings/webcore/EventListenerMap.h b/src/jsc/bindings/webcore/EventListenerMap.h index c92a366c364a..7581d3acd67d 100644 --- a/src/jsc/bindings/webcore/EventListenerMap.h +++ b/src/jsc/bindings/webcore/EventListenerMap.h @@ -43,8 +43,6 @@ namespace WebCore { -class EventTarget; - using EventListenerVector = Vector, 1, CrashOnOverflow, 2>; class EventListenerMap { @@ -64,9 +62,6 @@ class EventListenerMap { const EventListenerVector* find(const AtomString& eventType) const { return const_cast(this)->find(eventType); } Vector eventTypes() const; - void removeFirstEventListenerCreatedFromMarkup(const AtomString& eventType); - void copyEventListenersNotCreatedFromMarkupToTarget(EventTarget*); - template void visitJSEventListeners(Visitor&); Lock& lock() { return m_lock; } diff --git a/src/jsc/bindings/webcore/EventPath.cpp b/src/jsc/bindings/webcore/EventPath.cpp index 92ac7fe0dc1c..09464fa442a7 100644 --- a/src/jsc/bindings/webcore/EventPath.cpp +++ b/src/jsc/bindings/webcore/EventPath.cpp @@ -23,19 +23,11 @@ #include "Event.h" #include "EventContext.h" -#include "EventNames.h" #include namespace WebCore { -EventPath::EventPath(Node& originalTarget, Event& event) -{ -} - // https://dom.spec.whatwg.org/#dom-event-composedpath -// Any node whose depth computed in EventPath::buildPath is greater than the context object is excluded. -// Because we can exit out of a closed shadow tree and re-enter another closed shadow tree via a slot, -// we decrease the *allowed depth* whenever we moved to a "shallower" (closer-to-document) tree. Vector> EventPath::computePathUnclosedToTarget(const EventTarget& target) const { Vector> path; @@ -74,17 +66,9 @@ Vector> EventPath::computePathUnclosedToTarget(const EventTarge return path; } -EventPath::EventPath(const Vector& targets) -{ - m_path = targets.map([&](auto* target) { - ASSERT(target); - return EventContext { EventContext::Type::Normal, nullptr, target, *targets.begin(), 0 }; - }); -} - EventPath::EventPath(EventTarget& target) { - m_path = { EventContext { EventContext::Type::Normal, nullptr, &target, &target, 0 } }; + m_path = { EventContext { &target, 0 } }; } } diff --git a/src/jsc/bindings/webcore/EventPath.h b/src/jsc/bindings/webcore/EventPath.h index 2caee6588dd9..c93d1ae6837d 100644 --- a/src/jsc/bindings/webcore/EventPath.h +++ b/src/jsc/bindings/webcore/EventPath.h @@ -21,56 +21,19 @@ #pragma once #include "EventContext.h" -// #include "PseudoElement.h" -// #include "SVGElement.h" -// #include "SVGUseElement.h" #include #include namespace WebCore { -class Touch; - class EventPath { public: - EventPath(Node& origin, Event&); - explicit EventPath(const Vector&); explicit EventPath(EventTarget&); - bool isEmpty() const { return m_path.isEmpty(); } - size_t size() const { return m_path.size(); } - const EventContext& contextAt(size_t i) const { return m_path[i]; } - EventContext& contextAt(size_t i) { return m_path[i]; } - Vector> computePathUnclosedToTarget(const EventTarget&) const; - static Node* eventTargetRespectingTargetRules(Node&); - private: - void buildPath(Node& origin, Event&); - void setRelatedTarget(Node& origin, Node&); - -#if ENABLE(TOUCH_EVENTS) - void retargetTouch(EventContext::TouchListType, const Touch&); - void retargetTouchList(EventContext::TouchListType, const TouchList*); - void retargetTouchLists(const TouchEvent&); -#endif - Vector m_path; }; -inline Node* EventPath::eventTargetRespectingTargetRules(Node& referenceNode) -{ - // if (is(referenceNode)) - // return downcast(referenceNode).hostElement(); - - // // Events sent to elements inside an SVG use element's shadow tree go to the use element. - // if (is(referenceNode)) { - // if (auto useElement = downcast(referenceNode).correspondingUseElement()) - // return useElement.get(); - // } - - return &referenceNode; -} - } // namespace WebCore diff --git a/src/jsc/bindings/webcore/JSDOMConvert.h b/src/jsc/bindings/webcore/JSDOMConvert.h index afa2196d4770..1a8f5bcd42ae 100644 --- a/src/jsc/bindings/webcore/JSDOMConvert.h +++ b/src/jsc/bindings/webcore/JSDOMConvert.h @@ -41,7 +41,6 @@ #include "JSDOMConvertOptional.h" #include "JSDOMConvertRecord.h" #include "JSDOMConvertSequences.h" -#include "JSDOMConvertSerializedScriptValue.h" #include "JSDOMConvertStrings.h" #include "JSDOMConvertUnion.h" diff --git a/src/jsc/bindings/webcore/JSDOMConvertSerializedScriptValue.h b/src/jsc/bindings/webcore/JSDOMConvertSerializedScriptValue.h index ba714ff67cb7..f499e8900634 100644 --- a/src/jsc/bindings/webcore/JSDOMConvertSerializedScriptValue.h +++ b/src/jsc/bindings/webcore/JSDOMConvertSerializedScriptValue.h @@ -1,50 +1,2 @@ -/* - * Copyright (C) 2016 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - +// Empty: IDLSerializedScriptValue<> was never instantiated. Stub kept for the verification harness. #pragma once - -#include "IDLTypes.h" -#include "JSDOMConvertStrings.h" - -namespace WebCore { - -template struct Converter> : DefaultConverter> { - static RefPtr convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value) - { - return T::create(lexicalGlobalObject, value); - } -}; - -template struct JSConverter> { - static constexpr bool needsState = true; - static constexpr bool needsGlobalObject = true; - - static JSC::JSValue convert(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, RefPtr value) - { - return value ? value->deserialize(lexicalGlobalObject, &globalObject) : JSC::jsNull(); - } -}; - -} // namespace WebCore diff --git a/src/jsc/bindings/webcore/JSEvent.cpp b/src/jsc/bindings/webcore/JSEvent.cpp index 616c96e5772a..5462e88d8e68 100644 --- a/src/jsc/bindings/webcore/JSEvent.cpp +++ b/src/jsc/bindings/webcore/JSEvent.cpp @@ -236,15 +236,7 @@ void JSEventPrototype::finishCreation(VM& vm) JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); } -const ClassInfo JSEvent::s_info = { "Event"_s, &Base::s_info, &JSEventTable -#if 0 - , - &checkSubClassSnippetForJSEvent -#else - , - nullptr -#endif - , +const ClassInfo JSEvent::s_info = { "Event"_s, &Base::s_info, &JSEventTable, nullptr, CREATE_METHOD_TABLE(JSEvent) }; JSEvent::JSEvent(Structure* structure, JSDOMGlobalObject& globalObject, Ref&& impl) diff --git a/src/jsc/bindings/webcore/JSEvent.h b/src/jsc/bindings/webcore/JSEvent.h index 9f963dc134b4..d251a6d08319 100644 --- a/src/jsc/bindings/webcore/JSEvent.h +++ b/src/jsc/bindings/webcore/JSEvent.h @@ -22,7 +22,6 @@ #include "Event.h" #include "JSDOMWrapper.h" -#include #include namespace WebCore { @@ -90,9 +89,6 @@ inline JSC::JSValue toJS(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMGlobalOb 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(); } -// #if ENABLE(JIT) -// Ref checkSubClassSnippetForJSEvent(); -// #endif template<> struct JSDOMWrapperConverterTraits { using WrapperClass = JSEvent; using ToWrappedReturnType = Event*; diff --git a/src/jsc/bindings/webcore/JSEventDOMJIT.cpp b/src/jsc/bindings/webcore/JSEventDOMJIT.cpp deleted file mode 100644 index e6b70181d1ff..000000000000 --- a/src/jsc/bindings/webcore/JSEventDOMJIT.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2017 Yusuke Suzuki . - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "JSEvent.h" - -#if ENABLE(JIT) - -#include "DOMJITCheckDOM.h" - -namespace WebCore { -using namespace JSC; - -Ref checkSubClassSnippetForJSEvent() -{ - return DOMJIT::checkDOM(); -} - -} - -#endif