Fixing comment about an object's maximum reference counter. Adding runtime check for the counter's overflow.

This commit is contained in:
Ruben Ayrapetyan
2014-07-28 15:17:01 +04:00
parent 27f6d2b552
commit 7984c7e65f
2 changed files with 10 additions and 3 deletions
+5
View File
@@ -68,6 +68,11 @@ ecma_ref_object(ecma_object_t *object_p) /**< object */
* Check that value was not overflowed
*/
JERRY_ASSERT(object_p->GCInfo.u.refs > 0);
if ( unlikely( object_p->GCInfo.u.refs == 0 ) )
{
JERRY_UNREACHABLE();
}
} /* ecma_ref_object */
/**