Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that children are freed before their parents #324

Closed
wants to merge 71 commits into from

Conversation

rchipka
Copy link
Member

@rchipka rchipka commented Jul 23, 2015

This pull request causes XmlNodes to Ref() their parents. This causes parent node's ref count to increase, which means that it won't be GC'ed until the ref count goes back down to 0. When the child node's destructor is called, it Unref()'s the parent node. This forces parent nodes to stick around while there are still children that haven't been freed.

ncb000gt and others added 30 commits May 10, 2012 16:28
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Avoids blocking new features and fixes until the fix for reference
counting is introduced.
set toString() to output formatted output
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Expose line numbers when parsing from string
This makes it easier to build on multiple OSes as well as avoids having
to install additional packages or external deps when trying to use this
module.
Remove requirement to have libxml2-dev or whatever installed. The
libxml2 sources ship with this module.
we don't need zlib support

see libxmljs#195
Contributors can be helpful by doing the features we have greenlit.
…assed to xmllib's underlying XML parsing function

The options argument, if provided, is an object whose keys correspond
to flags defined in xml_document.cc. If the corresponding value of the
key is true (or true-like), the flag xmlParserOption flag gets passed
to xmlReadMemory.

Example:

    libxmljs.parseXml(xml, {noblanks: true});

which is particularly useful when calling toString() to produce formatted
output on the document later. If you parse an XML string that has indentation,
insert some nodes, and then try toString() on it, it won't indent the new
nodes properly unless `noblanks` is set in the options.

See:
http://xmlsoft.org/html/libxml-parser.html#xmlParserOption
 * This commit makes it possible to create
   XML commment nodes in nodejs.
 * A new XmlComment class is introduced
   which exports a method text() to get and set
   the comment content.
 * This patch also includes tests to assert comment
   creation and the getting and setting of comment
   content through the text() function.
Comments: Add initial support and tests
Node 0.11+ uses a version of v8 which has radically changed APIs. NAN is
a project to support legacy and currency versions of the v8 apis.
marogers and others added 27 commits October 30, 2014 22:55
HTML documents have lax parsing and can be created even without a root node. This results in errors when the document defers methods to the root node. This patch catches that circumstance and throws more descriptive errors to let you know what went wrong.
HTML document throws better errors when there is no root node
add assertion to catch failed attribute creation
update nan to 1.5.1 and fix issues with the latest v8
Added support for RELAX NG schema validation
package.json: Add license attribute
Bindings for list of features from xmlHasFeature
@rchipka rchipka closed this Jul 23, 2015
@rchipka rchipka reopened this Jul 23, 2015
@rchipka rchipka closed this Jul 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet