SVN commit 867166 by orlovich: Fix eval-injection of functions into local scope. Fixes the widely used s_code.js statistics(?) script, and potentially tons of other eye-gouging JS. BUG:160466 M +4 -0 nodes.cpp --- branches/KDE/4.1/kdelibs/kjs/nodes.cpp #867165:867166 @@ -975,6 +975,10 @@ // eval-injected symbols can be deleted... flags &= ~DontDelete; + // eval injected a new local into scope! Better mark that down, + // so that NonLocalResolver stops skipping the local scope + exec->variableObject()->setLocalInjected(); + // fallthrough intentional case GlobalCode: exec->variableObject()->put(exec, ident, makeFunctionObject(exec), flags);