Move generate prototype and constructor classes into the generated implementation files
https://bugs.webkit.org/show_bug.cgi?id=134054
Reviewed by Oliver Hunt.
In an effort to reduce the size of the generated bindings headers, which is important
as the generated headers get included in a lot of places, this patch moves the prototype
and constructor declarations from the header to implementation file. This works because,
for the most part, no code cares about the prototype or constructors except the instance.
There are a few exceptions which had to be accounted for:
- The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
available during initialization, so they remain in the header.
- JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
remains in the header.
- A few classes had custom constructor functions. Instead of keeping the entire constructor
in the header, I opted for pulling just the static constructor function into the header, and
modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
more specific type was unnecessary.
As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
all the headers, which brought in quite a bit.
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::constructJSAudioContext):
(WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
* bindings/js/JSBlobCustom.cpp:
(WebCore::constructJSBlob):
(WebCore::JSBlobConstructor::constructJSBlob): Deleted.
* bindings/js/JSCryptoCustom.cpp:
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::constructJSDOMFormData):
(WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
* bindings/js/JSDOMMimeTypeArrayCustom.cpp:
* bindings/js/JSDOMPluginArrayCustom.cpp:
* bindings/js/JSDOMPluginCustom.cpp:
* bindings/js/JSDataCueCustom.cpp:
(WebCore::constructJSDataCue):
(WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
* bindings/js/JSDataTransferCustom.cpp:
* bindings/js/JSEventCustom.cpp:
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSIDBAnyCustom.cpp:
* bindings/js/JSIDBDatabaseCustom.cpp:
* bindings/js/JSIDBObjectStoreCustom.cpp:
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageDataCustom.cpp:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
* bindings/js/JSLocationCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::constructJSMutationObserver):
(WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
* bindings/js/JSSQLResultSetRowListCustom.cpp:
* bindings/js/JSSQLTransactionSyncCustom.cpp:
* bindings/js/JSSVGLengthCustom.cpp:
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::constructJSSharedWorker):
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
* bindings/js/JSStorageCustom.cpp:
* bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
* bindings/js/JSWebKitPointCustom.cpp:
(WebCore::constructJSWebKitPoint):
(WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
* bindings/js/JSWorkerCustom.cpp:
(WebCore::constructJSWorker):
(WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
* bindings/js/SerializedScriptValue.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GeneratePrototypeDeclaration):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
(HeaderNeedsPrototypeDeclaration):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
* bindings/scripts/test/JS/JSreadonly.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 2b85260..03381ac 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,119 @@
+2014-06-18 Sam Weinig <sam@webkit.org>
+
+ Move generate prototype and constructor classes into the generated implementation files
+ https://bugs.webkit.org/show_bug.cgi?id=134054
+
+ Reviewed by Oliver Hunt.
+
+ In an effort to reduce the size of the generated bindings headers, which is important
+ as the generated headers get included in a lot of places, this patch moves the prototype
+ and constructor declarations from the header to implementation file. This works because,
+ for the most part, no code cares about the prototype or constructors except the instance.
+
+ There are a few exceptions which had to be accounted for:
+ - The global objects (JSDOMWindow and JSWorkerGlobalScope) need to have their prototypes
+ available during initialization, so they remain in the header.
+ - JSLocation requires customizing some aspects of the prototype behavior, so its prototype,
+ and any future class that uses JSCustomNamedGetterOnPrototype or JSCustomDefineOwnPropertyOnPrototype,
+ remains in the header.
+ - A few classes had custom constructor functions. Instead of keeping the entire constructor
+ in the header, I opted for pulling just the static constructor function into the header, and
+ modifying the custom constructors to use the DOMConstructorObject type as the callee, since the
+ more specific type was unnecessary.
+
+ As a result of making these changes, I was also able to remove the #include of JSDOMBinding.h from
+ all the headers, which brought in quite a bit.
+
+ * bindings/js/JSAudioContextCustom.cpp:
+ (WebCore::constructJSAudioContext):
+ (WebCore::JSAudioContextConstructor::constructJSAudioContext): Deleted.
+ * bindings/js/JSBlobCustom.cpp:
+ (WebCore::constructJSBlob):
+ (WebCore::JSBlobConstructor::constructJSBlob): Deleted.
+ * bindings/js/JSCryptoCustom.cpp:
+ * bindings/js/JSDOMFormDataCustom.cpp:
+ (WebCore::constructJSDOMFormData):
+ (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData): Deleted.
+ * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
+ * bindings/js/JSDOMPluginArrayCustom.cpp:
+ * bindings/js/JSDOMPluginCustom.cpp:
+ * bindings/js/JSDataCueCustom.cpp:
+ (WebCore::constructJSDataCue):
+ (WebCore::JSDataCueConstructor::constructJSDataCue): Deleted.
+ * bindings/js/JSDataTransferCustom.cpp:
+ * bindings/js/JSEventCustom.cpp:
+ * bindings/js/JSFileReaderCustom.cpp:
+ * bindings/js/JSHistoryCustom.cpp:
+ * bindings/js/JSIDBAnyCustom.cpp:
+ * bindings/js/JSIDBDatabaseCustom.cpp:
+ * bindings/js/JSIDBObjectStoreCustom.cpp:
+ * bindings/js/JSImageConstructor.cpp:
+ (WebCore::JSImageConstructor::finishCreation):
+ * bindings/js/JSImageDataCustom.cpp:
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ * bindings/js/JSLocationCustom.cpp:
+ * bindings/js/JSMessagePortCustom.cpp:
+ * bindings/js/JSMutationObserverCustom.cpp:
+ (WebCore::constructJSMutationObserver):
+ (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): Deleted.
+ * bindings/js/JSSQLResultSetRowListCustom.cpp:
+ * bindings/js/JSSQLTransactionSyncCustom.cpp:
+ * bindings/js/JSSVGLengthCustom.cpp:
+ * bindings/js/JSSharedWorkerCustom.cpp:
+ (WebCore::constructJSSharedWorker):
+ (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Deleted.
+ * bindings/js/JSStorageCustom.cpp:
+ * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:
+ * bindings/js/JSWebKitPointCustom.cpp:
+ (WebCore::constructJSWebKitPoint):
+ (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint): Deleted.
+ * bindings/js/JSWorkerCustom.cpp:
+ (WebCore::constructJSWorker):
+ (WebCore::JSWorkerConstructor::constructJSWorker): Deleted.
+ * bindings/js/SerializedScriptValue.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateHeader):
+ (GenerateImplementation):
+ (GeneratePrototypeDeclaration):
+ (GenerateConstructorDeclaration):
+ (GenerateConstructorHelperMethods):
+ (HeaderNeedsPrototypeDeclaration):
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+ * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+ * bindings/scripts/test/JS/JSTestEventConstructor.h:
+ * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+ * bindings/scripts/test/JS/JSTestEventTarget.h:
+ * bindings/scripts/test/JS/JSTestException.cpp:
+ * bindings/scripts/test/JS/JSTestException.h:
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ * bindings/scripts/test/JS/JSTestInterface.h:
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+ * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+ * bindings/scripts/test/JS/JSTestNamedConstructor.h:
+ * bindings/scripts/test/JS/JSTestNode.cpp:
+ * bindings/scripts/test/JS/JSTestNode.h:
+ * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+ * bindings/scripts/test/JS/JSTestNondeterministic.h:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ * bindings/scripts/test/JS/JSTestObj.h:
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ * bindings/scripts/test/JS/JSTestTypedefs.h:
+ * bindings/scripts/test/JS/JSattribute.cpp:
+ * bindings/scripts/test/JS/JSattribute.h:
+ * bindings/scripts/test/JS/JSreadonly.cpp:
+ * bindings/scripts/test/JS/JSreadonly.h:
+
+
2014-06-19 peavo@outlook.com <peavo@outlook.com>
[Curl] Compile errors related to http header field names.
diff --git a/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp b/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp
index 853576a..e6b5064 100644
--- a/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp
+++ b/Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp
@@ -33,6 +33,7 @@
#include "AudioBufferSourceNode.h"
#include "JSAudioBuffer.h"
#include <runtime/Error.h>
+#include <runtime/JSCJSValueInlines.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSAudioContextCustom.cpp b/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
index 9093ebe..34b45f3 100644
--- a/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
+++ b/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
@@ -32,6 +32,7 @@
#include "Document.h"
#include "JSAudioBuffer.h"
#include "JSAudioContext.h"
+#include "JSDOMBinding.h"
#include "JSOfflineAudioContext.h"
#include "OfflineAudioContext.h"
#include <runtime/ArrayBuffer.h>
@@ -42,9 +43,9 @@
namespace WebCore {
-EncodedJSValue JSC_HOST_CALL JSAudioContextConstructor::constructJSAudioContext(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSAudioContext(ExecState* exec)
{
- JSAudioContextConstructor* jsConstructor = jsCast<JSAudioContextConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
if (!jsConstructor)
return throwVMError(exec, createReferenceError(exec, "AudioContext constructor callee is unavailable"));
diff --git a/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp b/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp
index fe342b8..f8c1385 100644
--- a/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp
+++ b/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp
@@ -31,6 +31,7 @@
#include "BiquadFilterNode.h"
#include "ExceptionCode.h"
#include <runtime/Error.h>
+#include <runtime/JSCJSValueInlines.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSBlobCustom.cpp b/Source/WebCore/bindings/js/JSBlobCustom.cpp
index 8a6bf3f..293afb3 100644
--- a/Source/WebCore/bindings/js/JSBlobCustom.cpp
+++ b/Source/WebCore/bindings/js/JSBlobCustom.cpp
@@ -59,9 +59,9 @@
return wrap<JSBlob>(globalObject, blob);
}
-EncodedJSValue JSC_HOST_CALL JSBlobConstructor::constructJSBlob(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSBlob(ExecState* exec)
{
- JSBlobConstructor* jsConstructor = jsCast<JSBlobConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
ScriptExecutionContext* context = jsConstructor->scriptExecutionContext();
if (!context)
return throwVMError(exec, createReferenceError(exec, "Blob constructor associated document is unavailable"));
diff --git a/Source/WebCore/bindings/js/JSCryptoCustom.cpp b/Source/WebCore/bindings/js/JSCryptoCustom.cpp
index 9d11771..158b356 100644
--- a/Source/WebCore/bindings/js/JSCryptoCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCryptoCustom.cpp
@@ -26,7 +26,7 @@
#include "JSCrypto.h"
#include "ExceptionCode.h"
-
+#include "JSDOMBinding.h"
#include <runtime/ArrayBufferView.h>
#include <runtime/Error.h>
#include <runtime/JSArrayBufferView.h>
diff --git a/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp b/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp
index b2a3eed..b24ae0c 100644
--- a/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCryptoKeyCustom.cpp
@@ -29,6 +29,7 @@
#if ENABLE(SUBTLE_CRYPTO)
#include "JSCryptoAlgorithmBuilder.h"
+#include <runtime/JSCJSValueInlines.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSCryptoKeyPairCustom.cpp b/Source/WebCore/bindings/js/JSCryptoKeyPairCustom.cpp
index bcfe00c..9fdb89b 100644
--- a/Source/WebCore/bindings/js/JSCryptoKeyPairCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCryptoKeyPairCustom.cpp
@@ -26,6 +26,8 @@
#include "config.h"
#include "JSCryptoKeyPair.h"
+#include <heap/SlotVisitorInlines.h>
+
#if ENABLE(SUBTLE_CRYPTO)
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp b/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp
index 6d371b3..31b180b 100644
--- a/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp
@@ -46,9 +46,9 @@
return value.inherits(JSHTMLFormElement::info()) ? &jsCast<JSHTMLFormElement*>(asObject(value))->impl() : 0;
}
-EncodedJSValue JSC_HOST_CALL JSDOMFormDataConstructor::constructJSDOMFormData(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSDOMFormData(ExecState* exec)
{
- JSDOMFormDataConstructor* jsConstructor = jsCast<JSDOMFormDataConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
HTMLFormElement* form = 0;
if (exec->argumentCount() > 0)
diff --git a/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp b/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp
index 4f1e3d1..7031ba1 100644
--- a/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp
@@ -21,6 +21,7 @@
#include "JSDOMMimeTypeArray.h"
#include "DOMMimeTypeArray.h"
+#include "JSDOMBinding.h"
#include "JSDOMMimeType.h"
#include <wtf/text/AtomicString.h>
diff --git a/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp b/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp
index 9a2fb44..168287a 100644
--- a/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp
@@ -21,6 +21,7 @@
#include "JSDOMPluginArray.h"
#include "DOMPluginArray.h"
+#include "JSDOMBinding.h"
#include "JSDOMPlugin.h"
#include <wtf/text/AtomicString.h>
diff --git a/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp b/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp
index 9b3409a..fb7da06 100644
--- a/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp
@@ -19,7 +19,7 @@
#include "config.h"
#include "JSDOMPlugin.h"
-#include "DOMPlugin.h"
+#include "JSDOMBinding.h"
#include "JSDOMMimeType.h"
#include <wtf/text/AtomicString.h>
diff --git a/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp b/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp
index b73378d..23337b2 100644
--- a/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDOMStringListCustom.cpp
@@ -19,6 +19,8 @@
#include "config.h"
#include "JSDOMStringList.h"
+#include <runtime/JSCJSValueInlines.h>
+
using namespace JSC;
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSDataCueCustom.cpp b/Source/WebCore/bindings/js/JSDataCueCustom.cpp
index 198381d..8757b8c 100644
--- a/Source/WebCore/bindings/js/JSDataCueCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDataCueCustom.cpp
@@ -26,8 +26,11 @@
#include "config.h"
#if ENABLE(VIDEO_TRACK)
+
#include "JSDataCue.h"
+#include "JSDOMBinding.h"
+
using namespace JSC;
namespace WebCore {
@@ -44,9 +47,9 @@
}
#endif
-EncodedJSValue JSC_HOST_CALL JSDataCueConstructor::constructJSDataCue(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSDataCue(ExecState* exec)
{
- JSDataCueConstructor* castedThis = jsCast<JSDataCueConstructor*>(exec->callee());
+ DOMConstructorObject* castedThis = jsCast<DOMConstructorObject*>(exec->callee());
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
diff --git a/Source/WebCore/bindings/js/JSDataTransferCustom.cpp b/Source/WebCore/bindings/js/JSDataTransferCustom.cpp
index 7f60bcb..7918f40 100644
--- a/Source/WebCore/bindings/js/JSDataTransferCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDataTransferCustom.cpp
@@ -29,7 +29,7 @@
#include "config.h"
#include "JSDataTransfer.h"
-#include "DataTransfer.h"
+#include "JSDOMBinding.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSEventCustom.cpp b/Source/WebCore/bindings/js/JSEventCustom.cpp
index 68e5df1..555ad3f 100644
--- a/Source/WebCore/bindings/js/JSEventCustom.cpp
+++ b/Source/WebCore/bindings/js/JSEventCustom.cpp
@@ -34,6 +34,7 @@
#include "EventHeaders.h"
#include "EventInterfaces.h"
#include "EventNames.h"
+#include "JSDOMBinding.h"
#include "JSDataTransfer.h"
#include <runtime/JSLock.h>
#include <wtf/HashMap.h>
diff --git a/Source/WebCore/bindings/js/JSFileReaderCustom.cpp b/Source/WebCore/bindings/js/JSFileReaderCustom.cpp
index bbc0d9a..b1e9c75e 100644
--- a/Source/WebCore/bindings/js/JSFileReaderCustom.cpp
+++ b/Source/WebCore/bindings/js/JSFileReaderCustom.cpp
@@ -33,6 +33,7 @@
#include "JSFileReader.h"
#include "FileReader.h"
+#include "JSDOMBinding.h"
#include <runtime/ArrayBuffer.h>
#include <runtime/JSArrayBuffer.h>
diff --git a/Source/WebCore/bindings/js/JSHistoryCustom.cpp b/Source/WebCore/bindings/js/JSHistoryCustom.cpp
index 6c58ee9..8258270 100644
--- a/Source/WebCore/bindings/js/JSHistoryCustom.cpp
+++ b/Source/WebCore/bindings/js/JSHistoryCustom.cpp
@@ -30,7 +30,7 @@
#include "JSHistory.h"
#include "Frame.h"
-#include "History.h"
+#include "JSDOMBinding.h"
#include "SerializedScriptValue.h"
#include <runtime/JSFunction.h>
diff --git a/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp b/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp
index 146533e..1c08a55 100644
--- a/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp
+++ b/Source/WebCore/bindings/js/JSIDBAnyCustom.cpp
@@ -38,6 +38,7 @@
#include "IDBFactory.h"
#include "IDBIndex.h"
#include "IDBObjectStore.h"
+#include "JSDOMBinding.h"
#include "JSDOMStringList.h"
#include "JSIDBCursor.h"
#include "JSIDBCursorWithValue.h"
diff --git a/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp b/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp
index 9eae756..e6a140f 100644
--- a/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp
+++ b/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp
@@ -35,6 +35,7 @@
#include "IDBDatabase.h"
#include "IDBKeyPath.h"
#include "IDBObjectStore.h"
+#include "JSDOMBinding.h"
#include "JSIDBObjectStore.h"
#include <runtime/Error.h>
#include <runtime/JSString.h>
diff --git a/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp b/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp
index 74fd354..04044d3 100644
--- a/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp
+++ b/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp
@@ -34,6 +34,7 @@
#include "IDBBindingUtilities.h"
#include "IDBKeyPath.h"
#include "IDBObjectStore.h"
+#include "JSDOMBinding.h"
#include "JSIDBIndex.h"
#include <runtime/Error.h>
#include <runtime/JSString.h>
diff --git a/Source/WebCore/bindings/js/JSImageConstructor.cpp b/Source/WebCore/bindings/js/JSImageConstructor.cpp
index a86effd..7007525 100644
--- a/Source/WebCore/bindings/js/JSImageConstructor.cpp
+++ b/Source/WebCore/bindings/js/JSImageConstructor.cpp
@@ -43,7 +43,7 @@
{
Base::finishCreation(globalObject);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElementPrototype::self(vm, globalObject), None);
+ putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::getPrototype(vm, globalObject), None);
}
static EncodedJSValue JSC_HOST_CALL constructImage(ExecState* exec)
diff --git a/Source/WebCore/bindings/js/JSImageDataCustom.cpp b/Source/WebCore/bindings/js/JSImageDataCustom.cpp
index edc5529..5aae5ae 100644
--- a/Source/WebCore/bindings/js/JSImageDataCustom.cpp
+++ b/Source/WebCore/bindings/js/JSImageDataCustom.cpp
@@ -27,6 +27,7 @@
#include "JSImageData.h"
#include "ImageData.h"
+#include "JSDOMBinding.h"
#include <wtf/StdLibExtras.h>
#include <wtf/text/WTFString.h>
diff --git a/Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp b/Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
index 0afd137..f8018c7 100644
--- a/Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
+++ b/Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
@@ -39,6 +39,7 @@
#include "ContextMenuItem.h"
#include "InspectorController.h"
#include "InspectorFrontendHost.h"
+#include "JSDOMBinding.h"
#include "JSEvent.h"
#include "MouseEvent.h"
#include <runtime/JSArray.h>
diff --git a/Source/WebCore/bindings/js/JSLocationCustom.cpp b/Source/WebCore/bindings/js/JSLocationCustom.cpp
index 3099c1e..9f044c4 100644
--- a/Source/WebCore/bindings/js/JSLocationCustom.cpp
+++ b/Source/WebCore/bindings/js/JSLocationCustom.cpp
@@ -23,7 +23,7 @@
#include "config.h"
#include "JSLocation.h"
-#include "Location.h"
+#include "JSDOMBinding.h"
#include <runtime/JSFunction.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSMediaSourceStatesCustom.cpp b/Source/WebCore/bindings/js/JSMediaSourceStatesCustom.cpp
index c2de34b..ca34ac1 100644
--- a/Source/WebCore/bindings/js/JSMediaSourceStatesCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMediaSourceStatesCustom.cpp
@@ -29,7 +29,7 @@
#include "JSMediaSourceStates.h"
-#include "MediaSourceStates.h"
+#include "JSDOMBinding.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp b/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp
index ebc80ac..3ba0ce2 100644
--- a/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp
@@ -31,7 +31,7 @@
#include "JSAllAudioCapabilities.h"
#include "JSAllVideoCapabilities.h"
-#include "MediaStreamCapabilities.h"
+#include "JSDOMBinding.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp b/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
index f714f83..d8a8e48 100644
--- a/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
@@ -28,6 +28,7 @@
#if ENABLE(CHANNEL_MESSAGING)
#include "JSMessageChannel.h"
+#include <heap/SlotVisitorInlines.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSMessagePortCustom.cpp b/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
index 11c1c4b..75abe18 100644
--- a/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
@@ -30,13 +30,15 @@
#include "Event.h"
#include "ExceptionCode.h"
#include "Frame.h"
+#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
#include "JSEvent.h"
#include "JSEventListener.h"
#include "JSMessagePortCustom.h"
#include "MessagePort.h"
-#include <runtime/JSArrayBuffer.h>
+#include <heap/SlotVisitorInlines.h>
#include <runtime/Error.h>
+#include <runtime/JSArrayBuffer.h>
#include <wtf/text/AtomicString.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp b/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp
index ca99e0b..3805572 100644
--- a/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp
@@ -43,7 +43,7 @@
namespace WebCore {
-EncodedJSValue JSC_HOST_CALL JSMutationObserverConstructor::constructJSMutationObserver(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSMutationObserver(ExecState* exec)
{
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
@@ -53,7 +53,7 @@
if (!object || object->methodTable()->getCallData(object, callData) == CallTypeNone)
return throwVMError(exec, createTypeError(exec, "Callback argument must be a function"));
- JSMutationObserverConstructor* jsConstructor = jsCast<JSMutationObserverConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
RefPtr<JSMutationCallback> callback = JSMutationCallback::create(object, jsConstructor->globalObject());
JSObject* jsObserver = asObject(toJS(exec, jsConstructor->globalObject(), MutationObserver::create(callback.release())));
PrivateName propertyName;
diff --git a/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp b/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
index 97caa50..2b4040e 100644
--- a/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
+++ b/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
@@ -21,6 +21,7 @@
#include "JSNodeIterator.h"
#include "Node.h"
+#include <heap/SlotVisitorInlines.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp b/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp
index f44625c..02c2abe 100644
--- a/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp
+++ b/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp
@@ -31,6 +31,7 @@
#include "ExceptionCode.h"
#include "OscillatorNode.h"
#include <runtime/Error.h>
+#include <runtime/JSCJSValueInlines.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp b/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp
index f289785..05aab69 100644
--- a/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp
+++ b/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp
@@ -31,6 +31,7 @@
#include "ExceptionCode.h"
#include "PannerNode.h"
#include <runtime/Error.h>
+#include <runtime/JSCJSValueInlines.h>
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp b/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp
index e4d46f7..47aec80 100644
--- a/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp
+++ b/Source/WebCore/bindings/js/JSPopStateEventCustom.cpp
@@ -29,11 +29,11 @@
*/
#include "config.h"
-
-#include "History.h"
-#include "JSHistory.h"
#include "JSPopStateEvent.h"
+#include "JSHistory.h"
+#include <runtime/JSCJSValueInlines.h>
+
using namespace JSC;
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSRTCIceCandidateCustom.cpp b/Source/WebCore/bindings/js/JSRTCIceCandidateCustom.cpp
index 1139f0c..edf8be7 100644
--- a/Source/WebCore/bindings/js/JSRTCIceCandidateCustom.cpp
+++ b/Source/WebCore/bindings/js/JSRTCIceCandidateCustom.cpp
@@ -31,12 +31,13 @@
#include "Dictionary.h"
#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
using namespace JSC;
namespace WebCore {
-EncodedJSValue JSC_HOST_CALL JSRTCIceCandidateConstructor::constructJSRTCIceCandidate(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSRTCIceCandidate(ExecState* exec)
{
ExceptionCode ec = 0;
Dictionary sessionInit;
@@ -49,7 +50,7 @@
return JSValue::encode(jsUndefined());
}
- JSRTCIceCandidateConstructor* jsConstructor = jsCast<JSRTCIceCandidateConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
RefPtr<RTCIceCandidate> iceCandidate = RTCIceCandidate::create(sessionInit, ec);
if (ec == TYPE_MISMATCH_ERR) {
setDOMException(exec, ec);
diff --git a/Source/WebCore/bindings/js/JSRTCPeerConnectionCustom.cpp b/Source/WebCore/bindings/js/JSRTCPeerConnectionCustom.cpp
index 0627b2f..e5fe2aa 100644
--- a/Source/WebCore/bindings/js/JSRTCPeerConnectionCustom.cpp
+++ b/Source/WebCore/bindings/js/JSRTCPeerConnectionCustom.cpp
@@ -30,12 +30,13 @@
#include "JSRTCPeerConnection.h"
#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
using namespace JSC;
namespace WebCore {
-EncodedJSValue JSC_HOST_CALL JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSRTCPeerConnection(ExecState* exec)
{
// Spec says that we must have at least one arument, the RTCConfiguration.
if (exec->argumentCount() < 1)
@@ -49,7 +50,7 @@
if (!rtcConfiguration.isObject())
return throwVMError(exec, createTypeError(exec, "RTCPeerConnection argument must be a valid Dictionary"));
- JSRTCPeerConnectionConstructor* jsConstructor = jsCast<JSRTCPeerConnectionConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
ScriptExecutionContext* scriptExecutionContext = jsConstructor->scriptExecutionContext();
if (!scriptExecutionContext)
return throwVMError(exec, createReferenceError(exec, "RTCPeerConnection constructor associated document is unavailable"));
diff --git a/Source/WebCore/bindings/js/JSRTCSessionDescriptionCustom.cpp b/Source/WebCore/bindings/js/JSRTCSessionDescriptionCustom.cpp
index 7d1a734..74fe8cb 100644
--- a/Source/WebCore/bindings/js/JSRTCSessionDescriptionCustom.cpp
+++ b/Source/WebCore/bindings/js/JSRTCSessionDescriptionCustom.cpp
@@ -31,12 +31,13 @@
#include "Dictionary.h"
#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
using namespace JSC;
namespace WebCore {
-EncodedJSValue JSC_HOST_CALL JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSRTCSessionDescription(ExecState* exec)
{
ExceptionCode ec = 0;
Dictionary sessionInit;
@@ -49,7 +50,7 @@
return JSValue::encode(jsUndefined());
}
- JSRTCSessionDescriptionConstructor* jsConstructor = jsCast<JSRTCSessionDescriptionConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
RefPtr<RTCSessionDescription> sessionDescription = RTCSessionDescription::create(sessionInit, ec);
if (ec == TYPE_MISMATCH_ERR) {
setDOMException(exec, ec);
diff --git a/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp b/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp
index 62dc8d9..3f71289 100644
--- a/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp
+++ b/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp
@@ -28,6 +28,7 @@
#if ENABLE(MEDIA_STREAM)
#include "JSRTCStatsResponse.h"
+#include "JSDOMBinding.h"
#include "JSRTCStatsReport.h"
#include <wtf/text/AtomicString.h>
diff --git a/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp b/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp
index 8aac6e4..84b4c76 100644
--- a/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp
@@ -33,8 +33,8 @@
#include "JSSQLResultSetRowList.h"
#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
#include "SQLValue.h"
-#include "SQLResultSetRowList.h"
#include <runtime/IdentifierInlines.h>
#include <runtime/ObjectConstructor.h>
diff --git a/Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp b/Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp
index 68bc50c..21dc51e 100644
--- a/Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSQLTransactionSyncCustom.cpp
@@ -33,9 +33,9 @@
#include "JSSQLTransactionSync.h"
#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
#include "JSSQLResultSet.h"
#include "SQLResultSet.h"
-#include "SQLTransactionSync.h"
#include "SQLValue.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSSVGLengthCustom.cpp b/Source/WebCore/bindings/js/JSSVGLengthCustom.cpp
index 4146a41..15c50e5 100644
--- a/Source/WebCore/bindings/js/JSSVGLengthCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSVGLengthCustom.cpp
@@ -21,6 +21,7 @@
#include "JSSVGLength.h"
#include "ExceptionCode.h"
+#include "JSDOMBinding.h"
#include "SVGAnimatedProperty.h"
#include "SVGException.h"
#include "SVGLengthContext.h"
diff --git a/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp b/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
index a0bd866..6761eb4 100644
--- a/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
@@ -50,9 +50,9 @@
visitor.addOpaqueRoot(port);
}
-EncodedJSValue JSC_HOST_CALL JSSharedWorkerConstructor::constructJSSharedWorker(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSSharedWorker(ExecState* exec)
{
- JSSharedWorkerConstructor* jsConstructor = jsCast<JSSharedWorkerConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
diff --git a/Source/WebCore/bindings/js/JSStorageCustom.cpp b/Source/WebCore/bindings/js/JSStorageCustom.cpp
index 32f29d9..dea02e5 100644
--- a/Source/WebCore/bindings/js/JSStorageCustom.cpp
+++ b/Source/WebCore/bindings/js/JSStorageCustom.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "JSStorage.h"
-#include "Storage.h"
+#include "JSDOMBinding.h"
#include <runtime/IdentifierInlines.h>
#include <runtime/PropertyNameArray.h>
#include <wtf/text/WTFString.h>
diff --git a/Source/WebCore/bindings/js/JSTouchCustom.cpp b/Source/WebCore/bindings/js/JSTouchCustom.cpp
index fd3075f..90026f2 100644
--- a/Source/WebCore/bindings/js/JSTouchCustom.cpp
+++ b/Source/WebCore/bindings/js/JSTouchCustom.cpp
@@ -30,7 +30,7 @@
#include "JSTouch.h"
-#include "Touch.h"
+#include "JSDOMBinding.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSTouchListCustom.cpp b/Source/WebCore/bindings/js/JSTouchListCustom.cpp
index 9ab8502..9dedfe8 100644
--- a/Source/WebCore/bindings/js/JSTouchListCustom.cpp
+++ b/Source/WebCore/bindings/js/JSTouchListCustom.cpp
@@ -30,7 +30,7 @@
#include "JSTouchList.h"
-#include "TouchList.h"
+#include "JSDOMBinding.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp b/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
index 05c5304..c1e681d 100644
--- a/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
+++ b/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
@@ -21,6 +21,7 @@
#include "JSTreeWalker.h"
#include "Node.h"
+#include <heap/SlotVisitorInlines.h>
namespace WebCore {
diff --git a/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp b/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp
index 6526033..8fc6ef8 100644
--- a/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp
+++ b/Source/WebCore/bindings/js/JSUserMessageHandlersNamespaceCustom.cpp
@@ -28,6 +28,7 @@
#if ENABLE(USER_MESSAGE_HANDLERS)
+#include "JSDOMBinding.h"
#include "JSUserMessageHandler.h"
using namespace JSC;
diff --git a/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp b/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
index d4effe6..198e99e 100644
--- a/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
+++ b/Source/WebCore/bindings/js/JSWebKitPointCustom.cpp
@@ -26,15 +26,15 @@
#include "config.h"
#include "JSWebKitPoint.h"
-#include "WebKitPoint.h"
+#include "JSDOMBinding.h"
using namespace JSC;
namespace WebCore {
-EncodedJSValue JSC_HOST_CALL JSWebKitPointConstructor::constructJSWebKitPoint(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSWebKitPoint(ExecState* exec)
{
- JSWebKitPointConstructor* jsConstructor = jsCast<JSWebKitPointConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
float x = 0;
float y = 0;
diff --git a/Source/WebCore/bindings/js/JSWorkerCustom.cpp b/Source/WebCore/bindings/js/JSWorkerCustom.cpp
index caa5318..2175fc6 100644
--- a/Source/WebCore/bindings/js/JSWorkerCustom.cpp
+++ b/Source/WebCore/bindings/js/JSWorkerCustom.cpp
@@ -29,10 +29,11 @@
#include "JSWorker.h"
#include "Document.h"
+#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
+#include "JSDOMWindowCustom.h"
#include "JSMessagePortCustom.h"
#include "Worker.h"
-#include "JSDOMWindowCustom.h"
#include <runtime/Error.h>
using namespace JSC;
@@ -44,9 +45,9 @@
return handlePostMessage(exec, &impl());
}
-EncodedJSValue JSC_HOST_CALL JSWorkerConstructor::constructJSWorker(ExecState* exec)
+EncodedJSValue JSC_HOST_CALL constructJSWorker(ExecState* exec)
{
- JSWorkerConstructor* jsConstructor = jsCast<JSWorkerConstructor*>(exec->callee());
+ DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
if (!exec->argumentCount())
return throwVMError(exec, createNotEnoughArgumentsError(exec));
diff --git a/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp b/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
index 88c0716..94f1892 100644
--- a/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
+++ b/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
@@ -34,6 +34,7 @@
#include "JSDedicatedWorkerGlobalScope.h"
#include "JSWorkerGlobalScope.h"
#include "WorkerGlobalScope.h"
+#include <runtime/JSCJSValueInlines.h>
#include <runtime/Microtask.h>
#if ENABLE(SHARED_WORKERS)
diff --git a/Source/WebCore/bindings/js/SerializedScriptValue.cpp b/Source/WebCore/bindings/js/SerializedScriptValue.cpp
index 68a1cea..7ac0f1a 100644
--- a/Source/WebCore/bindings/js/SerializedScriptValue.cpp
+++ b/Source/WebCore/bindings/js/SerializedScriptValue.cpp
@@ -39,6 +39,7 @@
#include "ImageData.h"
#include "JSBlob.h"
#include "JSCryptoKey.h"
+#include "JSDOMBinding.h"
#include "JSDOMGlobalObject.h"
#include "JSFile.h"
#include "JSFileList.h"
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 1d191fe..851b38a 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -803,12 +803,9 @@
if ($hasParent) {
$headerIncludes{"$parentClassName.h"} = 1;
} else {
- $headerIncludes{"JSDOMBinding.h"} = 1;
- $headerIncludes{"<runtime/JSGlobalObject.h>"} = 1;
+ $headerIncludes{"JSDOMWrapper.h"} = 1;
if ($interface->isException) {
$headerIncludes{"<runtime/ErrorPrototype.h>"} = 1;
- } else {
- $headerIncludes{"<runtime/ObjectPrototype.h>"} = 1;
}
}
@@ -820,7 +817,6 @@
$headerIncludes{"$interfaceName.h"} = 1;
}
- $headerIncludes{"<runtime/JSObject.h>"} = 1;
$headerIncludes{"SVGElement.h"} = 1 if $className =~ /^JSSVG/;
my $implType = $interfaceName;
@@ -895,7 +891,10 @@
}
# Prototype
- push(@headerContent, " static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);\n") unless IsDOMGlobalObject($interface);
+ unless (IsDOMGlobalObject($interface)) {
+ push(@headerContent, " static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);\n");
+ push(@headerContent, " static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);\n");
+ }
$headerTrailingIncludes{"${className}Custom.h"} = 1 if $interface->extendedAttributes->{"JSCustomHeader"};
@@ -1114,6 +1113,7 @@
}
push(@headerContent, "protected:\n");
+
# Constructor
if ($interfaceName eq "DOMWindow") {
push(@headerContent, " $className(JSC::VM&, JSC::Structure*, PassRefPtr<$implType>, JSDOMWindowShell*);\n");
@@ -1126,15 +1126,16 @@
push(@headerContent, " Base::finishCreation(vm);\n");
push(@headerContent, " ASSERT(inherits(info()));\n");
push(@headerContent, " }\n\n");
-
}
# structure flags
- push(@headerContent, " static const unsigned StructureFlags = ");
- foreach my $structureFlag (sort (keys %structureFlags)) {
- push(@headerContent, $structureFlag . " | ");
+ if (%structureFlags) {
+ push(@headerContent, " static const unsigned StructureFlags = ");
+ foreach my $structureFlag (sort (keys %structureFlags)) {
+ push(@headerContent, $structureFlag . " | ");
+ }
+ push(@headerContent, "Base::StructureFlags;\n");
}
- push(@headerContent, "Base::StructureFlags;\n");
# Index setter
if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
@@ -1196,14 +1197,8 @@
push(@headerContent, "\n");
# Add prototype declaration.
- GeneratePrototypeDeclaration(\@headerContent, $className, $interface, $interfaceName);
-
- if (!$interface->extendedAttributes->{"NoInterfaceObject"}) {
- $headerIncludes{"JSDOMBinding.h"} = 1;
- if ($interface->extendedAttributes->{"NamedConstructor"}) {
- $headerIncludes{"DOMConstructorWithDocument.h"} = 1;
- }
- GenerateConstructorDeclaration(\@headerContent, $className, $interface, $interfaceName);
+ if (HeaderNeedsPrototypeDeclaration($interface)) {
+ GeneratePrototypeDeclaration(\@headerContent, $className, $interface, $interfaceName);
}
if ($hasForwardDeclaringFunctions) {
@@ -1251,6 +1246,15 @@
}
}
+ if (HasCustomConstructor($interface)) {
+ push(@headerContent, "// Custom constructor\n");
+ push(@headerContent, "JSC::EncodedJSValue JSC_HOST_CALL construct${className}(JSC::ExecState*);\n\n");
+ }
+
+ if ($codeGenerator->IsConstructorTemplate($interface, "Event")) {
+ push(@headerContent, "bool fill${interfaceName}Init(${interfaceName}Init&, JSDictionary&);\n\n");
+ }
+
my $conditionalString = $codeGenerator->GenerateConditionalString($interface);
push(@headerContent, "\n} // namespace WebCore\n\n");
push(@headerContent, "#endif // ${conditionalString}\n\n") if $conditionalString;
@@ -1692,6 +1696,7 @@
# - Add default header template
push(@implContentHeader, GenerateImplementationContentHeader($interface));
+ $implIncludes{"JSDOMBinding.h"} = 1;
$implIncludes{"<wtf/GetPtr.h>"} = 1;
$implIncludes{"<runtime/PropertyNameArray.h>"} = 1 if $indexedGetterFunction;
@@ -1732,10 +1737,12 @@
}
push(@implContent, $endAppleCopyright) if $inAppleCopyright;
+
+ push(@implContent, "\n");
}
if ($numAttributes > 0 || !$interface->extendedAttributes->{"NoInterfaceObject"}) {
- push(@implContent,"// Attributes\n\n");
+ push(@implContent, "// Attributes\n\n");
foreach my $attribute (@{$interface->attributes}) {
next if $attribute->signature->extendedAttributes->{"ForwardDeclareInHeader"};
@@ -1759,8 +1766,25 @@
my $constructorFunctionName = "setJS" . $interfaceName . "Constructor";
push(@implContent, "void ${constructorFunctionName}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);\n");
}
+
+ push(@implContent, "\n");
}
+ # Add prototype declaration.
+ if (!HeaderNeedsPrototypeDeclaration($interface)) {
+ GeneratePrototypeDeclaration(\@implContent, $className, $interface, $interfaceName);
+ }
+
+ # Add constructor declaration
+ if (!$interface->extendedAttributes->{"NoInterfaceObject"}) {
+ $implIncludes{"JSDOMBinding.h"} = 1;
+ if ($interface->extendedAttributes->{"NamedConstructor"}) {
+ $implIncludes{"DOMConstructorWithDocument.h"} = 1;
+ }
+ GenerateConstructorDeclaration(\@implContent, $className, $interface, $interfaceName);
+ }
+
+
my @hashKeys = ();
my @hashValue1 = ();
my @hashValue2 = ();
@@ -1944,12 +1968,6 @@
} else {
push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleInterfaceName}Prototype\", &Base::s_info, &${className}PrototypeTable, 0, CREATE_METHOD_TABLE(${className}Prototype) };\n\n");
}
- unless (IsDOMGlobalObject($interface)) {
- push(@implContent, "JSObject* ${className}Prototype::self(VM& vm, JSGlobalObject* globalObject)\n");
- push(@implContent, "{\n");
- push(@implContent, " return getDOMPrototype<${className}>(vm, globalObject);\n");
- push(@implContent, "}\n\n");
- }
if (PrototypeOverridesGetOwnPropertySlot($interface)) {
my $numPrototypeAttributes = PrototypeAttributeCount($interface);
@@ -2053,12 +2071,17 @@
push(@implContent, "JSObject* ${className}::createPrototype(VM& vm, JSGlobalObject* globalObject)\n");
push(@implContent, "{\n");
if ($hasParent && $parentClassName ne "JSC::DOMNodeFilter") {
- push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, ${parentClassName}Prototype::self(vm, globalObject)));\n");
+ push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, ${parentClassName}::getPrototype(vm, globalObject)));\n");
} else {
my $prototype = $interface->isException ? "errorPrototype" : "objectPrototype";
push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, globalObject->${prototype}()));\n");
}
push(@implContent, "}\n\n");
+
+ push(@implContent, "JSObject* ${className}::getPrototype(VM& vm, JSGlobalObject* globalObject)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " return getDOMPrototype<${className}>(vm, globalObject);\n");
+ push(@implContent, "}\n\n");
}
if (!$hasParent) {
@@ -4266,9 +4289,6 @@
push(@$outputArray, "class ${prototypeClassName} : public JSC::JSNonFinalObject {\n");
push(@$outputArray, "public:\n");
push(@$outputArray, " typedef JSC::JSNonFinalObject Base;\n");
- unless (IsDOMGlobalObject($interface)) {
- push(@$outputArray, " static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);\n");
- }
push(@$outputArray, " static ${prototypeClassName}* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)\n");
push(@$outputArray, " {\n");
@@ -4279,7 +4299,20 @@
push(@$outputArray, " DECLARE_INFO;\n");
+ push(@$outputArray,
+ " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\n" .
+ " {\n" .
+ " return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());\n" .
+ " }\n");
+
+ push(@$outputArray, "\nprivate:\n");
+ push(@$outputArray, " ${prototypeClassName}(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)\n");
+ push(@$outputArray, " : JSC::JSNonFinalObject(vm, structure)\n");
+ push(@$outputArray, " {\n");
+ push(@$outputArray, " }\n");
+
if (PrototypeOverridesGetOwnPropertySlot($interface)) {
+ push(@$outputArray, "\n");
if (IsDOMGlobalObject($interface)) {
push(@$outputArray, " static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);\n");
$structureFlags{"JSC::OverridesGetOwnPropertySlot"} = 1;
@@ -4287,21 +4320,18 @@
push(@$outputArray, " void finishCreation(JSC::VM&);\n");
}
}
- push(@$outputArray,
- " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\n" .
- " {\n" .
- " return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());\n" .
- " }\n");
+
if ($interface->extendedAttributes->{"JSCustomNamedGetterOnPrototype"}) {
+ push(@$outputArray, "\n");
push(@$outputArray, " static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
push(@$outputArray, " bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
}
# Custom defineOwnProperty function
- push(@$outputArray, " static bool defineOwnProperty(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow);\n") if $interface->extendedAttributes->{"JSCustomDefineOwnPropertyOnPrototype"};
-
- push(@$outputArray, "\nprivate:\n");
- push(@$outputArray, " ${prototypeClassName}(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }\n");
+ if ($interface->extendedAttributes->{"JSCustomDefineOwnPropertyOnPrototype"}) {
+ push(@$outputArray, "\n");
+ push(@$outputArray, " static bool defineOwnProperty(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow);\n");
+ }
# structure flags
if (%structureFlags) {
@@ -4347,10 +4377,9 @@
push(@$outputArray, " }\n");
if (IsConstructable($interface) && !$interface->extendedAttributes->{"NamedConstructor"}) {
- push(@$outputArray, "protected:\n");
- push(@$outputArray, " static JSC::EncodedJSValue JSC_HOST_CALL construct${className}(JSC::ExecState*);\n");
-
if (!HasCustomConstructor($interface)) {
+ push(@$outputArray, "protected:\n");
+ push(@$outputArray, " static JSC::EncodedJSValue JSC_HOST_CALL construct${className}(JSC::ExecState*);\n");
my @constructors = @{$interface->constructors};
if (@constructors > 1) {
foreach my $constructor (@constructors) {
@@ -4367,10 +4396,6 @@
}
push(@$outputArray, "};\n\n");
- if ($codeGenerator->IsConstructorTemplate($interface, "Event")) {
- push(@$outputArray, "bool fill${interfaceName}Init(${interfaceName}Init&, JSDictionary&);\n\n");
- }
-
if ($interface->extendedAttributes->{"NamedConstructor"}) {
push(@$outputArray, <<END);
class JS${interfaceName}NamedConstructor : public DOMConstructorWithDocument {
@@ -4694,11 +4719,11 @@
} elsif ($generatingNamedConstructor) {
push(@$outputArray, " Base::finishCreation(globalObject);\n");
push(@$outputArray, " ASSERT(inherits(info()));\n");
- push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}Prototype::self(vm, globalObject), None);\n");
+ push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::getPrototype(vm, globalObject), None);\n");
} else {
push(@$outputArray, " Base::finishCreation(vm);\n");
push(@$outputArray, " ASSERT(inherits(info()));\n");
- push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${protoClassName}::self(vm, globalObject), DontDelete | ReadOnly);\n");
+ push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::getPrototype(vm, globalObject), DontDelete | ReadOnly);\n");
}
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), ReadOnly | DontDelete | DontEnum);\n") if defined $leastConstructorLength;
push(@$outputArray, " reifyStaticProperties(vm, ${className}ConstructorTableValues, *this);\n") if ConstructorHasProperties($interface);
@@ -4752,4 +4777,11 @@
return HasCustomConstructor($interface) || $interface->extendedAttributes->{"Constructor"} || $interface->extendedAttributes->{"NamedConstructor"} || $interface->extendedAttributes->{"ConstructorTemplate"};
}
+sub HeaderNeedsPrototypeDeclaration
+{
+ my $interface = shift;
+
+ return IsDOMGlobalObject($interface) || $interface->extendedAttributes->{"JSCustomNamedGetterOnPrototype"} || $interface->extendedAttributes->{"JSCustomDefineOwnPropertyOnPrototype"};
+}
+
1;
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
index 92bbbc9..e696651 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
@@ -37,10 +37,58 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestActiveDOMObjectExcitingAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestActiveDOMObjectConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestActiveDOMObjectPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestActiveDOMObjectPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestActiveDOMObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectPrototype>(vm.heap)) JSTestActiveDOMObjectPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestActiveDOMObjectPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestActiveDOMObjectConstructor : public DOMConstructorObject {
+private:
+ JSTestActiveDOMObjectConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestActiveDOMObjectConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestActiveDOMObjectConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectConstructor>(vm.heap)) JSTestActiveDOMObjectConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestActiveDOMObjectTableIndex[4] = {
@@ -82,7 +130,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObjectPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -105,11 +153,6 @@
static const HashTable JSTestActiveDOMObjectPrototypeTable = { 2, 3, false, JSTestActiveDOMObjectPrototypeTableValues, 0, JSTestActiveDOMObjectPrototypeTableIndex };
const ClassInfo JSTestActiveDOMObjectPrototype::s_info = { "TestActiveDOMObjectPrototype", &Base::s_info, &JSTestActiveDOMObjectPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestActiveDOMObjectPrototype) };
-JSObject* JSTestActiveDOMObjectPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestActiveDOMObject>(vm, globalObject);
-}
-
void JSTestActiveDOMObjectPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -129,6 +172,11 @@
return JSTestActiveDOMObjectPrototype::create(vm, globalObject, JSTestActiveDOMObjectPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestActiveDOMObject::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestActiveDOMObject>(vm, globalObject);
+}
+
void JSTestActiveDOMObject::destroy(JSC::JSCell* cell)
{
JSTestActiveDOMObject* thisObject = static_cast<JSTestActiveDOMObject*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
index d3d2a5e..886152a 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
@@ -21,11 +21,8 @@
#ifndef JSTestActiveDOMObject_h
#define JSTestActiveDOMObject_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestActiveDOMObject.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestActiveDOMObject();
@@ -96,49 +94,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
TestActiveDOMObject* toTestActiveDOMObject(JSC::JSValue);
-class JSTestActiveDOMObjectPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestActiveDOMObjectPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestActiveDOMObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectPrototype>(vm.heap)) JSTestActiveDOMObjectPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestActiveDOMObjectPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestActiveDOMObjectConstructor : public DOMConstructorObject {
-private:
- JSTestActiveDOMObjectConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestActiveDOMObjectConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestActiveDOMObjectConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectConstructor>(vm.heap)) JSTestActiveDOMObjectConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
index 7c44dad..1f9ca19 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
@@ -35,9 +35,57 @@
// Functions
JSC::EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunction(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestCustomNamedGetterConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestCustomNamedGetterPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestCustomNamedGetterPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterPrototype>(vm.heap)) JSTestCustomNamedGetterPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestCustomNamedGetterPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestCustomNamedGetterConstructor : public DOMConstructorObject {
+private:
+ JSTestCustomNamedGetterConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestCustomNamedGetterConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestCustomNamedGetterConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterConstructor>(vm.heap)) JSTestCustomNamedGetterConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestCustomNamedGetterTableIndex[2] = {
@@ -76,7 +124,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetterPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetter::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -96,11 +144,6 @@
static const HashTable JSTestCustomNamedGetterPrototypeTable = { 1, 1, false, JSTestCustomNamedGetterPrototypeTableValues, 0, JSTestCustomNamedGetterPrototypeTableIndex };
const ClassInfo JSTestCustomNamedGetterPrototype::s_info = { "TestCustomNamedGetterPrototype", &Base::s_info, &JSTestCustomNamedGetterPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestCustomNamedGetterPrototype) };
-JSObject* JSTestCustomNamedGetterPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestCustomNamedGetter>(vm, globalObject);
-}
-
void JSTestCustomNamedGetterPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -120,6 +163,11 @@
return JSTestCustomNamedGetterPrototype::create(vm, globalObject, JSTestCustomNamedGetterPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestCustomNamedGetter::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestCustomNamedGetter>(vm, globalObject);
+}
+
void JSTestCustomNamedGetter::destroy(JSC::JSCell* cell)
{
JSTestCustomNamedGetter* thisObject = static_cast<JSTestCustomNamedGetter*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
index c0d2f59..24b20b0 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
@@ -21,11 +21,8 @@
#ifndef JSTestCustomNamedGetter_h
#define JSTestCustomNamedGetter_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestCustomNamedGetter.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
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*);
@@ -100,49 +98,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
TestCustomNamedGetter* toTestCustomNamedGetter(JSC::JSValue);
-class JSTestCustomNamedGetterPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestCustomNamedGetterPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterPrototype>(vm.heap)) JSTestCustomNamedGetterPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestCustomNamedGetterPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestCustomNamedGetterConstructor : public DOMConstructorObject {
-private:
- JSTestCustomNamedGetterConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestCustomNamedGetterConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestCustomNamedGetterConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterConstructor>(vm.heap)) JSTestCustomNamedGetterConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
index 29b92d2..967ccce 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "JSTestEventConstructor.h"
+#include "JSDOMBinding.h"
#include "JSDictionary.h"
#include "ScriptExecutionContext.h"
#include "TestEventConstructor.h"
@@ -38,6 +39,56 @@
JSC::EncodedJSValue jsTestEventConstructorAttr1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestEventConstructorAttr2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestEventConstructorConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestEventConstructorPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestEventConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestEventConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorPrototype>(vm.heap)) JSTestEventConstructorPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestEventConstructorPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestEventConstructorConstructor : public DOMConstructorObject {
+private:
+ JSTestEventConstructorConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestEventConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestEventConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorConstructor>(vm.heap)) JSTestEventConstructorConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+protected:
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestEventConstructor(JSC::ExecState*);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestEventConstructorConstructorTableIndex[1] = {
@@ -100,7 +151,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructorPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
}
@@ -135,11 +186,6 @@
static const HashTable JSTestEventConstructorPrototypeTable = { 3, 7, true, JSTestEventConstructorPrototypeTableValues, 0, JSTestEventConstructorPrototypeTableIndex };
const ClassInfo JSTestEventConstructorPrototype::s_info = { "TestEventConstructorPrototype", &Base::s_info, &JSTestEventConstructorPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestEventConstructorPrototype) };
-JSObject* JSTestEventConstructorPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestEventConstructor>(vm, globalObject);
-}
-
void JSTestEventConstructorPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -159,6 +205,11 @@
return JSTestEventConstructorPrototype::create(vm, globalObject, JSTestEventConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestEventConstructor::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestEventConstructor>(vm, globalObject);
+}
+
void JSTestEventConstructor::destroy(JSC::JSCell* cell)
{
JSTestEventConstructor* thisObject = static_cast<JSTestEventConstructor*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
index 7dec78c..c418679 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
@@ -21,11 +21,8 @@
#ifndef JSTestEventConstructor_h
#define JSTestEventConstructor_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestEventConstructor.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -42,6 +39,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestEventConstructor();
DECLARE_INFO;
@@ -74,7 +72,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSTestEventConstructorOwner : public JSC::WeakHandleOwner {
@@ -97,52 +94,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
TestEventConstructor* toTestEventConstructor(JSC::JSValue);
-class JSTestEventConstructorPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestEventConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestEventConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorPrototype>(vm.heap)) JSTestEventConstructorPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestEventConstructorPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestEventConstructorConstructor : public DOMConstructorObject {
-private:
- JSTestEventConstructorConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestEventConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestEventConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorConstructor>(vm.heap)) JSTestEventConstructorConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-protected:
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestEventConstructor(JSC::ExecState*);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-};
-
bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
index b248429..64704d0 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
@@ -44,9 +44,57 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionAddEventListener(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionRemoveEventListener(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestEventTargetConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestEventTargetPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestEventTargetPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestEventTargetPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetPrototype>(vm.heap)) JSTestEventTargetPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestEventTargetPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestEventTargetConstructor : public DOMConstructorObject {
+private:
+ JSTestEventTargetConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestEventTargetConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestEventTargetConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetConstructor>(vm.heap)) JSTestEventTargetConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestEventTargetTableIndex[2] = {
@@ -85,7 +133,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestEventTargetPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -114,11 +162,6 @@
static const HashTable JSTestEventTargetPrototypeTable = { 4, 7, false, JSTestEventTargetPrototypeTableValues, 0, JSTestEventTargetPrototypeTableIndex };
const ClassInfo JSTestEventTargetPrototype::s_info = { "TestEventTargetPrototype", &Base::s_info, &JSTestEventTargetPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestEventTargetPrototype) };
-JSObject* JSTestEventTargetPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestEventTarget>(vm, globalObject);
-}
-
void JSTestEventTargetPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -138,6 +181,11 @@
return JSTestEventTargetPrototype::create(vm, globalObject, JSTestEventTargetPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestEventTarget::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestEventTarget>(vm, globalObject);
+}
+
void JSTestEventTarget::destroy(JSC::JSCell* cell)
{
JSTestEventTarget* thisObject = static_cast<JSTestEventTarget*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
index 0833e75..8262646 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
@@ -21,11 +21,8 @@
#ifndef JSTestEventTarget_h
#define JSTestEventTarget_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestEventTarget.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -41,6 +38,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
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*);
@@ -104,49 +102,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
TestEventTarget* toTestEventTarget(JSC::JSValue);
-class JSTestEventTargetPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestEventTargetPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestEventTargetPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetPrototype>(vm.heap)) JSTestEventTargetPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestEventTargetPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestEventTargetConstructor : public DOMConstructorObject {
-private:
- JSTestEventTargetConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestEventTargetConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestEventTargetConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetConstructor>(vm.heap)) JSTestEventTargetConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
index 3a54294..4ae9858 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "JSTestException.h"
+#include "JSDOMBinding.h"
#include "ScriptExecutionContext.h"
#include "TestException.h"
#include "URL.h"
@@ -35,6 +36,53 @@
JSC::EncodedJSValue jsTestExceptionName(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestExceptionConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestExceptionPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestExceptionPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestExceptionPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionPrototype>(vm.heap)) JSTestExceptionPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestExceptionPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestExceptionConstructor : public DOMConstructorObject {
+private:
+ JSTestExceptionConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestExceptionConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestExceptionConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionConstructor>(vm.heap)) JSTestExceptionConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestExceptionTableIndex[2] = {
@@ -73,7 +121,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestExceptionPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestException::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -93,11 +141,6 @@
static const HashTable JSTestExceptionPrototypeTable = { 1, 1, true, JSTestExceptionPrototypeTableValues, 0, JSTestExceptionPrototypeTableIndex };
const ClassInfo JSTestExceptionPrototype::s_info = { "TestExceptionPrototype", &Base::s_info, &JSTestExceptionPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestExceptionPrototype) };
-JSObject* JSTestExceptionPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestException>(vm, globalObject);
-}
-
void JSTestExceptionPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -117,6 +160,11 @@
return JSTestExceptionPrototype::create(vm, globalObject, JSTestExceptionPrototype::createStructure(vm, globalObject, globalObject->errorPrototype()));
}
+JSObject* JSTestException::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestException>(vm, globalObject);
+}
+
void JSTestException::destroy(JSC::JSCell* cell)
{
JSTestException* thisObject = static_cast<JSTestException*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestException.h b/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
index 2450edb..0ea5251 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
@@ -21,11 +21,9 @@
#ifndef JSTestException_h
#define JSTestException_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestException.h"
#include <runtime/ErrorPrototype.h>
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
namespace WebCore {
@@ -40,6 +38,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestException();
@@ -96,49 +95,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
TestException* toTestException(JSC::JSValue);
-class JSTestExceptionPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestExceptionPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestExceptionPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionPrototype>(vm.heap)) JSTestExceptionPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestExceptionPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestExceptionConstructor : public DOMConstructorObject {
-private:
- JSTestExceptionConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestExceptionConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestExceptionConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionConstructor>(vm.heap)) JSTestExceptionConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
index aa5cbb7..b05f8be 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "JSTestGenerateIsReachable.h"
+#include "JSDOMBinding.h"
#include "TestGenerateIsReachable.h"
#include <wtf/GetPtr.h>
@@ -31,6 +32,53 @@
// Attributes
JSC::EncodedJSValue jsTestGenerateIsReachableConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestGenerateIsReachablePrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestGenerateIsReachablePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestGenerateIsReachablePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachablePrototype>(vm.heap)) JSTestGenerateIsReachablePrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestGenerateIsReachablePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestGenerateIsReachableConstructor : public DOMConstructorObject {
+private:
+ JSTestGenerateIsReachableConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestGenerateIsReachableConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestGenerateIsReachableConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachableConstructor>(vm.heap)) JSTestGenerateIsReachableConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestGenerateIsReachableConstructorTableIndex[1] = {
@@ -55,7 +103,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachablePrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -75,11 +123,6 @@
static const HashTable JSTestGenerateIsReachablePrototypeTable = { 1, 1, true, JSTestGenerateIsReachablePrototypeTableValues, 0, JSTestGenerateIsReachablePrototypeTableIndex };
const ClassInfo JSTestGenerateIsReachablePrototype::s_info = { "TestGenerateIsReachablePrototype", &Base::s_info, &JSTestGenerateIsReachablePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachablePrototype) };
-JSObject* JSTestGenerateIsReachablePrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject);
-}
-
void JSTestGenerateIsReachablePrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -99,6 +142,11 @@
return JSTestGenerateIsReachablePrototype::create(vm, globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestGenerateIsReachable::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject);
+}
+
void JSTestGenerateIsReachable::destroy(JSC::JSCell* cell)
{
JSTestGenerateIsReachable* thisObject = static_cast<JSTestGenerateIsReachable*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
index c3f8b9d..5c12128 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
@@ -21,11 +21,8 @@
#ifndef JSTestGenerateIsReachable_h
#define JSTestGenerateIsReachable_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestGenerateIsReachable.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestGenerateIsReachable();
DECLARE_INFO;
@@ -72,7 +70,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSTestGenerateIsReachableOwner : public JSC::WeakHandleOwner {
@@ -95,49 +92,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
TestGenerateIsReachable* toTestGenerateIsReachable(JSC::JSValue);
-class JSTestGenerateIsReachablePrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestGenerateIsReachablePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestGenerateIsReachablePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachablePrototype>(vm.heap)) JSTestGenerateIsReachablePrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestGenerateIsReachablePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestGenerateIsReachableConstructor : public DOMConstructorObject {
-private:
- JSTestGenerateIsReachableConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestGenerateIsReachableConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestGenerateIsReachableConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachableConstructor>(vm.heap)) JSTestGenerateIsReachableConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
index a855046..b25c356 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
@@ -74,6 +74,7 @@
#if ENABLE(Condition11) || ENABLE(Condition12)
JSC::EncodedJSValue JSC_HOST_CALL jsTestInterfaceConstructorFunctionSupplementalMethod4(JSC::ExecState*);
#endif
+
// Attributes
#if ENABLE(Condition22) || ENABLE(Condition23)
@@ -121,6 +122,58 @@
void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
JSC::EncodedJSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestInterfacePrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfacePrototype>(vm.heap)) JSTestInterfacePrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestInterfaceConstructor : public DOMConstructorObject {
+private:
+ JSTestInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestInterfaceConstructor>(vm.heap)) JSTestInterfaceConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+protected:
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestInterface(JSC::ExecState*);
+#if ENABLE(TEST_INTERFACE)
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+#endif // ENABLE(TEST_INTERFACE)
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestInterfaceTableIndex[4] = {
@@ -266,7 +319,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestInterfacePrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestInterface::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
reifyStaticProperties(vm, JSTestInterfaceConstructorTableValues, *this);
}
@@ -438,11 +491,6 @@
static const HashTable JSTestInterfacePrototypeTable = { 17, 63, true, JSTestInterfacePrototypeTableValues, 0, JSTestInterfacePrototypeTableIndex };
const ClassInfo JSTestInterfacePrototype::s_info = { "TestInterfacePrototype", &Base::s_info, &JSTestInterfacePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestInterfacePrototype) };
-JSObject* JSTestInterfacePrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestInterface>(vm, globalObject);
-}
-
void JSTestInterfacePrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -462,6 +510,11 @@
return JSTestInterfacePrototype::create(vm, globalObject, JSTestInterfacePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestInterface::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestInterface>(vm, globalObject);
+}
+
void JSTestInterface::destroy(JSC::JSCell* cell)
{
JSTestInterface* thisObject = static_cast<JSTestInterface*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
index cad9d23..d44c14d 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
@@ -23,11 +23,8 @@
#if ENABLE(Condition1) || ENABLE(Condition2)
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestInterface.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -42,6 +39,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
static void putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow);
@@ -123,54 +121,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
TestInterface* toTestInterface(JSC::JSValue);
-class JSTestInterfacePrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfacePrototype>(vm.heap)) JSTestInterfacePrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestInterfaceConstructor : public DOMConstructorObject {
-private:
- JSTestInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestInterfaceConstructor>(vm.heap)) JSTestInterfaceConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-protected:
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestInterface(JSC::ExecState*);
-#if ENABLE(TEST_INTERFACE)
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-#endif // ENABLE(TEST_INTERFACE)
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
index 409625b..23fd4d4d 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
@@ -35,9 +35,57 @@
// Functions
JSC::EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestMediaQueryListListenerConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestMediaQueryListListenerPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestMediaQueryListListenerPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerPrototype>(vm.heap)) JSTestMediaQueryListListenerPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestMediaQueryListListenerPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestMediaQueryListListenerConstructor : public DOMConstructorObject {
+private:
+ JSTestMediaQueryListListenerConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestMediaQueryListListenerConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestMediaQueryListListenerConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerConstructor>(vm.heap)) JSTestMediaQueryListListenerConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestMediaQueryListListenerConstructorTableIndex[1] = {
@@ -62,7 +110,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListenerPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -85,11 +133,6 @@
static const HashTable JSTestMediaQueryListListenerPrototypeTable = { 2, 3, true, JSTestMediaQueryListListenerPrototypeTableValues, 0, JSTestMediaQueryListListenerPrototypeTableIndex };
const ClassInfo JSTestMediaQueryListListenerPrototype::s_info = { "TestMediaQueryListListenerPrototype", &Base::s_info, &JSTestMediaQueryListListenerPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestMediaQueryListListenerPrototype) };
-JSObject* JSTestMediaQueryListListenerPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestMediaQueryListListener>(vm, globalObject);
-}
-
void JSTestMediaQueryListListenerPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -109,6 +152,11 @@
return JSTestMediaQueryListListenerPrototype::create(vm, globalObject, JSTestMediaQueryListListenerPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestMediaQueryListListener::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestMediaQueryListListener>(vm, globalObject);
+}
+
void JSTestMediaQueryListListener::destroy(JSC::JSCell* cell)
{
JSTestMediaQueryListListener* thisObject = static_cast<JSTestMediaQueryListListener*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
index 1c29b8c..8197c7d 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
@@ -21,11 +21,8 @@
#ifndef JSTestMediaQueryListListener_h
#define JSTestMediaQueryListListener_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestMediaQueryListListener.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestMediaQueryListListener();
DECLARE_INFO;
@@ -72,7 +70,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSTestMediaQueryListListenerOwner : public JSC::WeakHandleOwner {
@@ -95,49 +92,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue);
-class JSTestMediaQueryListListenerPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestMediaQueryListListenerPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerPrototype>(vm.heap)) JSTestMediaQueryListListenerPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestMediaQueryListListenerPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestMediaQueryListListenerConstructor : public DOMConstructorObject {
-private:
- JSTestMediaQueryListListenerConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestMediaQueryListListenerConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestMediaQueryListListenerConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerConstructor>(vm.heap)) JSTestMediaQueryListListenerConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
index f00a254..42d2f1f 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "JSTestNamedConstructor.h"
+#include "DOMConstructorWithDocument.h"
#include "ExceptionCode.h"
#include "JSDOMBinding.h"
#include "TestNamedConstructor.h"
@@ -34,6 +35,78 @@
// Attributes
JSC::EncodedJSValue jsTestNamedConstructorConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestNamedConstructorPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestNamedConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestNamedConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorPrototype>(vm.heap)) JSTestNamedConstructorPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestNamedConstructorPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestNamedConstructorConstructor : public DOMConstructorObject {
+private:
+ JSTestNamedConstructorConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestNamedConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestNamedConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorConstructor>(vm.heap)) JSTestNamedConstructorConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
+class JSTestNamedConstructorNamedConstructor : public DOMConstructorWithDocument {
+public:
+ typedef DOMConstructorWithDocument Base;
+
+ static JSTestNamedConstructorNamedConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestNamedConstructorNamedConstructor* constructor = new (NotNull, JSC::allocateCell<JSTestNamedConstructorNamedConstructor>(vm.heap)) JSTestNamedConstructorNamedConstructor(structure, globalObject);
+ constructor->finishCreation(vm, globalObject);
+ return constructor;
+ }
+
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+ DECLARE_INFO;
+
+private:
+ JSTestNamedConstructorNamedConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNamedConstructor(JSC::ExecState*);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestNamedConstructorConstructorTableIndex[1] = {
@@ -58,7 +131,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructorPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -96,7 +169,7 @@
{
Base::finishCreation(globalObject);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructorPrototype::self(vm, globalObject), None);
+ putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::getPrototype(vm, globalObject), None);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -122,11 +195,6 @@
static const HashTable JSTestNamedConstructorPrototypeTable = { 1, 1, true, JSTestNamedConstructorPrototypeTableValues, 0, JSTestNamedConstructorPrototypeTableIndex };
const ClassInfo JSTestNamedConstructorPrototype::s_info = { "TestNamedConstructorPrototype", &Base::s_info, &JSTestNamedConstructorPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestNamedConstructorPrototype) };
-JSObject* JSTestNamedConstructorPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestNamedConstructor>(vm, globalObject);
-}
-
void JSTestNamedConstructorPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -146,6 +214,11 @@
return JSTestNamedConstructorPrototype::create(vm, globalObject, JSTestNamedConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestNamedConstructor::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestNamedConstructor>(vm, globalObject);
+}
+
void JSTestNamedConstructor::destroy(JSC::JSCell* cell)
{
JSTestNamedConstructor* thisObject = static_cast<JSTestNamedConstructor*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
index e3c938d..817b367 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
@@ -21,12 +21,8 @@
#ifndef JSTestNamedConstructor_h
#define JSTestNamedConstructor_h
-#include "DOMConstructorWithDocument.h"
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestNamedConstructor.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -41,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestNamedConstructor();
DECLARE_INFO;
@@ -74,7 +71,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSTestNamedConstructorOwner : public JSC::WeakHandleOwner {
@@ -97,74 +93,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
TestNamedConstructor* toTestNamedConstructor(JSC::JSValue);
-class JSTestNamedConstructorPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestNamedConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestNamedConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorPrototype>(vm.heap)) JSTestNamedConstructorPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestNamedConstructorPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestNamedConstructorConstructor : public DOMConstructorObject {
-private:
- JSTestNamedConstructorConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestNamedConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestNamedConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorConstructor>(vm.heap)) JSTestNamedConstructorConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
-class JSTestNamedConstructorNamedConstructor : public DOMConstructorWithDocument {
-public:
- typedef DOMConstructorWithDocument Base;
-
- static JSTestNamedConstructorNamedConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestNamedConstructorNamedConstructor* constructor = new (NotNull, JSC::allocateCell<JSTestNamedConstructorNamedConstructor>(vm.heap)) JSTestNamedConstructorNamedConstructor(structure, globalObject);
- constructor->finishCreation(vm, globalObject);
- return constructor;
- }
-
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
- DECLARE_INFO;
-
-private:
- JSTestNamedConstructorNamedConstructor(JSC::Structure*, JSDOMGlobalObject*);
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNamedConstructor(JSC::ExecState*);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
index 72644eb..5a49032 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
@@ -34,6 +34,56 @@
// Attributes
JSC::EncodedJSValue jsTestNodeConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestNodePrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestNodePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestNodePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNodePrototype>(vm.heap)) JSTestNodePrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestNodePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestNodeConstructor : public DOMConstructorObject {
+private:
+ JSTestNodeConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestNodeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestNodeConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNodeConstructor>(vm.heap)) JSTestNodeConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+protected:
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNode(JSC::ExecState*);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestNodeConstructorTableIndex[1] = {
@@ -65,7 +115,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestNodePrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestNode::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -91,11 +141,6 @@
static const HashTable JSTestNodePrototypeTable = { 1, 1, true, JSTestNodePrototypeTableValues, 0, JSTestNodePrototypeTableIndex };
const ClassInfo JSTestNodePrototype::s_info = { "TestNodePrototype", &Base::s_info, &JSTestNodePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestNodePrototype) };
-JSObject* JSTestNodePrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestNode>(vm, globalObject);
-}
-
void JSTestNodePrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -111,7 +156,12 @@
JSObject* JSTestNode::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
- return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm, globalObject, JSNodePrototype::self(vm, globalObject)));
+ return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm, globalObject, JSNode::getPrototype(vm, globalObject)));
+}
+
+JSObject* JSTestNode::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestNode>(vm, globalObject);
}
EncodedJSValue jsTestNodeConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue, PropertyName)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
index 27ab7b8..2db8873 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
@@ -21,10 +21,8 @@
#ifndef JSTestNode_h
#define JSTestNode_h
-#include "JSDOMBinding.h"
#include "JSNode.h"
#include "TestNode.h"
-#include <runtime/JSObject.h>
namespace WebCore {
@@ -39,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
@@ -66,52 +65,6 @@
};
-class JSTestNodePrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestNodePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestNodePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNodePrototype>(vm.heap)) JSTestNodePrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestNodePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestNodeConstructor : public DOMConstructorObject {
-private:
- JSTestNodeConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestNodeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestNodeConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNodeConstructor>(vm.heap)) JSTestNodeConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-protected:
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNode(JSC::ExecState*);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
index 83492aa..7433fa4 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
@@ -43,6 +43,7 @@
// Functions
JSC::EncodedJSValue JSC_HOST_CALL jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestNondeterministicNondeterministicReadonlyAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
@@ -55,6 +56,53 @@
JSC::EncodedJSValue jsTestNondeterministicNondeterministicSetterExceptionAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestNondeterministicNondeterministicSetterExceptionAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestNondeterministicConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestNondeterministicPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestNondeterministicPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestNondeterministicPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministicPrototype>(vm.heap)) JSTestNondeterministicPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestNondeterministicPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestNondeterministicConstructor : public DOMConstructorObject {
+private:
+ JSTestNondeterministicConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestNondeterministicConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestNondeterministicConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministicConstructor>(vm.heap)) JSTestNondeterministicConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestNondeterministicConstructorTableIndex[1] = {
@@ -79,7 +127,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministicPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestNondeterministic::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -120,11 +168,6 @@
static const HashTable JSTestNondeterministicPrototypeTable = { 7, 15, true, JSTestNondeterministicPrototypeTableValues, 0, JSTestNondeterministicPrototypeTableIndex };
const ClassInfo JSTestNondeterministicPrototype::s_info = { "TestNondeterministicPrototype", &Base::s_info, &JSTestNondeterministicPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestNondeterministicPrototype) };
-JSObject* JSTestNondeterministicPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestNondeterministic>(vm, globalObject);
-}
-
void JSTestNondeterministicPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -144,6 +187,11 @@
return JSTestNondeterministicPrototype::create(vm, globalObject, JSTestNondeterministicPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestNondeterministic::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestNondeterministic>(vm, globalObject);
+}
+
void JSTestNondeterministic::destroy(JSC::JSCell* cell)
{
JSTestNondeterministic* thisObject = static_cast<JSTestNondeterministic*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h b/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
index d32183c..042e63c 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
@@ -21,11 +21,8 @@
#ifndef JSTestNondeterministic_h
#define JSTestNondeterministic_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestNondeterministic.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestNondeterministic();
DECLARE_INFO;
@@ -72,7 +70,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSTestNondeterministicOwner : public JSC::WeakHandleOwner {
@@ -95,49 +92,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
TestNondeterministic* toTestNondeterministic(JSC::JSValue);
-class JSTestNondeterministicPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestNondeterministicPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestNondeterministicPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministicPrototype>(vm.heap)) JSTestNondeterministicPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestNondeterministicPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestNondeterministicConstructor : public DOMConstructorObject {
-private:
- JSTestNondeterministicConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestNondeterministicConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestNondeterministicConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministicConstructor>(vm.heap)) JSTestNondeterministicConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index de45630..890a38d 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -154,6 +154,7 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestObjReadOnlyLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
@@ -290,6 +291,56 @@
JSC::EncodedJSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestObjPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestObjPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestObjPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestObjConstructor : public DOMConstructorObject {
+private:
+ JSTestObjConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestObjConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestObjConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestObjConstructor>(vm.heap)) JSTestObjConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+protected:
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestObj(JSC::ExecState*);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestObjTableIndex[17] = {
@@ -455,7 +506,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestObjPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestObj::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
reifyStaticProperties(vm, JSTestObjConstructorTableValues, *this);
}
@@ -1174,11 +1225,6 @@
static const HashTable JSTestObjPrototypeTable = { 137, 511, true, JSTestObjPrototypeTableValues, 0, JSTestObjPrototypeTableIndex };
const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
-JSObject* JSTestObjPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestObj>(vm, globalObject);
-}
-
void JSTestObjPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -1198,6 +1244,11 @@
return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestObj::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestObj>(vm, globalObject);
+}
+
void JSTestObj::destroy(JSC::JSCell* cell)
{
JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
index 0f7110a..b9f4f74 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -21,11 +21,8 @@
#ifndef JSTestObj_h
#define JSTestObj_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestObj.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestObj();
@@ -109,52 +107,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
TestObj* toTestObj(JSC::JSValue);
-class JSTestObjPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestObjPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestObjPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestObjConstructor : public DOMConstructorObject {
-private:
- JSTestObjConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestObjConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestObjConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestObjConstructor>(vm.heap)) JSTestObjConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-protected:
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestObj(JSC::ExecState*);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
index 2a7983f..fbcf913 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
@@ -35,6 +35,60 @@
// Attributes
JSC::EncodedJSValue jsTestOverloadedConstructorsConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestOverloadedConstructorsPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestOverloadedConstructorsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsPrototype>(vm.heap)) JSTestOverloadedConstructorsPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestOverloadedConstructorsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestOverloadedConstructorsConstructor : public DOMConstructorObject {
+private:
+ JSTestOverloadedConstructorsConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestOverloadedConstructorsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestOverloadedConstructorsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsConstructor>(vm.heap)) JSTestOverloadedConstructorsConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+protected:
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors(JSC::ExecState*);
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors1(JSC::ExecState*);
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors2(JSC::ExecState*);
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors3(JSC::ExecState*);
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors4(JSC::ExecState*);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestOverloadedConstructorsConstructorTableIndex[1] = {
@@ -124,7 +178,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructorsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
}
@@ -150,11 +204,6 @@
static const HashTable JSTestOverloadedConstructorsPrototypeTable = { 1, 1, true, JSTestOverloadedConstructorsPrototypeTableValues, 0, JSTestOverloadedConstructorsPrototypeTableIndex };
const ClassInfo JSTestOverloadedConstructorsPrototype::s_info = { "TestOverloadedConstructorsPrototype", &Base::s_info, &JSTestOverloadedConstructorsPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestOverloadedConstructorsPrototype) };
-JSObject* JSTestOverloadedConstructorsPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestOverloadedConstructors>(vm, globalObject);
-}
-
void JSTestOverloadedConstructorsPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -174,6 +223,11 @@
return JSTestOverloadedConstructorsPrototype::create(vm, globalObject, JSTestOverloadedConstructorsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestOverloadedConstructors::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestOverloadedConstructors>(vm, globalObject);
+}
+
void JSTestOverloadedConstructors::destroy(JSC::JSCell* cell)
{
JSTestOverloadedConstructors* thisObject = static_cast<JSTestOverloadedConstructors*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
index e44855a..e4031f4 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
@@ -21,11 +21,8 @@
#ifndef JSTestOverloadedConstructors_h
#define JSTestOverloadedConstructors_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestOverloadedConstructors.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestOverloadedConstructors();
DECLARE_INFO;
@@ -72,7 +70,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSTestOverloadedConstructorsOwner : public JSC::WeakHandleOwner {
@@ -95,56 +92,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
TestOverloadedConstructors* toTestOverloadedConstructors(JSC::JSValue);
-class JSTestOverloadedConstructorsPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestOverloadedConstructorsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsPrototype>(vm.heap)) JSTestOverloadedConstructorsPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestOverloadedConstructorsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestOverloadedConstructorsConstructor : public DOMConstructorObject {
-private:
- JSTestOverloadedConstructorsConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestOverloadedConstructorsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestOverloadedConstructorsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsConstructor>(vm.heap)) JSTestOverloadedConstructorsConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-protected:
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors(JSC::ExecState*);
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors1(JSC::ExecState*);
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors2(JSC::ExecState*);
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors3(JSC::ExecState*);
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors4(JSC::ExecState*);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
index 6c5c096..0922175 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
@@ -24,6 +24,7 @@
#include "JSTestSerializedScriptValueInterface.h"
+#include "JSDOMBinding.h"
#include "JSMessagePort.h"
#include "MessagePort.h"
#include "ScriptExecutionContext.h"
@@ -46,6 +47,53 @@
JSC::EncodedJSValue jsTestSerializedScriptValueInterfacePorts(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestSerializedScriptValueInterfaceConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestSerializedScriptValueInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestSerializedScriptValueInterfaceConstructor : public DOMConstructorObject {
+private:
+ JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestSerializedScriptValueInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(vm.heap)) JSTestSerializedScriptValueInterfaceConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSTestSerializedScriptValueInterfaceConstructorTableIndex[1] = {
@@ -70,7 +118,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterfacePrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -110,11 +158,6 @@
static const HashTable JSTestSerializedScriptValueInterfacePrototypeTable = { 6, 15, true, JSTestSerializedScriptValueInterfacePrototypeTableValues, 0, JSTestSerializedScriptValueInterfacePrototypeTableIndex };
const ClassInfo JSTestSerializedScriptValueInterfacePrototype::s_info = { "TestSerializedScriptValueInterfacePrototype", &Base::s_info, &JSTestSerializedScriptValueInterfacePrototypeTable, 0, CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterfacePrototype) };
-JSObject* JSTestSerializedScriptValueInterfacePrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestSerializedScriptValueInterface>(vm, globalObject);
-}
-
void JSTestSerializedScriptValueInterfacePrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -134,6 +177,11 @@
return JSTestSerializedScriptValueInterfacePrototype::create(vm, globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestSerializedScriptValueInterface::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestSerializedScriptValueInterface>(vm, globalObject);
+}
+
void JSTestSerializedScriptValueInterface::destroy(JSC::JSCell* cell)
{
JSTestSerializedScriptValueInterface* thisObject = static_cast<JSTestSerializedScriptValueInterface*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
index 1173a75..a369df1 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
@@ -23,11 +23,8 @@
#if ENABLE(Condition1) || ENABLE(Condition2)
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestSerializedScriptValueInterface.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -42,6 +39,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSTestSerializedScriptValueInterface();
DECLARE_INFO;
@@ -101,49 +99,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);
-class JSTestSerializedScriptValueInterfacePrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestSerializedScriptValueInterfacePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestSerializedScriptValueInterfaceConstructor : public DOMConstructorObject {
-private:
- JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestSerializedScriptValueInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(vm.heap)) JSTestSerializedScriptValueInterfaceConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
index 984eb29..422f059 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
@@ -56,6 +56,7 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(JSC::ExecState*);
+
// Attributes
JSC::EncodedJSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
@@ -72,6 +73,56 @@
JSC::EncodedJSValue jsTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSTestTypedefsPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSTestTypedefsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSTestTypedefsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSTestTypedefsConstructor : public DOMConstructorObject {
+private:
+ JSTestTypedefsConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSTestTypedefsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSTestTypedefsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsConstructor>(vm.heap)) JSTestTypedefsConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+protected:
+ static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestTypedefs(JSC::ExecState*);
+ static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
+};
+
/* Hash table */
static const struct CompactHashIndex JSTestTypedefsTableIndex[2] = {
@@ -125,7 +176,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSTestTypedefsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
reifyStaticProperties(vm, JSTestTypedefsConstructorTableValues, *this);
}
@@ -232,11 +283,6 @@
static const HashTable JSTestTypedefsPrototypeTable = { 17, 63, true, JSTestTypedefsPrototypeTableValues, 0, JSTestTypedefsPrototypeTableIndex };
const ClassInfo JSTestTypedefsPrototype::s_info = { "TestTypedefsPrototype", &Base::s_info, &JSTestTypedefsPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestTypedefsPrototype) };
-JSObject* JSTestTypedefsPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSTestTypedefs>(vm, globalObject);
-}
-
void JSTestTypedefsPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -256,6 +302,11 @@
return JSTestTypedefsPrototype::create(vm, globalObject, JSTestTypedefsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSTestTypedefs::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSTestTypedefs>(vm, globalObject);
+}
+
void JSTestTypedefs::destroy(JSC::JSCell* cell)
{
JSTestTypedefs* thisObject = static_cast<JSTestTypedefs*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
index ec675ec..5004e62 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
@@ -21,11 +21,8 @@
#ifndef JSTestTypedefs_h
#define JSTestTypedefs_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "TestTypedefs.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestTypedefs();
@@ -96,52 +94,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
TestTypedefs* toTestTypedefs(JSC::JSValue);
-class JSTestTypedefsPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSTestTypedefsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSTestTypedefsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSTestTypedefsConstructor : public DOMConstructorObject {
-private:
- JSTestTypedefsConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSTestTypedefsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSTestTypedefsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsConstructor>(vm.heap)) JSTestTypedefsConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-protected:
- static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestTypedefs(JSC::ExecState*);
- static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp b/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
index f7d05ee..f88ed60 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "JSattribute.h"
+#include "JSDOMBinding.h"
#include "ScriptExecutionContext.h"
#include "URL.h"
#include "attribute.h"
@@ -35,6 +36,53 @@
JSC::EncodedJSValue jsattributeReadonly(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsattributeConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSattributePrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSattributePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSattributePrototype* ptr = new (NotNull, JSC::allocateCell<JSattributePrototype>(vm.heap)) JSattributePrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSattributePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSattributeConstructor : public DOMConstructorObject {
+private:
+ JSattributeConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSattributeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSattributeConstructor* ptr = new (NotNull, JSC::allocateCell<JSattributeConstructor>(vm.heap)) JSattributeConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSattributeConstructorTableIndex[1] = {
@@ -59,7 +107,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSattributePrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSattribute::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -82,11 +130,6 @@
static const HashTable JSattributePrototypeTable = { 2, 3, true, JSattributePrototypeTableValues, 0, JSattributePrototypeTableIndex };
const ClassInfo JSattributePrototype::s_info = { "attributePrototype", &Base::s_info, &JSattributePrototypeTable, 0, CREATE_METHOD_TABLE(JSattributePrototype) };
-JSObject* JSattributePrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSattribute>(vm, globalObject);
-}
-
void JSattributePrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -106,6 +149,11 @@
return JSattributePrototype::create(vm, globalObject, JSattributePrototype::createStructure(vm, globalObject, globalObject->errorPrototype()));
}
+JSObject* JSattribute::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSattribute>(vm, globalObject);
+}
+
void JSattribute::destroy(JSC::JSCell* cell)
{
JSattribute* thisObject = static_cast<JSattribute*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSattribute.h b/Source/WebCore/bindings/scripts/test/JS/JSattribute.h
index bcd2790..8fb0708 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSattribute.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSattribute.h
@@ -21,11 +21,9 @@
#ifndef JSattribute_h
#define JSattribute_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "attribute.h"
#include <runtime/ErrorPrototype.h>
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
namespace WebCore {
@@ -40,6 +38,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSattribute();
DECLARE_INFO;
@@ -72,7 +71,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSattributeOwner : public JSC::WeakHandleOwner {
@@ -95,49 +93,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
attribute* toattribute(JSC::JSValue);
-class JSattributePrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSattributePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSattributePrototype* ptr = new (NotNull, JSC::allocateCell<JSattributePrototype>(vm.heap)) JSattributePrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSattributePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSattributeConstructor : public DOMConstructorObject {
-private:
- JSattributeConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSattributeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSattributeConstructor* ptr = new (NotNull, JSC::allocateCell<JSattributeConstructor>(vm.heap)) JSattributeConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp b/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
index 5a3ad13..fca08b3 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
@@ -21,6 +21,7 @@
#include "config.h"
#include "JSreadonly.h"
+#include "JSDOMBinding.h"
#include "readonly.h"
#include <wtf/GetPtr.h>
@@ -31,6 +32,53 @@
// Attributes
JSC::EncodedJSValue jsreadonlyConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
+
+class JSreadonlyPrototype : public JSC::JSNonFinalObject {
+public:
+ typedef JSC::JSNonFinalObject Base;
+ static JSreadonlyPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
+ {
+ JSreadonlyPrototype* ptr = new (NotNull, JSC::allocateCell<JSreadonlyPrototype>(vm.heap)) JSreadonlyPrototype(vm, globalObject, structure);
+ ptr->finishCreation(vm);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+
+private:
+ JSreadonlyPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
+ : JSC::JSNonFinalObject(vm, structure)
+ {
+ }
+
+ void finishCreation(JSC::VM&);
+};
+
+class JSreadonlyConstructor : public DOMConstructorObject {
+private:
+ JSreadonlyConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::VM&, JSDOMGlobalObject*);
+
+public:
+ typedef DOMConstructorObject Base;
+ static JSreadonlyConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+ {
+ JSreadonlyConstructor* ptr = new (NotNull, JSC::allocateCell<JSreadonlyConstructor>(vm.heap)) JSreadonlyConstructor(structure, globalObject);
+ ptr->finishCreation(vm, globalObject);
+ return ptr;
+ }
+
+ DECLARE_INFO;
+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
+ }
+};
+
/* Hash table for constructor */
static const struct CompactHashIndex JSreadonlyConstructorTableIndex[1] = {
@@ -55,7 +103,7 @@
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
- putDirect(vm, vm.propertyNames->prototype, JSreadonlyPrototype::self(vm, globalObject), DontDelete | ReadOnly);
+ putDirect(vm, vm.propertyNames->prototype, JSreadonly::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
@@ -75,11 +123,6 @@
static const HashTable JSreadonlyPrototypeTable = { 1, 1, true, JSreadonlyPrototypeTableValues, 0, JSreadonlyPrototypeTableIndex };
const ClassInfo JSreadonlyPrototype::s_info = { "readonlyPrototype", &Base::s_info, &JSreadonlyPrototypeTable, 0, CREATE_METHOD_TABLE(JSreadonlyPrototype) };
-JSObject* JSreadonlyPrototype::self(VM& vm, JSGlobalObject* globalObject)
-{
- return getDOMPrototype<JSreadonly>(vm, globalObject);
-}
-
void JSreadonlyPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
@@ -99,6 +142,11 @@
return JSreadonlyPrototype::create(vm, globalObject, JSreadonlyPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
+JSObject* JSreadonly::getPrototype(VM& vm, JSGlobalObject* globalObject)
+{
+ return getDOMPrototype<JSreadonly>(vm, globalObject);
+}
+
void JSreadonly::destroy(JSC::JSCell* cell)
{
JSreadonly* thisObject = static_cast<JSreadonly*>(cell);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h b/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
index a4374d3..c2fbcc3 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
@@ -21,11 +21,8 @@
#ifndef JSreadonly_h
#define JSreadonly_h
-#include "JSDOMBinding.h"
+#include "JSDOMWrapper.h"
#include "readonly.h"
-#include <runtime/JSGlobalObject.h>
-#include <runtime/JSObject.h>
-#include <runtime/ObjectPrototype.h>
namespace WebCore {
@@ -40,6 +37,7 @@
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
~JSreadonly();
DECLARE_INFO;
@@ -72,7 +70,6 @@
ASSERT(inherits(info()));
}
- static const unsigned StructureFlags = Base::StructureFlags;
};
class JSreadonlyOwner : public JSC::WeakHandleOwner {
@@ -95,49 +92,6 @@
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
readonly* toreadonly(JSC::JSValue);
-class JSreadonlyPrototype : public JSC::JSNonFinalObject {
-public:
- typedef JSC::JSNonFinalObject Base;
- static JSC::JSObject* self(JSC::VM&, JSC::JSGlobalObject*);
- static JSreadonlyPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
- {
- JSreadonlyPrototype* ptr = new (NotNull, JSC::allocateCell<JSreadonlyPrototype>(vm.heap)) JSreadonlyPrototype(vm, globalObject, structure);
- ptr->finishCreation(vm);
- return ptr;
- }
-
- DECLARE_INFO;
- void finishCreation(JSC::VM&);
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-
-private:
- JSreadonlyPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
-};
-
-class JSreadonlyConstructor : public DOMConstructorObject {
-private:
- JSreadonlyConstructor(JSC::Structure*, JSDOMGlobalObject*);
- void finishCreation(JSC::VM&, JSDOMGlobalObject*);
-
-public:
- typedef DOMConstructorObject Base;
- static JSreadonlyConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
- {
- JSreadonlyConstructor* ptr = new (NotNull, JSC::allocateCell<JSreadonlyConstructor>(vm.heap)) JSreadonlyConstructor(structure, globalObject);
- ptr->finishCreation(vm, globalObject);
- return ptr;
- }
-
- DECLARE_INFO;
- static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
- {
- return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
- }
-};
-
} // namespace WebCore