Diff
Modified: trunk/Source/WebCore/ChangeLog (190402 => 190403)
--- trunk/Source/WebCore/ChangeLog 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/ChangeLog 2015-10-01 13:07:55 UTC (rev 190403)
@@ -1,3 +1,150 @@
+2015-10-01 Youenn Fablet <youenn.fab...@crf.canon.fr>
+
+ Refactor binding generator to factor JS DOM class m_impl handling
+ https://bugs.webkit.org/show_bug.cgi?id=149660
+
+ Reviewed by Darin Adler.
+
+ Added JSDOMWrapperWithImplementation template class to move m_impl out of the binding generator.
+ Updated custom bindings to use impl() instead of m_impl directly.
+ Updated binding generator accordingly.
+
+ Covered by existing tests and binding tests.
+
+ * bindings/js/JSDOMStringMapCustom.cpp:
+ (WebCore::JSDOMStringMap::getOwnPropertyNames):
+ (WebCore::JSDOMStringMap::deleteProperty):
+ * bindings/js/JSDOMWrapper.h:
+ (WebCore::JSDOMWrapperWithImplementation::impl):
+ (WebCore::JSDOMWrapperWithImplementation::~JSDOMWrapperWithImplementation):
+ (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
+ (WebCore::JSDOMWrapperWithImplementation::releaseImpl):
+ * bindings/js/JSGeolocationCustom.cpp:
+ (WebCore::JSGeolocation::getCurrentPosition):
+ (WebCore::JSGeolocation::watchPosition):
+ * bindings/js/JSSQLResultSetRowListCustom.cpp:
+ (WebCore::JSSQLResultSetRowList::item):
+ * bindings/js/JSSQLTransactionCustom.cpp:
+ (WebCore::JSSQLTransaction::executeSql):
+ * bindings/js/JSStorageCustom.cpp:
+ (WebCore::JSStorage::deleteProperty):
+ (WebCore::JSStorage::getOwnPropertyNames):
+ * bindings/js/JSSubtleCryptoCustom.cpp:
+ (WebCore::JSSubtleCrypto::encrypt):
+ (WebCore::JSSubtleCrypto::decrypt):
+ (WebCore::JSSubtleCrypto::sign):
+ (WebCore::JSSubtleCrypto::verify):
+ (WebCore::JSSubtleCrypto::wrapKey):
+ (WebCore::JSSubtleCrypto::unwrapKey):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GetParentClassName):
+ (GetImplClassName):
+ (GenerateHeader):
+ (GenerateImplementation):
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+ (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
+ (WebCore::JSTestActiveDOMObject::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+ (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
+ * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
+ (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
+ (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
+ (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
+ (WebCore::JSTestCustomConstructorWithNoInterfaceObject::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+ (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
+ (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+ (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
+ * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+ (WebCore::JSTestEventConstructor::JSTestEventConstructor):
+ (WebCore::jsTestEventConstructorAttr1): Deleted.
+ * bindings/scripts/test/JS/JSTestEventConstructor.h:
+ (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
+ (WebCore::JSTestEventConstructor::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+ (WebCore::JSTestEventTarget::JSTestEventTarget):
+ (WebCore::JSTestEventTarget::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestEventTarget.h:
+ (WebCore::JSTestEventTarget::~JSTestEventTarget):
+ * bindings/scripts/test/JS/JSTestException.cpp:
+ (WebCore::JSTestException::JSTestException):
+ (WebCore::JSTestException::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestException.h:
+ (WebCore::JSTestException::~JSTestException):
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+ (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
+ (WebCore::jsTestGenerateIsReachableConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
+ (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
+ (WebCore::JSTestGenerateIsReachable::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ (WebCore::JSTestInterface::JSTestInterface):
+ (WebCore::JSTestInterface::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestInterface.h:
+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
+ (WebCore::jsTestJSBuiltinConstructorConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
+ (WebCore::JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor):
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+ (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
+ (WebCore::jsTestMediaQueryListListenerConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+ (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
+ (WebCore::JSTestMediaQueryListListener::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+ (WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
+ (WebCore::jsTestNamedConstructorConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestNamedConstructor.h:
+ (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
+ (WebCore::JSTestNamedConstructor::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+ (WebCore::JSTestNondeterministic::JSTestNondeterministic):
+ (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr): Deleted.
+ * bindings/scripts/test/JS/JSTestNondeterministic.h:
+ (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
+ (WebCore::JSTestNondeterministic::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::JSTestObj::JSTestObj):
+ (WebCore::JSTestObj::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestObj.h:
+ (WebCore::JSTestObj::~JSTestObj):
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+ (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
+ (WebCore::jsTestOverloadedConstructorsConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
+ (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
+ (WebCore::JSTestOverloadedConstructors::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+ (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
+ (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
+ (WebCore::JSTestOverrideBuiltins::~JSTestOverrideBuiltins):
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+ (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
+ (WebCore::jsTestSerializedScriptValueInterfaceValue): Deleted.
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+ (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
+ (WebCore::JSTestSerializedScriptValueInterface::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ (WebCore::JSTestTypedefs::JSTestTypedefs):
+ (WebCore::JSTestTypedefs::getOwnPropertySlot): Deleted.
+ * bindings/scripts/test/JS/JSTestTypedefs.h:
+ (WebCore::JSTestTypedefs::~JSTestTypedefs):
+ * bindings/scripts/test/JS/JSattribute.cpp:
+ (WebCore::JSattribute::JSattribute):
+ (WebCore::jsattributeReadonly): Deleted.
+ * bindings/scripts/test/JS/JSattribute.h:
+ (WebCore::JSattribute::~JSattribute):
+ (WebCore::JSattribute::finishCreation): Deleted.
+ * bindings/scripts/test/JS/JSreadonly.cpp:
+ (WebCore::JSreadonly::JSreadonly):
+ (WebCore::jsreadonlyConstructor): Deleted.
+ * bindings/scripts/test/JS/JSreadonly.h:
+ (WebCore::JSreadonly::~JSreadonly):
+ (WebCore::JSreadonly::finishCreation): Deleted.
+
2015-10-01 Csaba Osztrogonác <o...@webkit.org>
Fix the ARM build after r190192
Modified: trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -52,7 +52,7 @@
{
JSDOMStringMap* thisObject = jsCast<JSDOMStringMap*>(object);
Vector<String> names;
- thisObject->m_impl->getNames(names);
+ thisObject->impl().getNames(names);
size_t length = names.size();
for (size_t i = 0; i < length; ++i)
propertyNames.add(Identifier::fromString(exec, names[i]));
@@ -65,7 +65,7 @@
JSDOMStringMap* thisObject = jsCast<JSDOMStringMap*>(cell);
if (propertyName.isSymbol())
return Base::deleteProperty(thisObject, exec, propertyName);
- return thisObject->m_impl->deleteItem(propertyNameToString(propertyName));
+ return thisObject->impl().deleteItem(propertyNameToString(propertyName));
}
bool JSDOMStringMap::deletePropertyByIndex(JSCell* cell, ExecState* exec, unsigned index)
Modified: trunk/Source/WebCore/bindings/js/JSDOMWrapper.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSDOMWrapper.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSDOMWrapper.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -42,12 +42,28 @@
protected:
JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject* globalObject)
- : JSDestructibleObject(globalObject->vm(), structure)
+ : Base(globalObject->vm(), structure)
{
ASSERT(scriptExecutionContext());
}
};
+template<typename ImplementationClass> class JSDOMWrapperWithImplementation : public JSDOMWrapper {
+public:
+ typedef JSDOMWrapper Base;
+
+ ImplementationClass& impl() const { return *m_impl; }
+ ~JSDOMWrapperWithImplementation() { std::exchange(m_impl, nullptr)->deref(); }
+
+protected:
+ JSDOMWrapperWithImplementation(JSC::Structure* structure, JSC::JSGlobalObject* globalObject, Ref<ImplementationClass>&& impl)
+ : Base(structure, globalObject)
+ , m_impl(&impl.leakRef()) { }
+
+private:
+ ImplementationClass* m_impl;
+};
+
} // namespace WebCore
#endif // JSDOMWrapper_h
Modified: trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSGeolocationCustom.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -114,7 +114,7 @@
return jsUndefined();
ASSERT(positionOptions);
- m_impl->getCurrentPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
+ impl().getCurrentPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
return jsUndefined();
}
@@ -136,7 +136,7 @@
return jsUndefined();
ASSERT(positionOptions);
- int watchID = m_impl->watchPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
+ int watchID = impl().watchPosition(positionCallback.release(), positionErrorCallback.release(), positionOptions.release());
return jsNumber(watchID);
}
Modified: trunk/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -47,17 +47,17 @@
setDOMException(&state, TYPE_MISMATCH_ERR);
return jsUndefined();
}
- if (index < 0 || (unsigned)index >= m_impl->length()) {
+ if (index < 0 || (unsigned)index >= impl().length()) {
setDOMException(&state, INDEX_SIZE_ERR);
return jsUndefined();
}
JSObject* object = constructEmptyObject(&state);
- unsigned numColumns = m_impl->columnNames().size();
+ unsigned numColumns = impl().columnNames().size();
unsigned valuesIndex = index * numColumns;
for (unsigned i = 0; i < numColumns; i++) {
- const SQLValue& value = m_impl->values()[valuesIndex + i];
+ const SQLValue& value = impl().values()[valuesIndex + i];
JSValue jsValue;
switch (value.type()) {
@@ -74,7 +74,7 @@
ASSERT_NOT_REACHED();
}
- object->putDirect(state.vm(), Identifier::fromString(&state, m_impl->columnNames()[i]), jsValue, DontDelete | ReadOnly);
+ object->putDirect(state.vm(), Identifier::fromString(&state, impl().columnNames()[i]), jsValue, DontDelete | ReadOnly);
}
return object;
Modified: trunk/Source/WebCore/bindings/js/JSSQLTransactionCustom.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSSQLTransactionCustom.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSSQLTransactionCustom.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -109,7 +109,7 @@
}
ExceptionCode ec = 0;
- m_impl->executeSQL(sqlStatement, sqlValues, callback.release(), errorCallback.release(), ec);
+ impl().executeSQL(sqlStatement, sqlValues, callback.release(), errorCallback.release(), ec);
setDOMException(&state, ec);
return jsUndefined();
Modified: trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -69,7 +69,7 @@
return Base::deleteProperty(thisObject, exec, propertyName);
ExceptionCode ec = 0;
- thisObject->m_impl->removeItem(propertyNameToString(propertyName), ec);
+ thisObject->impl().removeItem(propertyNameToString(propertyName), ec);
setDOMException(exec, ec);
return true;
}
@@ -83,12 +83,12 @@
{
JSStorage* thisObject = jsCast<JSStorage*>(object);
ExceptionCode ec = 0;
- unsigned length = thisObject->m_impl->length(ec);
+ unsigned length = thisObject->impl().length(ec);
setDOMException(exec, ec);
if (exec->hadException())
return;
for (unsigned i = 0; i < length; ++i) {
- propertyNames.add(Identifier::fromString(exec, thisObject->m_impl->key(i, ec)));
+ propertyNames.add(Identifier::fromString(exec, thisObject->impl().key(i, ec)));
setDOMException(exec, ec);
if (exec->hadException())
return;
Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -152,7 +152,7 @@
return throwTypeError(&state);
if (!key->allows(CryptoKeyUsageEncrypt)) {
- m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'encrypt'"));
+ impl().document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'encrypt'"));
setDOMException(&state, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -205,7 +205,7 @@
return throwTypeError(&state);
if (!key->allows(CryptoKeyUsageDecrypt)) {
- m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'decrypt'"));
+ impl().document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'decrypt'"));
setDOMException(&state, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -257,7 +257,7 @@
return throwTypeError(&state);
if (!key->allows(CryptoKeyUsageSign)) {
- m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'sign'"));
+ impl().document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'sign'"));
setDOMException(&state, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -309,7 +309,7 @@
return throwTypeError(&state);
if (!key->allows(CryptoKeyUsageVerify)) {
- m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'verify'"));
+ impl().document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'verify'"));
setDOMException(&state, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -646,7 +646,7 @@
return throwTypeError(&state);
if (!wrappingKey->allows(CryptoKeyUsageWrapKey)) {
- m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'wrapKey'"));
+ impl().document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'wrapKey'"));
setDOMException(&state, NOT_SUPPORTED_ERR);
return jsUndefined();
}
@@ -728,7 +728,7 @@
return throwTypeError(&state);
if (!unwrappingKey->allows(CryptoKeyUsageUnwrapKey)) {
- m_impl->document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'unwrapKey'"));
+ impl().document()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Key usages do not include 'unwrapKey'"));
setDOMException(&state, NOT_SUPPORTED_ERR);
return jsUndefined();
}
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2015-10-01 13:07:55 UTC (rev 190403)
@@ -180,7 +180,8 @@
my $interface = shift;
return $interface->extendedAttributes->{"JSLegacyParent"} if $interface->extendedAttributes->{"JSLegacyParent"};
- return "JSDOMWrapper" unless $interface->parent;
+ return "JSDOMWrapper" unless NeedsImplementationClass($interface);
+ return "JSDOMWrapperWithImplementation<" . GetImplClassName($interface->name) . ">" unless $interface->parent;
return "JS" . $interface->parent;
}
@@ -840,6 +841,10 @@
my $name = shift;
return "DOMWindow" if $name eq "AbstractView";
+
+ my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($name);
+ return $svgNativeType if $svgNativeType;
+
return $name;
}
@@ -881,9 +886,7 @@
$headerIncludes{"SVGElement.h"} = 1 if $className =~ /^JSSVG/;
my $implType = GetImplClassName($interfaceName);
- my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implType);
- $implType = $svgNativeType if $svgNativeType;
-
+ my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($interfaceName);
my $svgPropertyOrListPropertyType;
$svgPropertyOrListPropertyType = $svgPropertyType if $svgPropertyType;
$svgPropertyOrListPropertyType = $svgListPropertyType if $svgListPropertyType;
@@ -1027,7 +1030,6 @@
if (!$hasParent) {
push(@headerContent, " static void destroy(JSC::JSCell*);\n");
- push(@headerContent, " ~${className}();\n");
}
# Class info
@@ -1188,12 +1190,7 @@
}
if (NeedsImplementationClass($interface)) {
- if (!$hasParent) {
- push(@headerContent, " $implType& impl() const { return *m_impl; }\n");
- push(@headerContent, " void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }\n\n");
- push(@headerContent, "private:\n");
- push(@headerContent, " $implType* m_impl;\n");
- } else {
+ if ($hasParent) {
push(@headerContent, " $interfaceName& impl() const\n");
push(@headerContent, " {\n");
push(@headerContent, " return static_cast<$interfaceName&>(Base::impl());\n");
@@ -2138,9 +2135,7 @@
}
push(@implContent, ", CREATE_METHOD_TABLE($className) };\n\n");
- my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implType);
- $implType = $svgNativeType if $svgNativeType;
-
+ my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($interfaceName);
my $svgPropertyOrListPropertyType;
$svgPropertyOrListPropertyType = $svgPropertyType if $svgPropertyType;
$svgPropertyOrListPropertyType = $svgListPropertyType if $svgListPropertyType;
@@ -2163,12 +2158,7 @@
push(@implContent, " : $parentClassName(structure, globalObject) { }\n\n");
}else {
push(@implContent, "${className}::$className(Structure* structure, JSDOMGlobalObject* globalObject, Ref<$implType>&& impl)\n");
- if ($hasParent) {
- push(@implContent, " : $parentClassName(structure, globalObject, WTF::move(impl))\n");
- } else {
- push(@implContent, " : $parentClassName(structure, globalObject)\n");
- push(@implContent, " , m_impl(&impl.leakRef())\n");
- }
+ push(@implContent, " : $parentClassName(structure, globalObject, WTF::move(impl))\n");
push(@implContent, "{\n");
push(@implContent, "}\n\n");
}
@@ -2196,13 +2186,6 @@
push(@implContent, " ${className}* thisObject = static_cast<${className}*>(cell);\n");
push(@implContent, " thisObject->${className}::~${className}();\n");
push(@implContent, "}\n\n");
-
- push(@implContent, "${className}::~${className}()\n");
- push(@implContent, "{\n");
- if (NeedsImplementationClass($interface)) {
- push(@implContent, " releaseImpl();\n");
- }
- push(@implContent, "}\n\n");
}
my $hasGetter = InstanceOverridesGetOwnPropertySlot($interface);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -139,8 +139,7 @@
const ClassInfo JSTestActiveDOMObject::s_info = { "TestActiveDOMObject", &Base::s_info, &JSTestActiveDOMObjectTable, CREATE_METHOD_TABLE(JSTestActiveDOMObject) };
JSTestActiveDOMObject::JSTestActiveDOMObject(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestActiveDOMObject>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestActiveDOMObject>(structure, globalObject, WTF::move(impl))
{
}
@@ -160,11 +159,6 @@
thisObject->JSTestActiveDOMObject::~JSTestActiveDOMObject();
}
-JSTestActiveDOMObject::~JSTestActiveDOMObject()
-{
- releaseImpl();
-}
-
bool JSTestActiveDOMObject::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestActiveDOMObject*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestActiveDOMObject : public JSDOMWrapper {
+class JSTestActiveDOMObject : public JSDOMWrapperWithImplementation<TestActiveDOMObject> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestActiveDOMObject> Base;
static JSTestActiveDOMObject* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestActiveDOMObject>&& impl)
{
JSTestActiveDOMObject* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObject>(globalObject->vm().heap)) JSTestActiveDOMObject(structure, globalObject, WTF::move(impl));
@@ -42,7 +42,6 @@
static TestActiveDOMObject* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestActiveDOMObject();
DECLARE_INFO;
@@ -52,11 +51,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestActiveDOMObject& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestActiveDOMObject* m_impl;
public:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -119,8 +119,7 @@
const ClassInfo JSTestCustomConstructorWithNoInterfaceObject::s_info = { "TestCustomConstructorWithNoInterfaceObject", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCustomConstructorWithNoInterfaceObject) };
JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomConstructorWithNoInterfaceObject>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestCustomConstructorWithNoInterfaceObject>(structure, globalObject, WTF::move(impl))
{
}
@@ -140,11 +139,6 @@
thisObject->JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject();
}
-JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestCustomConstructorWithNoInterfaceObjectConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestCustomConstructorWithNoInterfaceObjectPrototype* domObject = jsDynamicCast<JSTestCustomConstructorWithNoInterfaceObjectPrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestCustomConstructorWithNoInterfaceObject : public JSDOMWrapper {
+class JSTestCustomConstructorWithNoInterfaceObject : public JSDOMWrapperWithImplementation<TestCustomConstructorWithNoInterfaceObject> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestCustomConstructorWithNoInterfaceObject> Base;
static JSTestCustomConstructorWithNoInterfaceObject* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomConstructorWithNoInterfaceObject>&& impl)
{
JSTestCustomConstructorWithNoInterfaceObject* ptr = new (NotNull, JSC::allocateCell<JSTestCustomConstructorWithNoInterfaceObject>(globalObject->vm().heap)) JSTestCustomConstructorWithNoInterfaceObject(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestCustomConstructorWithNoInterfaceObject* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestCustomConstructorWithNoInterfaceObject();
DECLARE_INFO;
@@ -50,11 +49,6 @@
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
- TestCustomConstructorWithNoInterfaceObject& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestCustomConstructorWithNoInterfaceObject* m_impl;
protected:
JSTestCustomConstructorWithNoInterfaceObject(JSC::Structure*, JSDOMGlobalObject*, Ref<TestCustomConstructorWithNoInterfaceObject>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -133,8 +133,7 @@
const ClassInfo JSTestCustomNamedGetter::s_info = { "TestCustomNamedGetter", &Base::s_info, &JSTestCustomNamedGetterTable, CREATE_METHOD_TABLE(JSTestCustomNamedGetter) };
JSTestCustomNamedGetter::JSTestCustomNamedGetter(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomNamedGetter>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestCustomNamedGetter>(structure, globalObject, WTF::move(impl))
{
}
@@ -154,11 +153,6 @@
thisObject->JSTestCustomNamedGetter::~JSTestCustomNamedGetter();
}
-JSTestCustomNamedGetter::~JSTestCustomNamedGetter()
-{
- releaseImpl();
-}
-
bool JSTestCustomNamedGetter::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestCustomNamedGetter : public JSDOMWrapper {
+class JSTestCustomNamedGetter : public JSDOMWrapperWithImplementation<TestCustomNamedGetter> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestCustomNamedGetter> Base;
static JSTestCustomNamedGetter* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomNamedGetter>&& impl)
{
JSTestCustomNamedGetter* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetter>(globalObject->vm().heap)) JSTestCustomNamedGetter(structure, globalObject, WTF::move(impl));
@@ -43,7 +43,6 @@
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestCustomNamedGetter();
DECLARE_INFO;
@@ -53,11 +52,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestCustomNamedGetter& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestCustomNamedGetter* m_impl;
public:
static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -170,8 +170,7 @@
const ClassInfo JSTestEventConstructor::s_info = { "TestEventConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestEventConstructor) };
JSTestEventConstructor::JSTestEventConstructor(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventConstructor>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestEventConstructor>(structure, globalObject, WTF::move(impl))
{
}
@@ -191,11 +190,6 @@
thisObject->JSTestEventConstructor::~JSTestEventConstructor();
}
-JSTestEventConstructor::~JSTestEventConstructor()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestEventConstructorAttr1(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -29,9 +29,9 @@
class JSDictionary;
-class JSTestEventConstructor : public JSDOMWrapper {
+class JSTestEventConstructor : public JSDOMWrapperWithImplementation<TestEventConstructor> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestEventConstructor> Base;
static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventConstructor>&& impl)
{
JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructor>(globalObject->vm().heap)) JSTestEventConstructor(structure, globalObject, WTF::move(impl));
@@ -43,7 +43,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestEventConstructor* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestEventConstructor();
DECLARE_INFO;
@@ -53,11 +52,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestEventConstructor& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestEventConstructor* m_impl;
protected:
JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject*, Ref<TestEventConstructor>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -145,8 +145,7 @@
const ClassInfo JSTestEventTarget::s_info = { "TestEventTarget", &Base::s_info, &JSTestEventTargetTable, CREATE_METHOD_TABLE(JSTestEventTarget) };
JSTestEventTarget::JSTestEventTarget(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventTarget>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestEventTarget>(structure, globalObject, WTF::move(impl))
{
}
@@ -166,11 +165,6 @@
thisObject->JSTestEventTarget::~JSTestEventTarget();
}
-JSTestEventTarget::~JSTestEventTarget()
-{
- releaseImpl();
-}
-
bool JSTestEventTarget::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestEventTarget*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestEventTarget : public JSDOMWrapper {
+class JSTestEventTarget : public JSDOMWrapperWithImplementation<TestEventTarget> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestEventTarget> Base;
static JSTestEventTarget* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventTarget>&& impl)
{
globalObject->masqueradesAsUndefinedWatchpoint()->fireAll("Allocated masquerading object");
@@ -44,7 +44,6 @@
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestEventTarget();
DECLARE_INFO;
@@ -57,11 +56,6 @@
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
static void visitChildren(JSCell*, JSC::SlotVisitor&);
- TestEventTarget& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestEventTarget* m_impl;
public:
static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::MasqueradesAsUndefined | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -129,8 +129,7 @@
const ClassInfo JSTestException::s_info = { "TestException", &Base::s_info, &JSTestExceptionTable, CREATE_METHOD_TABLE(JSTestException) };
JSTestException::JSTestException(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestException>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestException>(structure, globalObject, WTF::move(impl))
{
}
@@ -150,11 +149,6 @@
thisObject->JSTestException::~JSTestException();
}
-JSTestException::~JSTestException()
-{
- releaseImpl();
-}
-
bool JSTestException::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestException*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -28,9 +28,9 @@
namespace WebCore {
-class JSTestException : public JSDOMWrapper {
+class JSTestException : public JSDOMWrapperWithImplementation<TestException> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestException> Base;
static JSTestException* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestException>&& impl)
{
JSTestException* ptr = new (NotNull, JSC::allocateCell<JSTestException>(globalObject->vm().heap)) JSTestException(structure, globalObject, WTF::move(impl));
@@ -43,7 +43,6 @@
static TestException* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestException();
DECLARE_INFO;
@@ -53,11 +52,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestException& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestException* m_impl;
public:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -112,8 +112,7 @@
const ClassInfo JSTestGenerateIsReachable::s_info = { "TestGenerateIsReachable", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachable) };
JSTestGenerateIsReachable::JSTestGenerateIsReachable(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestGenerateIsReachable>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestGenerateIsReachable>(structure, globalObject, WTF::move(impl))
{
}
@@ -133,11 +132,6 @@
thisObject->JSTestGenerateIsReachable::~JSTestGenerateIsReachable();
}
-JSTestGenerateIsReachable::~JSTestGenerateIsReachable()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestGenerateIsReachableConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestGenerateIsReachablePrototype* domObject = jsDynamicCast<JSTestGenerateIsReachablePrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestGenerateIsReachable : public JSDOMWrapper {
+class JSTestGenerateIsReachable : public JSDOMWrapperWithImplementation<TestGenerateIsReachable> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestGenerateIsReachable> Base;
static JSTestGenerateIsReachable* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestGenerateIsReachable>&& impl)
{
JSTestGenerateIsReachable* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachable>(globalObject->vm().heap)) JSTestGenerateIsReachable(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestGenerateIsReachable* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestGenerateIsReachable();
DECLARE_INFO;
@@ -51,11 +50,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestGenerateIsReachable& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestGenerateIsReachable* m_impl;
protected:
JSTestGenerateIsReachable(JSC::Structure*, JSDOMGlobalObject*, Ref<TestGenerateIsReachable>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -410,8 +410,7 @@
const ClassInfo JSTestInterface::s_info = { "TestInterface", &Base::s_info, &JSTestInterfaceTable, CREATE_METHOD_TABLE(JSTestInterface) };
JSTestInterface::JSTestInterface(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestInterface>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestInterface>(structure, globalObject, WTF::move(impl))
{
}
@@ -431,11 +430,6 @@
thisObject->JSTestInterface::~JSTestInterface();
}
-JSTestInterface::~JSTestInterface()
-{
- releaseImpl();
-}
-
bool JSTestInterface::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestInterface*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -29,9 +29,9 @@
namespace WebCore {
-class WEBCORE_EXPORT JSTestInterface : public JSDOMWrapper {
+class WEBCORE_EXPORT JSTestInterface : public JSDOMWrapperWithImplementation<TestInterface> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestInterface> Base;
static JSTestInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestInterface>&& impl)
{
JSTestInterface* ptr = new (NotNull, JSC::allocateCell<JSTestInterface>(globalObject->vm().heap)) JSTestInterface(structure, globalObject, WTF::move(impl));
@@ -47,7 +47,6 @@
static void putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow);
bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestInterface();
DECLARE_INFO;
@@ -79,11 +78,6 @@
#if ENABLE(Condition11) || ENABLE(Condition12)
JSC::JSValue supplementalMethod3(JSC::ExecState&);
#endif
- TestInterface& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestInterface* m_impl;
public:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -146,10 +146,6 @@
thisObject->JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor();
}
-JSTestJSBuiltinConstructor::~JSTestJSBuiltinConstructor()
-{
-}
-
EncodedJSValue jsTestJSBuiltinConstructorConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestJSBuiltinConstructorPrototype* domObject = jsDynamicCast<JSTestJSBuiltinConstructorPrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -38,7 +38,6 @@
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
- ~JSTestJSBuiltinConstructor();
DECLARE_INFO;
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -120,8 +120,7 @@
const ClassInfo JSTestMediaQueryListListener::s_info = { "TestMediaQueryListListener", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestMediaQueryListListener) };
JSTestMediaQueryListListener::JSTestMediaQueryListListener(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestMediaQueryListListener>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestMediaQueryListListener>(structure, globalObject, WTF::move(impl))
{
}
@@ -141,11 +140,6 @@
thisObject->JSTestMediaQueryListListener::~JSTestMediaQueryListListener();
}
-JSTestMediaQueryListListener::~JSTestMediaQueryListListener()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestMediaQueryListListenerConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestMediaQueryListListenerPrototype* domObject = jsDynamicCast<JSTestMediaQueryListListenerPrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestMediaQueryListListener : public JSDOMWrapper {
+class JSTestMediaQueryListListener : public JSDOMWrapperWithImplementation<TestMediaQueryListListener> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestMediaQueryListListener> Base;
static JSTestMediaQueryListListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestMediaQueryListListener>&& impl)
{
JSTestMediaQueryListListener* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListener>(globalObject->vm().heap)) JSTestMediaQueryListListener(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestMediaQueryListListener* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestMediaQueryListListener();
DECLARE_INFO;
@@ -51,11 +50,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestMediaQueryListListener& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestMediaQueryListListener* m_impl;
protected:
JSTestMediaQueryListListener(JSC::Structure*, JSDOMGlobalObject*, Ref<TestMediaQueryListListener>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -185,8 +185,7 @@
const ClassInfo JSTestNamedConstructor::s_info = { "TestNamedConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNamedConstructor) };
JSTestNamedConstructor::JSTestNamedConstructor(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNamedConstructor>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestNamedConstructor>(structure, globalObject, WTF::move(impl))
{
}
@@ -206,11 +205,6 @@
thisObject->JSTestNamedConstructor::~JSTestNamedConstructor();
}
-JSTestNamedConstructor::~JSTestNamedConstructor()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestNamedConstructorConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestNamedConstructorPrototype* domObject = jsDynamicCast<JSTestNamedConstructorPrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestNamedConstructor : public JSDOMWrapper {
+class JSTestNamedConstructor : public JSDOMWrapperWithImplementation<TestNamedConstructor> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestNamedConstructor> Base;
static JSTestNamedConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNamedConstructor>&& impl)
{
JSTestNamedConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructor>(globalObject->vm().heap)) JSTestNamedConstructor(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestNamedConstructor* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestNamedConstructor();
DECLARE_INFO;
@@ -52,11 +51,6 @@
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSValue getNamedConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestNamedConstructor& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestNamedConstructor* m_impl;
protected:
JSTestNamedConstructor(JSC::Structure*, JSDOMGlobalObject*, Ref<TestNamedConstructor>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -141,8 +141,7 @@
const ClassInfo JSTestNondeterministic::s_info = { "TestNondeterministic", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNondeterministic) };
JSTestNondeterministic::JSTestNondeterministic(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNondeterministic>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestNondeterministic>(structure, globalObject, WTF::move(impl))
{
}
@@ -162,11 +161,6 @@
thisObject->JSTestNondeterministic::~JSTestNondeterministic();
}
-JSTestNondeterministic::~JSTestNondeterministic()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestNondeterministic : public JSDOMWrapper {
+class JSTestNondeterministic : public JSDOMWrapperWithImplementation<TestNondeterministic> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestNondeterministic> Base;
static JSTestNondeterministic* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNondeterministic>&& impl)
{
JSTestNondeterministic* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministic>(globalObject->vm().heap)) JSTestNondeterministic(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestNondeterministic* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestNondeterministic();
DECLARE_INFO;
@@ -51,11 +50,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestNondeterministic& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestNondeterministic* m_impl;
protected:
JSTestNondeterministic(JSC::Structure*, JSDOMGlobalObject*, Ref<TestNondeterministic>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -707,8 +707,7 @@
const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, CREATE_METHOD_TABLE(JSTestObj) };
JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestObj>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestObj>(structure, globalObject, WTF::move(impl))
{
}
@@ -728,11 +727,6 @@
thisObject->JSTestObj::~JSTestObj();
}
-JSTestObj::~JSTestObj()
-{
- releaseImpl();
-}
-
bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestObj*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestObj : public JSDOMWrapper {
+class JSTestObj : public JSDOMWrapperWithImplementation<TestObj> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestObj> Base;
static JSTestObj* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestObj>&& impl)
{
JSTestObj* ptr = new (NotNull, JSC::allocateCell<JSTestObj>(globalObject->vm().heap)) JSTestObj(structure, globalObject, WTF::move(impl));
@@ -42,7 +42,6 @@
static TestObj* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestObj();
DECLARE_INFO;
@@ -65,11 +64,6 @@
JSC::JSValue customMethod(JSC::ExecState&);
JSC::JSValue customMethodWithArgs(JSC::ExecState&);
static JSC::JSValue classMethod2(JSC::ExecState&);
- TestObj& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestObj* m_impl;
public:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -206,8 +206,7 @@
const ClassInfo JSTestOverloadedConstructors::s_info = { "TestOverloadedConstructors", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestOverloadedConstructors) };
JSTestOverloadedConstructors::JSTestOverloadedConstructors(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverloadedConstructors>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestOverloadedConstructors>(structure, globalObject, WTF::move(impl))
{
}
@@ -227,11 +226,6 @@
thisObject->JSTestOverloadedConstructors::~JSTestOverloadedConstructors();
}
-JSTestOverloadedConstructors::~JSTestOverloadedConstructors()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestOverloadedConstructorsConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestOverloadedConstructorsPrototype* domObject = jsDynamicCast<JSTestOverloadedConstructorsPrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestOverloadedConstructors : public JSDOMWrapper {
+class JSTestOverloadedConstructors : public JSDOMWrapperWithImplementation<TestOverloadedConstructors> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestOverloadedConstructors> Base;
static JSTestOverloadedConstructors* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverloadedConstructors>&& impl)
{
JSTestOverloadedConstructors* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructors>(globalObject->vm().heap)) JSTestOverloadedConstructors(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestOverloadedConstructors* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestOverloadedConstructors();
DECLARE_INFO;
@@ -51,11 +50,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestOverloadedConstructors& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestOverloadedConstructors* m_impl;
protected:
JSTestOverloadedConstructors(JSC::Structure*, JSDOMGlobalObject*, Ref<TestOverloadedConstructors>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -135,8 +135,7 @@
const ClassInfo JSTestOverrideBuiltins::s_info = { "TestOverrideBuiltins", &Base::s_info, &JSTestOverrideBuiltinsTable, CREATE_METHOD_TABLE(JSTestOverrideBuiltins) };
JSTestOverrideBuiltins::JSTestOverrideBuiltins(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverrideBuiltins>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestOverrideBuiltins>(structure, globalObject, WTF::move(impl))
{
}
@@ -156,11 +155,6 @@
thisObject->JSTestOverrideBuiltins::~JSTestOverrideBuiltins();
}
-JSTestOverrideBuiltins::~JSTestOverrideBuiltins()
-{
- releaseImpl();
-}
-
bool JSTestOverrideBuiltins::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestOverrideBuiltins*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestOverrideBuiltins : public JSDOMWrapper {
+class JSTestOverrideBuiltins : public JSDOMWrapperWithImplementation<TestOverrideBuiltins> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestOverrideBuiltins> Base;
static JSTestOverrideBuiltins* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverrideBuiltins>&& impl)
{
JSTestOverrideBuiltins* ptr = new (NotNull, JSC::allocateCell<JSTestOverrideBuiltins>(globalObject->vm().heap)) JSTestOverrideBuiltins(structure, globalObject, WTF::move(impl));
@@ -43,7 +43,6 @@
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestOverrideBuiltins();
DECLARE_INFO;
@@ -54,11 +53,6 @@
static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestOverrideBuiltins& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestOverrideBuiltins* m_impl;
public:
static const unsigned StructureFlags = JSC::HasImpureGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -131,8 +131,7 @@
const ClassInfo JSTestSerializedScriptValueInterface::s_info = { "TestSerializedScriptValueInterface", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterface) };
JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestSerializedScriptValueInterface>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestSerializedScriptValueInterface>(structure, globalObject, WTF::move(impl))
{
}
@@ -152,11 +151,6 @@
thisObject->JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface();
}
-JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface()
-{
- releaseImpl();
-}
-
EncodedJSValue jsTestSerializedScriptValueInterfaceValue(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -29,9 +29,9 @@
namespace WebCore {
-class JSTestSerializedScriptValueInterface : public JSDOMWrapper {
+class JSTestSerializedScriptValueInterface : public JSDOMWrapperWithImplementation<TestSerializedScriptValueInterface> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestSerializedScriptValueInterface> Base;
static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestSerializedScriptValueInterface>&& impl)
{
JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, WTF::move(impl));
@@ -43,7 +43,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static TestSerializedScriptValueInterface* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSTestSerializedScriptValueInterface();
DECLARE_INFO;
@@ -57,11 +56,6 @@
mutable JSC::WriteBarrier<JSC::Unknown> m_cachedReadonlyValue;
static void visitChildren(JSCell*, JSC::SlotVisitor&);
- TestSerializedScriptValueInterface& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestSerializedScriptValueInterface* m_impl;
protected:
JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject*, Ref<TestSerializedScriptValueInterface>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -214,8 +214,7 @@
const ClassInfo JSTestTypedefs::s_info = { "TestTypedefs", &Base::s_info, &JSTestTypedefsTable, CREATE_METHOD_TABLE(JSTestTypedefs) };
JSTestTypedefs::JSTestTypedefs(Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestTypedefs>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<TestTypedefs>(structure, globalObject, WTF::move(impl))
{
}
@@ -235,11 +234,6 @@
thisObject->JSTestTypedefs::~JSTestTypedefs();
}
-JSTestTypedefs::~JSTestTypedefs()
-{
- releaseImpl();
-}
-
bool JSTestTypedefs::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSTestTypedefs*>(object);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSTestTypedefs : public JSDOMWrapper {
+class JSTestTypedefs : public JSDOMWrapperWithImplementation<TestTypedefs> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<TestTypedefs> Base;
static JSTestTypedefs* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestTypedefs>&& impl)
{
JSTestTypedefs* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefs>(globalObject->vm().heap)) JSTestTypedefs(structure, globalObject, WTF::move(impl));
@@ -42,7 +42,6 @@
static TestTypedefs* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
- ~JSTestTypedefs();
DECLARE_INFO;
@@ -52,11 +51,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- TestTypedefs& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- TestTypedefs* m_impl;
public:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
protected:
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -116,8 +116,7 @@
const ClassInfo JSattribute::s_info = { "attribute", &Base::s_info, 0, CREATE_METHOD_TABLE(JSattribute) };
JSattribute::JSattribute(Structure* structure, JSDOMGlobalObject* globalObject, Ref<attribute>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<attribute>(structure, globalObject, WTF::move(impl))
{
}
@@ -137,11 +136,6 @@
thisObject->JSattribute::~JSattribute();
}
-JSattribute::~JSattribute()
-{
- releaseImpl();
-}
-
EncodedJSValue jsattributeReadonly(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(state);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -28,9 +28,9 @@
namespace WebCore {
-class JSattribute : public JSDOMWrapper {
+class JSattribute : public JSDOMWrapperWithImplementation<attribute> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<attribute> Base;
static JSattribute* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<attribute>&& impl)
{
JSattribute* ptr = new (NotNull, JSC::allocateCell<JSattribute>(globalObject->vm().heap)) JSattribute(structure, globalObject, WTF::move(impl));
@@ -42,7 +42,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static attribute* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSattribute();
DECLARE_INFO;
@@ -52,11 +51,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- attribute& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- attribute* m_impl;
protected:
JSattribute(JSC::Structure*, JSDOMGlobalObject*, Ref<attribute>&&);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp 2015-10-01 13:07:55 UTC (rev 190403)
@@ -112,8 +112,7 @@
const ClassInfo JSreadonly::s_info = { "readonly", &Base::s_info, 0, CREATE_METHOD_TABLE(JSreadonly) };
JSreadonly::JSreadonly(Structure* structure, JSDOMGlobalObject* globalObject, Ref<readonly>&& impl)
- : JSDOMWrapper(structure, globalObject)
- , m_impl(&impl.leakRef())
+ : JSDOMWrapperWithImplementation<readonly>(structure, globalObject, WTF::move(impl))
{
}
@@ -133,11 +132,6 @@
thisObject->JSreadonly::~JSreadonly();
}
-JSreadonly::~JSreadonly()
-{
- releaseImpl();
-}
-
EncodedJSValue jsreadonlyConstructor(ExecState* state, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSreadonlyPrototype* domObject = jsDynamicCast<JSreadonlyPrototype*>(baseValue);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h (190402 => 190403)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h 2015-10-01 12:35:38 UTC (rev 190402)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h 2015-10-01 13:07:55 UTC (rev 190403)
@@ -27,9 +27,9 @@
namespace WebCore {
-class JSreadonly : public JSDOMWrapper {
+class JSreadonly : public JSDOMWrapperWithImplementation<readonly> {
public:
- typedef JSDOMWrapper Base;
+ typedef JSDOMWrapperWithImplementation<readonly> Base;
static JSreadonly* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<readonly>&& impl)
{
JSreadonly* ptr = new (NotNull, JSC::allocateCell<JSreadonly>(globalObject->vm().heap)) JSreadonly(structure, globalObject, WTF::move(impl));
@@ -41,7 +41,6 @@
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static readonly* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
- ~JSreadonly();
DECLARE_INFO;
@@ -51,11 +50,6 @@
}
static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
- readonly& impl() const { return *m_impl; }
- void releaseImpl() { std::exchange(m_impl, nullptr)->deref(); }
-
-private:
- readonly* m_impl;
protected:
JSreadonly(JSC::Structure*, JSDOMGlobalObject*, Ref<readonly>&&);