[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdelibs/kjs
From:       Maks Orlovich <maksim () kde ! org>
Date:       2008-10-02 23:42:34
Message-ID: 1222990954.113104.23935.nullmailer () svn ! kde ! org
[Download RAW message or body]

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);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic