Dictionary::Ptr ConfigItem::GetProperties(void)
{
- ASSERT(OwnsLock());
+ ASSERT(!OwnsLock());
+
+ ObjectLock olock(this);
if (!m_Properties) {
DebugHint dhint;
if (IsAbstract())
return DynamicObject::Ptr();
- Dictionary::Ptr properties;
-
- {
- ObjectLock olock(this);
-
- properties = GetProperties();
- }
-
- DynamicObject::Ptr dobj = dtype->CreateObject(properties);
+ DynamicObject::Ptr dobj = dtype->CreateObject(GetProperties());
dobj->SetDebugInfo(m_DebugInfo);
dobj->Register();
persistentItem->Set("type", item->GetType());
persistentItem->Set("name", item->GetName());
persistentItem->Set("abstract", item->IsAbstract());
- {
- ObjectLock olock(item);
- persistentItem->Set("properties", item->GetProperties());
- }
+ persistentItem->Set("properties", item->GetProperties());
persistentItem->Set("debug_hints", item->GetDebugHints());
String json = JsonEncode(persistentItem);