Don't seal DynamicObject updates.

This commit is contained in:
Gunnar Beutner 2013-06-19 10:37:50 +02:00
parent 686ea10213
commit 0d64a8fd32
3 changed files with 0 additions and 16 deletions

View File

@ -210,8 +210,6 @@ Array::Ptr Array::FromJson(cJSON *json)
array->Add(Value::FromJson(i)); array->Add(Value::FromJson(i));
} }
array->Seal();
return array; return array;
} }

View File

@ -277,8 +277,6 @@ Dictionary::Ptr Dictionary::FromJson(cJSON *json)
dictionary->Set(i->string, Value::FromJson(i)); dictionary->Set(i->string, Value::FromJson(i));
} }
dictionary->Seal();
return dictionary; return dictionary;
} }

View File

@ -113,8 +113,6 @@ Dictionary::Ptr DynamicObject::BuildUpdate(double sinceTx, int attributeTypes) c
} }
} }
attrs->Seal();
Dictionary::Ptr update = boost::make_shared<Dictionary>(); Dictionary::Ptr update = boost::make_shared<Dictionary>();
update->Set("attrs", attrs); update->Set("attrs", attrs);
@ -123,8 +121,6 @@ Dictionary::Ptr DynamicObject::BuildUpdate(double sinceTx, int attributeTypes) c
else if (attrs->GetLength() == 0) else if (attrs->GetLength() == 0)
return Dictionary::Ptr(); return Dictionary::Ptr();
update->Seal();
return update; return update;
} }
@ -133,8 +129,6 @@ void DynamicObject::ApplyUpdate(const Dictionary::Ptr& serializedUpdate,
{ {
ObjectLock olock(this); ObjectLock olock(this);
ASSERT(serializedUpdate->IsSealed());
Value configTxValue = serializedUpdate->Get("configTx"); Value configTxValue = serializedUpdate->Get("configTx");
boost::mutex::scoped_lock lock(m_AttributeMutex); boost::mutex::scoped_lock lock(m_AttributeMutex);
@ -155,8 +149,6 @@ void DynamicObject::ApplyUpdate(const Dictionary::Ptr& serializedUpdate,
Dictionary::Ptr attrs = serializedUpdate->Get("attrs"); Dictionary::Ptr attrs = serializedUpdate->Get("attrs");
ASSERT(attrs->IsSealed());
{ {
ObjectLock alock(attrs); ObjectLock alock(attrs);
@ -167,8 +159,6 @@ void DynamicObject::ApplyUpdate(const Dictionary::Ptr& serializedUpdate,
Dictionary::Ptr attr = it->second; Dictionary::Ptr attr = it->second;
ASSERT(attr->IsSealed());
int type = attr->Get("type"); int type = attr->Get("type");
if ((type & ~allowedTypes) != 0) if ((type & ~allowedTypes) != 0)
@ -519,8 +509,6 @@ void DynamicObject::RestoreObjects(const String& filename)
while (NetString::ReadStringFromStream(sfp, &message)) { while (NetString::ReadStringFromStream(sfp, &message)) {
Dictionary::Ptr persistentObject = Value::Deserialize(message); Dictionary::Ptr persistentObject = Value::Deserialize(message);
ASSERT(persistentObject->IsSealed());
String type = persistentObject->Get("type"); String type = persistentObject->Get("type");
String name = persistentObject->Get("name"); String name = persistentObject->Get("name");
Dictionary::Ptr update = persistentObject->Get("update"); Dictionary::Ptr update = persistentObject->Get("update");