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->Seal();
return array;
}

View File

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