[webkit-dev] gdom_x_path_evaluator_create_ns_resolver [was: webkit #16401]
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Mon Jun 8 10:33:31 PDT 2009
> from a random google search, leading to this:
> http://www.faqts.com/knowledge_base/view.phtml/aid/34022
>
> a code snippet is this:
>
> // test with no prefix doesn't find nodes:
> var xpathResult = xmlDocument.evaluate(
> "//element",
> xmlDocument,
> null,
> XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
> null
> );
>
> showing that yes, it should be possible to pass in NULL as that last argument.
>
> hmmm, ok, gimme 1 sec, i'll just update CodeGeneratorGObject.pm so it
> can accept NULL arguments and pass them on...
ok - try a git pull from http://github.org/lkcl/webkit/16401.master -
i've disabled the g_return_val_if_fail() macros so that NULL can be
passed in to all arguments - if you get a segfault somewhere in WebKit
"core" code, you know you shouldn't have passed in one of the
arguments as NULL :)
try this:
res = gdom_document_evaluate(doc, exp, GDOM_NODE(body), resolver, 0, NULL);
or even this:
res = gdom_document_evaluate(doc, exp, NULL, resolver, 0, NULL);
l.
More information about the webkit-dev
mailing list