Better dukky debug for node creation

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2019-05-04 15:00:50 +01:00
parent a03b4a3c14
commit 99809ee646
1 changed files with 12 additions and 1 deletions

View File

@ -163,6 +163,12 @@ dukky_push_node_stacked(duk_context *ctx)
/* ... node nodeptr klass nodes */
duk_pop_3(ctx);
/* ... node */
{
duk_dup(ctx, -1);
const char * what = duk_safe_to_string(ctx, -1);
NSLOG(dukky, DEEPDEBUG, "Created: %s", what);
duk_pop(ctx);
}
return true;
}
@ -457,7 +463,12 @@ dukky_push_node(duk_context *ctx, struct dom_node *node)
/* ... node nodes */
duk_pop(ctx);
/* ... node */
NSLOG(dukky, DEEPDEBUG, "Found it memoised");
{
duk_dup(ctx, -1);
const char * what = duk_safe_to_string(ctx, -1);
NSLOG(dukky, DEEPDEBUG, "Found it memoised: %s", what);
duk_pop(ctx);
}
return true;
}
/* ... nodes undefined */