SVN commit 420390 by porten: fixed prototype property lookup order of global window object. Fixes endless loop on maps.google.com. BUGS:98979 M +6 -0 ChangeLog M +16 -3 ecma/kjs_window.cpp --- trunk/KDE/kdelibs/khtml/ChangeLog #420389:420390 @@ -1,3 +1,9 @@ +2005-06-01 Harri Porten + + * ecma/kjs_window.cpp: fixed prototype property lookup order of + global window object. Fixes endless loop on maps.google.com + (bug #98979). + 2005-05-28 Allan Sandfeld Jensen Implement ideographic enumeration including the CSS 2.1 cjk-ideographic and several from CSS 3 List (working draft). --- trunk/KDE/kdelibs/khtml/ecma/kjs_window.cpp #420389:420390 @@ -487,10 +487,10 @@ } // Look for overrides first - Value val = ObjectImp::get(exec, p); - if (!val.isA(UndefinedType)) { + ValueImp *val = getDirect(p); + if (val) { //kdDebug(6070) << "Window::get found dynamic property '" << p.ascii() << "'" << endl; - return isSafeScript(exec) ? val : Undefined(); + return isSafeScript(exec) ? Value(val) : Undefined(); } const HashEntry* entry = Lookup::findEntry(&WindowTable, p); @@ -764,6 +764,19 @@ return getListener(exec,DOM::EventImpl::UNLOAD_EVENT); } } + + // doing the remainder of ObjectImp::get() that is not covered by + // the getDirect() call above. + // #### guessed position. move further up or down? + Object proto = Object::dynamicCast(prototype()); + assert(proto.isValid()); + if (p == specialPrototypePropertyName) + return isSafeScript(exec) ? Value(proto) : Undefined(); + Value val2 = proto.get(exec, p); + if (!val2.isA(UndefinedType)) { + return isSafeScript(exec) ? val2 : Undefined(); + } + KParts::ReadOnlyPart *rop = part->findFramePart( p.qstring() ); if (rop) return retrieve(rop);