From kde-commits Thu Oct 02 23:43:21 2008 From: Maks Orlovich Date: Thu, 02 Oct 2008 23:43:21 +0000 To: kde-commits Subject: KDE/kdelibs/kjs Message-Id: <1222991001.490367.24015.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122299101132625 SVN commit 867167 by orlovich: Merged revision 867166: 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 --- trunk/KDE/kdelibs/kjs/nodes.cpp #867166:867167 @@ -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);