summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/API/JSCallbackObject.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/JavaScriptCore/API/JSCallbackObject.h
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/JavaScriptCore/API/JSCallbackObject.h')
-rw-r--r--Source/JavaScriptCore/API/JSCallbackObject.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h
index 83442b2..f47d0b1 100644
--- a/Source/JavaScriptCore/API/JSCallbackObject.h
+++ b/Source/JavaScriptCore/API/JSCallbackObject.h
@@ -54,11 +54,11 @@ struct JSCallbackObjectData {
return m_privateProperties->getPrivateProperty(propertyName);
}
- void setPrivateProperty(const Identifier& propertyName, JSValue value)
+ void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value)
{
if (!m_privateProperties)
m_privateProperties = adoptPtr(new JSPrivatePropertyMap);
- m_privateProperties->setPrivateProperty(propertyName, value);
+ m_privateProperties->setPrivateProperty(globalData, owner, propertyName, value);
}
void deletePrivateProperty(const Identifier& propertyName)
@@ -83,12 +83,13 @@ struct JSCallbackObjectData {
PrivatePropertyMap::const_iterator location = m_propertyMap.find(propertyName.impl());
if (location == m_propertyMap.end())
return JSValue();
- return location->second;
+ return location->second.get();
}
- void setPrivateProperty(const Identifier& propertyName, JSValue value)
+ void setPrivateProperty(JSGlobalData& globalData, JSCell* owner, const Identifier& propertyName, JSValue value)
{
- m_propertyMap.set(propertyName.impl(), value);
+ WriteBarrier<Unknown> empty;
+ m_propertyMap.add(propertyName.impl(), empty).first->second.set(globalData, owner, value);
}
void deletePrivateProperty(const Identifier& propertyName)
@@ -100,12 +101,12 @@ struct JSCallbackObjectData {
{
for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) {
if (ptr->second)
- markStack.append(ptr->second);
+ markStack.append(&ptr->second);
}
}
private:
- typedef HashMap<RefPtr<StringImpl>, JSValue, IdentifierRepHash> PrivatePropertyMap;
+ typedef HashMap<RefPtr<StringImpl>, WriteBarrier<Unknown>, IdentifierRepHash> PrivatePropertyMap;
PrivatePropertyMap m_propertyMap;
};
OwnPtr<JSPrivatePropertyMap> m_privateProperties;
@@ -137,9 +138,9 @@ public:
return m_callbackObjectData->getPrivateProperty(propertyName);
}
- void setPrivateProperty(const Identifier& propertyName, JSValue value)
+ void setPrivateProperty(JSGlobalData& globalData, const Identifier& propertyName, JSValue value)
{
- m_callbackObjectData->setPrivateProperty(propertyName, value);
+ m_callbackObjectData->setPrivateProperty(globalData, this, propertyName, value);
}
void deletePrivateProperty(const Identifier& propertyName)
@@ -154,7 +155,6 @@ private:
virtual UString className() const;
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
- virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&);