Roll out r29435 as it introduces many, many crashes.
authormrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jan 2008 15:43:03 +0000 (15:43 +0000)
committermrowe@apple.com <mrowe@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jan 2008 15:43:03 +0000 (15:43 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29438 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/JSGlobalObject.cpp
JavaScriptCore/kjs/JSGlobalObject.h

index 5576fc04f213be8e7f5cdcbbad41b9261b8b0c94..cc589bf36ca1a824d2d2d474b83b7ab1e09d4d33 100644 (file)
         * kjs/Activation.h:
         * kjs/JSGlobalObject.h:
 
-2008-01-12  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
-
-        Reviewed by Mark Rowe.
-
-        Fixes leaking of ActivationStackNode objects.
-
-        * kjs/JSGlobalObject.cpp:
-        (KJS::JSGlobalObject::deleteActivationStack):
-        (KJS::JSGlobalObject::~JSGlobalObject):
-        (KJS::JSGlobalObject::init):
-        (KJS::JSGlobalObject::reset):
-        * kjs/JSGlobalObject.h:
-
 2008-01-12  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
 
         Reviewed by Maciej.
index 1be4cb1e349b1c58f84aa0e43c049e26130d0328..d06735c26762610c134bc9f78f199facc5040a95 100644 (file)
@@ -90,12 +90,6 @@ static inline unsigned getCurrentTime() {
 
 JSGlobalObject* JSGlobalObject::s_head = 0;
 
-void JSGlobalObject::deleteActivationStack()
-{
-    for (ActivationStackNode* currentNode = d()->activations; currentNode; currentNode = currentNode->prev)
-        delete currentNode;
-}
-
 JSGlobalObject::~JSGlobalObject()
 {
     ASSERT(JSLock::currentThreadIsHoldingLock());
@@ -109,8 +103,6 @@ JSGlobalObject::~JSGlobalObject()
     if (s_head == this)
         s_head = 0;
     
-    deleteActivationStack();
-    
     delete d();
 }
 
@@ -136,8 +128,6 @@ void JSGlobalObject::init()
     d()->recursion = 0;
     d()->debugger = 0;
     
-    d()->activations = 0;
-    
     reset(prototype());
 }
 
@@ -212,11 +202,7 @@ void JSGlobalObject::reset(JSValue* prototype)
 
     ExecState* exec = &d()->globalExec;
 
-    deleteActivationStack();
-    
-    ActivationStackNode* newStackNode = new ActivationStackNode;
-    newStackNode->prev = 0;    
-    d()->activations = newStackNode;
+    d()->activations = new ActivationStackNode;
     d()->activationCount = 0;
 
     // Prototypes
index c27e529f9b77d296a4e523af30480fd862188d58..86a12b01ed9c606b709e7e7ffb533e3c7ffcef18 100644 (file)
@@ -244,7 +244,6 @@ namespace KJS {
         bool checkTimeout();
         void resetTimeoutCheck();
 
-        void deleteActivationStack();
         void checkActivationCount();
 
         static JSGlobalObject* s_head;