Commit 1ccf4754 authored by dbates@webkit.org's avatar dbates@webkit.org

Only generate isObservable() when IDL specifies GenerateIsReachable

https://bugs.webkit.org/show_bug.cgi?id=124729

Reviewed by Geoffrey Garen.

We should only generate the static inline function isObservable() when the IDL
specifies GenerateIsReachable. Otherwise, this function is unused.

Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
rebased existing test results.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
* bindings/scripts/test/JS/JSTestException.cpp: Ditto.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
* bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
* bindings/scripts/test/JS/JSattribute.cpp: Ditto.
* bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
* bindings/scripts/test/TestGenerateIsReachable.idl: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1b45c5d8
2013-11-21 Daniel Bates <dabates@apple.com>
Only generate isObservable() when IDL specifies GenerateIsReachable
https://bugs.webkit.org/show_bug.cgi?id=124729
Reviewed by Geoffrey Garen.
We should only generate the static inline function isObservable() when the IDL
specifies GenerateIsReachable. Otherwise, this function is unused.
Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
rebased existing test results.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
* bindings/scripts/test/JS/JSTestException.cpp: Ditto.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
* bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
* bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
* bindings/scripts/test/JS/JSattribute.cpp: Ditto.
* bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
* bindings/scripts/test/TestGenerateIsReachable.idl: Added.
2013-11-21 Beth Dakin <bdakin@apple.com>
Add a new mode to extend the tile cache beyond the page
......@@ -2545,17 +2545,19 @@ sub GenerateImplementation
}
}
if ((!$hasParent && !GetCustomIsReachable($interface))|| GetGenerateIsReachable($interface) || $codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) {
push(@implContent, "static inline bool isObservable(JS${interfaceName}* js${interfaceName})\n");
push(@implContent, "{\n");
push(@implContent, " if (js${interfaceName}->hasCustomProperties())\n");
push(@implContent, " return true;\n");
if ($eventTarget) {
push(@implContent, " if (js${interfaceName}->impl().hasEventListeners())\n");
if ((!$hasParent && !GetCustomIsReachable($interface)) || GetGenerateIsReachable($interface) || $codeGenerator->InheritsExtendedAttribute($interface, "ActiveDOMObject")) {
if (GetGenerateIsReachable($interface)) {
push(@implContent, "static inline bool isObservable(JS${interfaceName}* js${interfaceName})\n");
push(@implContent, "{\n");
push(@implContent, " if (js${interfaceName}->hasCustomProperties())\n");
push(@implContent, " return true;\n");
if ($eventTarget) {
push(@implContent, " if (js${interfaceName}->impl().hasEventListeners())\n");
push(@implContent, " return true;\n");
}
push(@implContent, " return false;\n");
push(@implContent, "}\n\n");
}
push(@implContent, " return false;\n");
push(@implContent, "}\n\n");
push(@implContent, "bool JS${interfaceName}Owner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)\n");
push(@implContent, "{\n");
......
/*
* This file is part of the WebKit open source project.
* This file has been generated by generate-bindings.pl. DO NOT MODIFY!
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "WebDOMTestGenerateIsReachable.h"
#include "TestGenerateIsReachable.h"
#include "WebExceptionHandler.h"
#include <wtf/GetPtr.h>
#include <wtf/RefPtr.h>
struct WebDOMTestGenerateIsReachable::WebDOMTestGenerateIsReachablePrivate {
WebDOMTestGenerateIsReachablePrivate(WebCore::TestGenerateIsReachable* object = 0)
: impl(object)
{
}
RefPtr<WebCore::TestGenerateIsReachable> impl;
};
WebDOMTestGenerateIsReachable::WebDOMTestGenerateIsReachable()
: WebDOMObject()
, m_impl(0)
{
}
WebDOMTestGenerateIsReachable::WebDOMTestGenerateIsReachable(WebCore::TestGenerateIsReachable* impl)
: WebDOMObject()
, m_impl(new WebDOMTestGenerateIsReachablePrivate(impl))
{
}
WebDOMTestGenerateIsReachable::WebDOMTestGenerateIsReachable(const WebDOMTestGenerateIsReachable& copy)
: WebDOMObject()
{
m_impl = copy.impl() ? new WebDOMTestGenerateIsReachablePrivate(copy.impl()) : 0;
}
WebDOMTestGenerateIsReachable& WebDOMTestGenerateIsReachable::operator=(const WebDOMTestGenerateIsReachable& copy)
{
delete m_impl;
m_impl = copy.impl() ? new WebDOMTestGenerateIsReachablePrivate(copy.impl()) : 0;
return *this;
}
WebCore::TestGenerateIsReachable* WebDOMTestGenerateIsReachable::impl() const
{
return m_impl ? WTF::getPtr(m_impl->impl) : 0;
}
WebDOMTestGenerateIsReachable::~WebDOMTestGenerateIsReachable()
{
delete m_impl;
m_impl = 0;
}
WebCore::TestGenerateIsReachable* toWebCore(const WebDOMTestGenerateIsReachable& wrapper)
{
return wrapper.impl();
}
WebDOMTestGenerateIsReachable toWebKit(WebCore::TestGenerateIsReachable* value)
{
return WebDOMTestGenerateIsReachable(value);
}
/*
* Copyright (C) Research In Motion Limited 2010. All rights reserved.
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
* Copyright (C) Research In Motion Limited 2010. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef WebDOMTestGenerateIsReachable_h
#define WebDOMTestGenerateIsReachable_h
#include <WebDOMObject.h>
#include <WebDOMString.h>
namespace WebCore {
class TestGenerateIsReachable;
};
class WebDOMTestGenerateIsReachable : public WebDOMObject {
public:
WebDOMTestGenerateIsReachable();
explicit WebDOMTestGenerateIsReachable(WebCore::TestGenerateIsReachable*);
WebDOMTestGenerateIsReachable(const WebDOMTestGenerateIsReachable&);
WebDOMTestGenerateIsReachable& operator=(const WebDOMTestGenerateIsReachable&);
virtual ~WebDOMTestGenerateIsReachable();
WebCore::TestGenerateIsReachable* impl() const;
protected:
struct WebDOMTestGenerateIsReachablePrivate;
WebDOMTestGenerateIsReachablePrivate* m_impl;
};
WebCore::TestGenerateIsReachable* toWebCore(const WebDOMTestGenerateIsReachable&);
WebDOMTestGenerateIsReachable toWebKit(WebCore::TestGenerateIsReachable*);
#endif
/*
* This file is part of the WebKit open source project.
* This file has been generated by generate-bindings.pl. DO NOT MODIFY!
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "WebKitDOMTestGenerateIsReachable.h"
#include "CSSImportRule.h"
#include "DOMObjectCache.h"
#include "Document.h"
#include "ExceptionCode.h"
#include "JSMainThreadExecState.h"
#include "WebKitDOMPrivate.h"
#include "WebKitDOMTestGenerateIsReachablePrivate.h"
#include "gobject/ConvertToUTF8String.h"
#include <wtf/GetPtr.h>
#include <wtf/RefPtr.h>
#define WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_GET_PRIVATE(obj) G_TYPE_INSTANCE_GET_PRIVATE(obj, WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE, WebKitDOMTestGenerateIsReachablePrivate)
typedef struct _WebKitDOMTestGenerateIsReachablePrivate {
RefPtr<WebCore::TestGenerateIsReachable> coreObject;
} WebKitDOMTestGenerateIsReachablePrivate;
namespace WebKit {
WebKitDOMTestGenerateIsReachable* kit(WebCore::TestGenerateIsReachable* obj)
{
if (!obj)
return 0;
if (gpointer ret = DOMObjectCache::get(obj))
return WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE(ret);
return wrapTestGenerateIsReachable(obj);
}
WebCore::TestGenerateIsReachable* core(WebKitDOMTestGenerateIsReachable* request)
{
return request ? static_cast<WebCore::TestGenerateIsReachable*>(WEBKIT_DOM_OBJECT(request)->coreObject) : 0;
}
WebKitDOMTestGenerateIsReachable* wrapTestGenerateIsReachable(WebCore::TestGenerateIsReachable* coreObject)
{
ASSERT(coreObject);
return WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE(g_object_new(WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE, "core-object", coreObject, NULL));
}
} // namespace WebKit
G_DEFINE_TYPE(WebKitDOMTestGenerateIsReachable, webkit_dom_test_generate_is_reachable, WEBKIT_TYPE_DOM_OBJECT)
static void webkit_dom_test_generate_is_reachable_finalize(GObject* object)
{
WebKitDOMTestGenerateIsReachablePrivate* priv = WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_GET_PRIVATE(object);
WebKit::DOMObjectCache::forget(priv->coreObject.get());
priv->~WebKitDOMTestGenerateIsReachablePrivate();
G_OBJECT_CLASS(webkit_dom_test_generate_is_reachable_parent_class)->finalize(object);
}
static GObject* webkit_dom_test_generate_is_reachable_constructor(GType type, guint constructPropertiesCount, GObjectConstructParam* constructProperties)
{
GObject* object = G_OBJECT_CLASS(webkit_dom_test_generate_is_reachable_parent_class)->constructor(type, constructPropertiesCount, constructProperties);
WebKitDOMTestGenerateIsReachablePrivate* priv = WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_GET_PRIVATE(object);
priv->coreObject = static_cast<WebCore::TestGenerateIsReachable*>(WEBKIT_DOM_OBJECT(object)->coreObject);
WebKit::DOMObjectCache::put(priv->coreObject.get(), object);
return object;
}
static void webkit_dom_test_generate_is_reachable_class_init(WebKitDOMTestGenerateIsReachableClass* requestClass)
{
GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass);
g_type_class_add_private(gobjectClass, sizeof(WebKitDOMTestGenerateIsReachablePrivate));
gobjectClass->constructor = webkit_dom_test_generate_is_reachable_constructor;
gobjectClass->finalize = webkit_dom_test_generate_is_reachable_finalize;
}
static void webkit_dom_test_generate_is_reachable_init(WebKitDOMTestGenerateIsReachable* request)
{
WebKitDOMTestGenerateIsReachablePrivate* priv = WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_GET_PRIVATE(request);
new (priv) WebKitDOMTestGenerateIsReachablePrivate();
}
/*
* This file is part of the WebKit open source project.
* This file has been generated by generate-bindings.pl. DO NOT MODIFY!
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#if !defined(__WEBKITDOM_H_INSIDE__) && !defined(BUILDING_WEBKIT)
#error "Only <webkitdom/webkitdom.h> can be included directly."
#endif
#ifndef WebKitDOMTestGenerateIsReachable_h
#define WebKitDOMTestGenerateIsReachable_h
#include <glib-object.h>
#include <webkitdom/WebKitDOMObject.h>
#include <webkitdom/webkitdomdefines.h>
G_BEGIN_DECLS
#define WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE (webkit_dom_test_generate_is_reachable_get_type())
#define WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE, WebKitDOMTestGenerateIsReachable))
#define WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE, WebKitDOMTestGenerateIsReachableClass)
#define WEBKIT_DOM_IS_TEST_GENERATE_IS_REACHABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE))
#define WEBKIT_DOM_IS_TEST_GENERATE_IS_REACHABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE))
#define WEBKIT_DOM_TEST_GENERATE_IS_REACHABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_DOM_TEST_GENERATE_IS_REACHABLE, WebKitDOMTestGenerateIsReachableClass))
struct _WebKitDOMTestGenerateIsReachable {
WebKitDOMObject parent_instance;
};
struct _WebKitDOMTestGenerateIsReachableClass {
WebKitDOMObjectClass parent_class;
};
WEBKIT_API GType
webkit_dom_test_generate_is_reachable_get_type (void);
G_END_DECLS
#endif /* WebKitDOMTestGenerateIsReachable_h */
/*
* This file is part of the WebKit open source project.
* This file has been generated by generate-bindings.pl. DO NOT MODIFY!
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef WebKitDOMTestGenerateIsReachablePrivate_h
#define WebKitDOMTestGenerateIsReachablePrivate_h
#include "TestGenerateIsReachable.h"
#include <webkitdom/WebKitDOMTestGenerateIsReachable.h>
namespace WebKit {
WebKitDOMTestGenerateIsReachable* wrapTestGenerateIsReachable(WebCore::TestGenerateIsReachable*);
WebKitDOMTestGenerateIsReachable* kit(WebCore::TestGenerateIsReachable*);
WebCore::TestGenerateIsReachable* core(WebKitDOMTestGenerateIsReachable*);
} // namespace WebKit
#endif /* WebKitDOMTestGenerateIsReachablePrivate_h */
......@@ -191,13 +191,6 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(E
return JSValue::encode(jsUndefined());
}
static inline bool isObservable(JSTestActiveDOMObject* jsTestActiveDOMObject)
{
if (jsTestActiveDOMObject->hasCustomProperties())
return true;
return false;
}
bool JSTestActiveDOMObjectOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
UNUSED_PARAM(handle);
......
......@@ -172,13 +172,6 @@ EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunc
return JSValue::encode(jsUndefined());
}
static inline bool isObservable(JSTestCustomNamedGetter* jsTestCustomNamedGetter)
{
if (jsTestCustomNamedGetter->hasCustomProperties())
return true;
return false;
}
bool JSTestCustomNamedGetterOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
UNUSED_PARAM(handle);
......
......@@ -198,13 +198,6 @@ JSValue JSTestEventConstructor::getConstructor(VM& vm, JSGlobalObject* globalObj
return getDOMConstructor<JSTestEventConstructorConstructor>(vm, jsCast<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)
{
UNUSED_PARAM(handle);
......
......@@ -279,15 +279,6 @@ JSValue JSTestEventTarget::indexGetter(ExecState* exec, JSValue slotBase, unsign
return toJS(exec, thisObj->globalObject(), thisObj->impl().item(index));
}
static inline bool isObservable(JSTestEventTarget* jsTestEventTarget)
{
if (jsTestEventTarget->hasCustomProperties())
return true;
if (jsTestEventTarget->impl().hasEventListeners())
return true;
return false;
}
bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
JSTestEventTarget* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.get().asCell());
......
......@@ -141,13 +141,6 @@ JSValue JSTestException::getConstructor(VM& vm, JSGlobalObject* globalObject)
return getDOMConstructor<JSTestExceptionConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
}
static inline bool isObservable(JSTestException* jsTestException)
{
if (jsTestException->hasCustomProperties())
return true;
return false;
}
bool JSTestExceptionOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
UNUSED_PARAM(handle);
......
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "JSTestGenerateIsReachable.h"
#include "TestGenerateIsReachable.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
/* Hash table */
static const HashTableValue JSTestGenerateIsReachableTableValues[] =
{
{ "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestGenerateIsReachableConstructor), (intptr_t)0 },
{ 0, 0, NoIntrinsic, 0, 0 }
};
static const HashTable JSTestGenerateIsReachableTable = { 2, 1, JSTestGenerateIsReachableTableValues, 0 };
/* Hash table for constructor */
static const HashTableValue JSTestGenerateIsReachableConstructorTableValues[] =
{
{ 0, 0, NoIntrinsic, 0, 0 }
};
static const HashTable JSTestGenerateIsReachableConstructorTable = { 1, 0, JSTestGenerateIsReachableConstructorTableValues, 0 };
const ClassInfo JSTestGenerateIsReachableConstructor::s_info = { "TestGenerateIsReachableConstructor", &Base::s_info, &JSTestGenerateIsReachableConstructorTable, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachableConstructor) };
JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorObject(structure, globalObject)
{
}
void JSTestGenerateIsReachableConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachablePrototype::self(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}
bool JSTestGenerateIsReachableConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSTestGenerateIsReachableConstructor, JSDOMWrapper>(exec, JSTestGenerateIsReachableConstructorTable, jsCast<JSTestGenerateIsReachableConstructor*>(object), propertyName, slot);
}
/* Hash table for prototype */
static const HashTableValue JSTestGenerateIsReachablePrototypeTableValues[] =
{
{ 0, 0, NoIntrinsic, 0, 0 }
};
static const HashTable JSTestGenerateIsReachablePrototypeTable = { 1, 0, JSTestGenerateIsReachablePrototypeTableValues, 0 };
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);
}
const ClassInfo JSTestGenerateIsReachable::s_info = { "TestGenerateIsReachable", &Base::s_info, &JSTestGenerateIsReachableTable, 0 , CREATE_METHOD_TABLE(JSTestGenerateIsReachable) };
JSTestGenerateIsReachable::JSTestGenerateIsReachable(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestGenerateIsReachable> impl)
: JSDOMWrapper(structure, globalObject)
, m_impl(impl.leakRef())
{
}
void JSTestGenerateIsReachable::finishCreation(VM& vm)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
}
JSObject* JSTestGenerateIsReachable::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSTestGenerateIsReachablePrototype::create(vm, globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
void JSTestGenerateIsReachable::destroy(JSC::JSCell* cell)
{
JSTestGenerateIsReachable* thisObject = static_cast<JSTestGenerateIsReachable*>(cell);
thisObject->JSTestGenerateIsReachable::~JSTestGenerateIsReachable();
}
JSTestGenerateIsReachable::~JSTestGenerateIsReachable()
{
releaseImplIfNotNull();
}
bool JSTestGenerateIsReachable::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{