Commit 410567bc authored by Kevin Modzelewski's avatar Kevin Modzelewski

Fix missed refcount

parent a85ec570
...@@ -2424,7 +2424,8 @@ public: ...@@ -2424,7 +2424,8 @@ public:
HCAttrs* attrs = self->b->getHCAttrsPtr(); HCAttrs* attrs = self->b->getHCAttrsPtr();
RELEASE_ASSERT(attrs->hcls->type == HiddenClass::NORMAL || attrs->hcls->type == HiddenClass::SINGLETON, ""); RELEASE_ASSERT(attrs->hcls->type == HiddenClass::NORMAL || attrs->hcls->type == HiddenClass::SINGLETON, "");
for (const auto& p : attrs->hcls->getStrAttrOffsets()) { for (const auto& p : attrs->hcls->getStrAttrOffsets()) {
rtn->d[p.first] = attrs->attr_list->attrs[p.second]; ASSERT(rtn->d.count(p.first) == 0, "need to decref existing keys");
rtn->d[incref(p.first)] = incref(attrs->attr_list->attrs[p.second]);
} }
return rtn; return rtn;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment