Reviewed by Maciej.
[WebKit.git] / JavaScriptCore / kjs / function.cpp
index 4212e10bc788dde1a5dbc7f81222723dbdaee09b..26197e4bff493aae70f01b77cffdf9759ac9a7c4 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;