alex at milowski.org
Wed Jan 5 19:38:56 PST 2011
I've got a new IDL class I'm working of for some "experiments in XML"
and I've run into an interesting snag. I have a call to a "parse"
mangled. The IDL for the method looks like:
boolean parse(in DOMString str);
reader.parse("<doc><title>I am a document</title></doc>");
Everything else about this interface & implementation works fine.
Unfortunately, for the above method, the string of XML to parse comes
in as "empty". It looks to me like things are mangled in some way but
I can't determine why.
The generated code from the IDL is:
EncodedJSValue JSC_HOST_CALL jsXMLReaderPrototypeFunctionParse(ExecState* exec)
JSValue thisValue = exec->hostThisValue();
JSXMLReader* castedThis = static_cast<JSXMLReader*>(asObject(thisValue));
XMLReader* imp = static_cast<XMLReader*>(castedThis->impl());
const String& str = ustringToString(exec->argument(0).toString(exec));
JSC::JSValue result = jsBoolean(imp->parse(str));
The 'str' object in the debugger is empty and the argument from which
it is converted has a strange string of length 1 character.
Any ideas how this could get mangled? Something is obviously stepping
on some object but I can't see where. The other possibility is
that is a pure guess at this point. The backtrace shows some JIT
compile code in the stack.
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
Bertrand Russell in a footnote of Principles of Mathematics
More information about the webkit-dev