Add assert that we got a base URI from the node.

This commit is contained in:
Michael Drake 2015-12-20 13:33:41 +00:00
parent a6226170dd
commit dbbf4ad648

View File

@ -47,9 +47,10 @@ getter Node::nodeName()
getter Node::baseURI()
%{
dom_exception exc;
dom_string *base;
dom_string *base = NULL;
exc = dom_node_get_base(priv->node, &base);
if (exc != DOM_NO_ERR) return 0;
assert(base != NULL);
duk_push_lstring(ctx, dom_string_data(base), dom_string_length(base));
dom_string_unref(base);
return 1;