a testcase for a new khtml problem
Allan Sandfeld Jensen
kde at carewolf.com
Wed Apr 27 15:37:54 BST 2005
On Wednesday 27 April 2005 15:58, Leo Savernik wrote:
> No, this is clearly a bug. It should only return hidden in cases like
>
> if (document.all)
>
> but not on implicitly dereferencing it
>
> document.all["blah"]
>
> Allen, you coded that one IIRC. Can you comment on that?
>
The problem seems to be here in nodes.cpp. In order to giver better
error-messages it tries to check the type early, but since the type is
spoofed it fails. If you compile without debugging it should work ;)
// ECMA 11.2.1a
Reference AccessorNode1::evaluateReference(ExecState *exec) const
{
Value v1 = expr1->evaluate(exec);
KJS_CHECKEXCEPTIONREFERENCE
Value v2 = expr2->evaluate(exec);
KJS_CHECKEXCEPTIONREFERENCE
#ifndef NDEBUG
// catch errors before being caught in toObject(). better error message.
if (v1.isA(UndefinedType) || v1.isA(NullType)) {
UString s = "Attempted to access property on %s object "
"(result of expression %s)";
(void)throwError(exec, TypeError, s.cstring().c_str(), v1, this);
return Reference::makeValueReference(Undefined());
}
#endif
`Allan
More information about the kfm-devel
mailing list