Reviewed by Maciej.
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jan 2008 11:03:30 +0000 (11:03 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jan 2008 11:03:30 +0000 (11:03 +0000)
        Fixes a problem with the ActivationImp tear-off patch (r29425) where
        some of the calls to JSGlobalObject::tearOffActivation() were using
        the wrong test to determine whether it should leave a relic behind.

        * kjs/function.cpp:
        (KJS::FunctionImp::argumentsGetter):
        (KJS::ActivationImp::getOwnPropertySlot):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29431 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/function.cpp

index 050b7cb..6b53bd5 100644 (file)
@@ -1,3 +1,15 @@
+2008-01-12  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
+
+        Reviewed by Maciej.
+
+        Fixes a problem with the ActivationImp tear-off patch (r29425) where
+        some of the calls to JSGlobalObject::tearOffActivation() were using
+        the wrong test to determine whether it should leave a relic behind.
+
+        * kjs/function.cpp:
+        (KJS::FunctionImp::argumentsGetter):
+        (KJS::ActivationImp::getOwnPropertySlot):
+
 2008-01-11  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Oliver Hunt.
index 4212e10..26197e4 100644 (file)
@@ -88,7 +88,7 @@ JSValue* FunctionImp::argumentsGetter(ExecState* exec, JSObject*, const Identifi
   
   for (ExecState* e = exec; e; e = e->callingExecState())
     if (e->function() == thisObj) {
-      e->dynamicGlobalObject()->tearOffActivation(e, e == exec);
+      e->dynamicGlobalObject()->tearOffActivation(e, e != exec);
       return e->activationObject()->get(exec, propertyName);
     }
   
@@ -391,7 +391,7 @@ bool ActivationImp::getOwnPropertySlot(ExecState* exec, const Identifier& proper
     if (propertyName == exec->propertyNames().arguments) {
         for (ExecState* e = exec; e; e = e->callingExecState())
             if (e->function() == d()->function) {
-                e->dynamicGlobalObject()->tearOffActivation(e, e == exec);
+                e->dynamicGlobalObject()->tearOffActivation(e, e != exec);
                 ActivationImp* newActivation = e->activationObject();
                 slot.setCustom(newActivation, newActivation->getArgumentsGetter());
                 return true;