Rebaseline generated WebCore bindings
Unreviewed build fix
No new tests.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::isObservable):
(WebCore::JSTestEventConstructorOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestEventConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::clearImpl):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::isObservable):
(WebCore::JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestMediaQueryListListenerOwner::finalize):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorOwner::finalize):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::clearImpl):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::isObservable):
(WebCore::JSTestObjOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestObjOwner::finalize):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::isObservable):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::clearImpl):
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
index f7316e3..6fc2efeb 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
@@ -193,6 +193,30 @@
return getDOMConstructor<JSTestEventConstructorConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
}
+static inline bool isObservable(JSTestEventConstructor* jsTestEventConstructor)
+{
+ if (jsTestEventConstructor->hasCustomProperties())
+ return true;
+ return false;
+}
+
+bool JSTestEventConstructorOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+ JSTestEventConstructor* jsTestEventConstructor = static_cast<JSTestEventConstructor*>(handle.get().asCell());
+ if (!isObservable(jsTestEventConstructor))
+ return false;
+ UNUSED_PARAM(visitor);
+ return false;
+}
+
+void JSTestEventConstructorOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+ JSTestEventConstructor* jsTestEventConstructor = static_cast<JSTestEventConstructor*>(handle.get().asCell());
+ DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
+ uncacheWrapper(world, jsTestEventConstructor->impl(), jsTestEventConstructor);
+ jsTestEventConstructor->clearImpl();
+}
+
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestEventConstructor* impl)
{
return wrap<JSTestEventConstructor>(exec, globalObject, impl);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
index 59e18cf..c165d09 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
@@ -51,6 +51,7 @@
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
TestEventConstructor* impl() const { return m_impl.get(); }
+ void clearImpl() { m_impl.clear(); }
private:
RefPtr<TestEventConstructor> m_impl;
@@ -60,6 +61,22 @@
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
};
+class JSTestEventConstructorOwner : public JSC::WeakHandleOwner {
+ virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+ virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestEventConstructor*)
+{
+ DEFINE_STATIC_LOCAL(JSTestEventConstructorOwner, jsTestEventConstructorOwner, ());
+ return &jsTestEventConstructorOwner;
+}
+
+inline void* wrapperContext(DOMWrapperWorld* world, TestEventConstructor*)
+{
+ return world;
+}
+
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
TestEventConstructor* toTestEventConstructor(JSC::JSValue);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
index dfbd5cd..93852b1 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
@@ -221,6 +221,7 @@
JSTestInterface* jsTestInterface = static_cast<JSTestInterface*>(handle.get().asCell());
DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, jsTestInterface->impl(), jsTestInterface);
+ jsTestInterface->clearImpl();
}
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestInterface* impl)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
index 940903c..75374bc 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
@@ -53,6 +53,7 @@
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
TestInterface* impl() const { return m_impl.get(); }
+ void clearImpl() { m_impl.clear(); }
private:
RefPtr<TestInterface> m_impl;
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
index 66b4832..37bac71 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
@@ -197,6 +197,30 @@
return JSValue::encode(jsUndefined());
}
+static inline bool isObservable(JSTestMediaQueryListListener* jsTestMediaQueryListListener)
+{
+ if (jsTestMediaQueryListListener->hasCustomProperties())
+ return true;
+ return false;
+}
+
+bool JSTestMediaQueryListListenerOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+ JSTestMediaQueryListListener* jsTestMediaQueryListListener = static_cast<JSTestMediaQueryListListener*>(handle.get().asCell());
+ if (!isObservable(jsTestMediaQueryListListener))
+ return false;
+ UNUSED_PARAM(visitor);
+ return false;
+}
+
+void JSTestMediaQueryListListenerOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+ JSTestMediaQueryListListener* jsTestMediaQueryListListener = static_cast<JSTestMediaQueryListListener*>(handle.get().asCell());
+ DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
+ uncacheWrapper(world, jsTestMediaQueryListListener->impl(), jsTestMediaQueryListListener);
+ jsTestMediaQueryListListener->clearImpl();
+}
+
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestMediaQueryListListener* impl)
{
return wrap<JSTestMediaQueryListListener>(exec, globalObject, impl);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
index 7facdd2..f5c0d6c 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
@@ -51,6 +51,7 @@
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
TestMediaQueryListListener* impl() const { return m_impl.get(); }
+ void clearImpl() { m_impl.clear(); }
private:
RefPtr<TestMediaQueryListListener> m_impl;
@@ -60,6 +61,22 @@
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
};
+class JSTestMediaQueryListListenerOwner : public JSC::WeakHandleOwner {
+ virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+ virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestMediaQueryListListener*)
+{
+ DEFINE_STATIC_LOCAL(JSTestMediaQueryListListenerOwner, jsTestMediaQueryListListenerOwner, ());
+ return &jsTestMediaQueryListListenerOwner;
+}
+
+inline void* wrapperContext(DOMWrapperWorld* world, TestMediaQueryListListener*)
+{
+ return world;
+}
+
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
index a93943e..9ba91a0 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
@@ -186,6 +186,7 @@
JSTestNamedConstructor* jsTestNamedConstructor = static_cast<JSTestNamedConstructor*>(handle.get().asCell());
DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, jsTestNamedConstructor->impl(), jsTestNamedConstructor);
+ jsTestNamedConstructor->clearImpl();
}
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestNamedConstructor* impl)
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
index b239041..c0891bc 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
@@ -51,6 +51,7 @@
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
TestNamedConstructor* impl() const { return m_impl.get(); }
+ void clearImpl() { m_impl.clear(); }
private:
RefPtr<TestNamedConstructor> m_impl;
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index f5326be..01ad1e8 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -1979,6 +1979,30 @@
return jsNumber(static_cast<int>(15));
}
+static inline bool isObservable(JSTestObj* jsTestObj)
+{
+ if (jsTestObj->hasCustomProperties())
+ return true;
+ return false;
+}
+
+bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+ JSTestObj* jsTestObj = static_cast<JSTestObj*>(handle.get().asCell());
+ if (!isObservable(jsTestObj))
+ return false;
+ UNUSED_PARAM(visitor);
+ return false;
+}
+
+void JSTestObjOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+ JSTestObj* jsTestObj = static_cast<JSTestObj*>(handle.get().asCell());
+ DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
+ uncacheWrapper(world, jsTestObj->impl(), jsTestObj);
+ jsTestObj->clearImpl();
+}
+
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj* impl)
{
return wrap<JSTestObj>(exec, globalObject, impl);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
index 04ce562..31ae5dc 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -64,6 +64,7 @@
JSC::JSValue customMethod(JSC::ExecState*);
JSC::JSValue customMethodWithArgs(JSC::ExecState*);
TestObj* impl() const { return m_impl.get(); }
+ void clearImpl() { m_impl.clear(); }
private:
RefPtr<TestObj> m_impl;
@@ -73,6 +74,22 @@
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
};
+class JSTestObjOwner : public JSC::WeakHandleOwner {
+ virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+ virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestObj*)
+{
+ DEFINE_STATIC_LOCAL(JSTestObjOwner, jsTestObjOwner, ());
+ return &jsTestObjOwner;
+}
+
+inline void* wrapperContext(DOMWrapperWorld* world, TestObj*)
+{
+ return world;
+}
+
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
TestObj* toTestObj(JSC::JSValue);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
index 8c338f4..062ed04 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
@@ -178,6 +178,30 @@
return getDOMConstructor<JSTestSerializedScriptValueInterfaceConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
}
+static inline bool isObservable(JSTestSerializedScriptValueInterface* jsTestSerializedScriptValueInterface)
+{
+ if (jsTestSerializedScriptValueInterface->hasCustomProperties())
+ return true;
+ return false;
+}
+
+bool JSTestSerializedScriptValueInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
+{
+ JSTestSerializedScriptValueInterface* jsTestSerializedScriptValueInterface = static_cast<JSTestSerializedScriptValueInterface*>(handle.get().asCell());
+ if (!isObservable(jsTestSerializedScriptValueInterface))
+ return false;
+ UNUSED_PARAM(visitor);
+ return false;
+}
+
+void JSTestSerializedScriptValueInterfaceOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
+{
+ JSTestSerializedScriptValueInterface* jsTestSerializedScriptValueInterface = static_cast<JSTestSerializedScriptValueInterface*>(handle.get().asCell());
+ DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
+ uncacheWrapper(world, jsTestSerializedScriptValueInterface->impl(), jsTestSerializedScriptValueInterface);
+ jsTestSerializedScriptValueInterface->clearImpl();
+}
+
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface* impl)
{
return wrap<JSTestSerializedScriptValueInterface>(exec, globalObject, impl);
diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
index d0b66ed..831161d 100644
--- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
+++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
@@ -53,6 +53,7 @@
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
TestSerializedScriptValueInterface* impl() const { return m_impl.get(); }
+ void clearImpl() { m_impl.clear(); }
private:
RefPtr<TestSerializedScriptValueInterface> m_impl;
@@ -62,6 +63,22 @@
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
};
+class JSTestSerializedScriptValueInterfaceOwner : public JSC::WeakHandleOwner {
+ virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
+ virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
+};
+
+inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestSerializedScriptValueInterface*)
+{
+ DEFINE_STATIC_LOCAL(JSTestSerializedScriptValueInterfaceOwner, jsTestSerializedScriptValueInterfaceOwner, ());
+ return &jsTestSerializedScriptValueInterfaceOwner;
+}
+
+inline void* wrapperContext(DOMWrapperWorld* world, TestSerializedScriptValueInterface*)
+{
+ return world;
+}
+
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);