a testcase for a new khtml problem

Luciano Montanaro mikelima at cirulla.net
Wed Apr 27 15:45:44 BST 2005


El Miércoles 27 Abril 2005 16:37, Allan Sandfeld Jensen escribió:
> 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 ;)
>

I was thinking the same too. Unfortunately, that's not enough.
Commenting the code out, the  KJS::Reference::getvalue() fails instead,
(as I said in the previous message - I have been skipping the 
evaluateReference passage)
because the 

if (o.type() != ObjectType) test triggers.


> // 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

-- 
Luciano Montanaro       //
                    \\ //
                     \x/Un euro, un voto!




More information about the kfm-devel mailing list