| Summary: | Overriding window object properties | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Harri Porten <porten> |
| Component: | kjs | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Testcase | ||
|
Description
Harri Porten
2005-04-19 01:45:22 UTC
Created attachment 10735 [details]
Testcase
Uhm, Stephan, did you notice who filed the bug? I think he can tell KJS core vs. bindings :-) SVN commit 419021 by porten: fixed override of properties on variable declarations. Not sure if this is the complete story, yet, but it is a beginning. BUGS:104181 M +5 -0 ChangeLog M +4 -1 nodes.cpp --- trunk/KDE/kdelibs/kjs/ChangeLog #419020:419021 @@ -1,3 +1,8 @@ +2005-05-28 Harri Porten <porten@kde.org> + + * nodes.cpp: fixed override of properties on variable + declarations. See bug report #104181. + 2005-05-16 Harri Porten <porten@kde.org> * removed remaining use of deprecated Value::isNull(). --- trunk/KDE/kdelibs/kjs/nodes.cpp #419020:419021 @@ -1763,7 +1763,8 @@ val = init->evaluate(exec); KJS_CHECKEXCEPTIONVALUE } else { - if ( variable.hasProperty(exec, ident ) ) // already declared ? + // ### check attributes? reuse check done in processVarDecls()? + if (variable.imp()->getDirect(ident)) // already declared ? return Value(); val = Undefined(); } @@ -1789,6 +1790,8 @@ void VarDeclNode::processVarDecls(ExecState *exec) { Object variable = exec->context().variableObject(); + // ### use getDirect()? Check attributes? + // ### avoid duplication with actions performed in evaluate()? if ( !variable.hasProperty( exec, ident ) ) { // already declared ? int flags = None; if (exec->_context->type() != EvalCode) |