Browse Source

Fix a few broken asserts in refcount code

The asserts didn't check for NULL properly.  The code itself is OK, and
handles NULL correctly.
pull/1090/head
Sami Vaarala 8 years ago
parent
commit
e156fe86b3
  1. 4
      src-input/duk_heap_refcount.c

4
src-input/duk_heap_refcount.c

@ -85,10 +85,10 @@ DUK_LOCAL void duk__refcount_finalize_hobject(duk_hthread *thr, duk_hobject *h)
if (p_flag[n] & DUK_PROPDESC_FLAG_ACCESSOR) {
duk_hobject *h_getset;
h_getset = p_val[n].a.get;
DUK_ASSERT(DUK_HEAPHDR_IS_OBJECT((duk_heaphdr *) h_getset));
DUK_ASSERT(h_getset == NULL || DUK_HEAPHDR_IS_OBJECT((duk_heaphdr *) h_getset));
DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, h_getset);
h_getset = p_val[n].a.set;
DUK_ASSERT(DUK_HEAPHDR_IS_OBJECT((duk_heaphdr *) h_getset));
DUK_ASSERT(h_getset == NULL || DUK_HEAPHDR_IS_OBJECT((duk_heaphdr *) h_getset));
DUK_HOBJECT_DECREF_NORZ_ALLOWNULL(thr, h_getset);
} else {
duk_tval *tv_val;

Loading…
Cancel
Save