kdelibs/khtml

David Faure dfaure at klaralvdalens-datakonsult.se
Tue Dec 2 12:37:18 CET 2003


On Tuesday 02 December 2003 12:00, Maciej Stachowiak wrote:
> 
> On Nov 25, 2003, at 4:11 AM, David Faure wrote:
> 
> > In case you didn't pick it up in khtml-cvs: you might want to apply 
> > this fix.
> > Testcase and real website url at 
> > http://bugs.kde.org/show_bug.cgi?id=56983
> >
> 
> Thanks, merged, modulo differences in the WebCore tree. One difference 
> I noticed is that we still have the always-returns-true version of 
> Window::hasProperty. Can anyone tell me what other fixes are needed to 
> back off of that safely? I noticed something in the cvs logs about a 
> var decl fix, but I am not sure what fix is referred to.

The cvs log also refers to #51120, i.e.
http://bugs.kde.org/show_bug.cgi?id=51120
which has a testcase in comment #1, and refers to a fix in object.cpp

I think it's this one:
r1.91 removes the HostCode stuff, and also "fixes khtmltests/regression/tests/ecma/location.html 
by adding Internal to flags in VarDeclNode, so that "var location" bypasses "window.location"

So this is the code you want:

void Window::put(ExecState* exec, const Identifier &propertyName, const Value &value, int attr)
{
  // Called by an internal KJS call (e.g. InterpreterImp's constructor) ?
  // If yes, save time and jump directly to ObjectImp.
  if ( (attr != None && attr != DontDelete) ||
       // Same thing if we have a local override (e.g. "var location")
       ( isSafeScript( exec ) && ObjectImp::getDirect(propertyName) ) )
  {
    ObjectImp::put( exec, propertyName, value, attr );
    return;
  }

 [...rest of the put method...]
}

BTW r1.97 removes the recursive argument from hasProperty, do you still have that?


-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions


More information about the Khtml-devel mailing list