summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/API/JSCallbackObject.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
commit5466563f4b5b6b86523e3f89bb7f77e5b5270c78 (patch)
tree8caccf7cd03a15207cde3ba282c88bf132482a91 /Source/JavaScriptCore/API/JSCallbackObject.h
parent33b26980cb24288b5a9f2590ccf32a949281bb79 (diff)
downloadqtwebkit-5466563f4b5b6b86523e3f89bb7f77e5b5270c78.tar.gz
Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)
WebKit update which introduces the QtWebKitWidgets module that contains the WK1 widgets based API. (In fact it renames QtWebKit to QtWebKitWidgets while we're working on completing the entire split as part of https://bugs.webkit.org/show_bug.cgi?id=99314
Diffstat (limited to 'Source/JavaScriptCore/API/JSCallbackObject.h')
-rw-r--r--Source/JavaScriptCore/API/JSCallbackObject.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h
index 5022aaf40..3acf2ef10 100644
--- a/Source/JavaScriptCore/API/JSCallbackObject.h
+++ b/Source/JavaScriptCore/API/JSCallbackObject.h
@@ -83,13 +83,13 @@ struct JSCallbackObjectData : WeakHandleOwner {
PrivatePropertyMap::const_iterator location = m_propertyMap.find(propertyName.impl());
if (location == m_propertyMap.end())
return JSValue();
- return location->second.get();
+ return location->value.get();
}
void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value)
{
WriteBarrier<Unknown> empty;
- m_propertyMap.add(propertyName.impl(), empty).iterator->second.set(globalData, owner, value);
+ m_propertyMap.add(propertyName.impl(), empty).iterator->value.set(globalData, owner, value);
}
void deletePrivateProperty(const Identifier& propertyName)
@@ -100,8 +100,8 @@ struct JSCallbackObjectData : WeakHandleOwner {
void visitChildren(SlotVisitor& visitor)
{
for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) {
- if (ptr->second)
- visitor.append(&ptr->second);
+ if (ptr->value)
+ visitor.append(&ptr->value);
}
}
@@ -133,12 +133,10 @@ public:
callbackObject->finishCreation(exec);
return callbackObject;
}
- static JSCallbackObject* create(JSGlobalData& globalData, JSClassRef classRef, Structure* structure)
- {
- JSCallbackObject* callbackObject = new (NotNull, allocateCell<JSCallbackObject>(globalData.heap)) JSCallbackObject(globalData, classRef, structure);
- callbackObject->finishCreation(globalData);
- return callbackObject;
- }
+ static JSCallbackObject<Parent>* create(JSGlobalData&, JSClassRef, Structure*);
+
+ static const bool needsDestruction;
+ static void destroy(JSCell*);
void setPrivate(void* data);
void* getPrivate();
@@ -173,8 +171,6 @@ protected:
private:
static String className(const JSObject*);
- static void destroy(JSCell*);
-
static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType);
static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&);