Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 31 Mar 2002 06:48:51 +0000 (06:48 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 31 Mar 2002 06:48:51 +0000 (06:48 +0000)
apple.com)

* kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc
on object internals pointed to, because they may have already been
collected by the time this object is collected, and in that case
we would corrupt the malloc arena.

* Makefile.am: Make the stamp file depend on all the sources and
headers so the framework gets rebuilt properly.

* JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved
around. No idea what I really changed.

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

JavaScriptCore/ChangeLog
JavaScriptCore/ChangeLog-2002-12-03
JavaScriptCore/ChangeLog-2003-10-25
JavaScriptCore/JavaScriptCore.pbproj/project.pbxproj
JavaScriptCore/Makefile.am
JavaScriptCore/kjs/object.cpp

index ff8d29f8e1f38e954a266c2b0c5d81b9857d6474..1dcef3fae4e2f445a8a79271de08636423fc9e7d 100644 (file)
@@ -1,3 +1,19 @@
+2002-03-30  Maciej Stachowiak  <mjs@apple.com>
+
+       Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and
+       apple.com)
+
+       * kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc
+       on object internals pointed to, because they may have already been
+       collected by the time this object is collected, and in that case
+       we would corrupt the malloc arena.
+
+       * Makefile.am: Make the stamp file depend on all the sources and
+       headers so the framework gets rebuilt properly.
+
+       * JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved
+       around. No idea what I really changed.
+
 2002-03-30  Darin Adler  <darin@apple.com>
 
        * kjs/grammar.y: Took out Id tag so we won't constantly need to
index ff8d29f8e1f38e954a266c2b0c5d81b9857d6474..1dcef3fae4e2f445a8a79271de08636423fc9e7d 100644 (file)
@@ -1,3 +1,19 @@
+2002-03-30  Maciej Stachowiak  <mjs@apple.com>
+
+       Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and
+       apple.com)
+
+       * kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc
+       on object internals pointed to, because they may have already been
+       collected by the time this object is collected, and in that case
+       we would corrupt the malloc arena.
+
+       * Makefile.am: Make the stamp file depend on all the sources and
+       headers so the framework gets rebuilt properly.
+
+       * JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved
+       around. No idea what I really changed.
+
 2002-03-30  Darin Adler  <darin@apple.com>
 
        * kjs/grammar.y: Took out Id tag so we won't constantly need to
index ff8d29f8e1f38e954a266c2b0c5d81b9857d6474..1dcef3fae4e2f445a8a79271de08636423fc9e7d 100644 (file)
@@ -1,3 +1,19 @@
+2002-03-30  Maciej Stachowiak  <mjs@apple.com>
+
+       Fixed Radar 2891272 (JavaScript crashes loading quicktime.com and
+       apple.com)
+
+       * kjs/object.cpp: (ObjectImp::~ObjectImp): Don't call setGCAlloc
+       on object internals pointed to, because they may have already been
+       collected by the time this object is collected, and in that case
+       we would corrupt the malloc arena.
+
+       * Makefile.am: Make the stamp file depend on all the sources and
+       headers so the framework gets rebuilt properly.
+
+       * JavaScriptCore.pbproj/project.pbxproj: Some random numbers moved
+       around. No idea what I really changed.
+
 2002-03-30  Darin Adler  <darin@apple.com>
 
        * kjs/grammar.y: Took out Id tag so we won't constantly need to
index b8edf4471234c8b8c409a30e46eb524ee5a47901..8941be7d1fcd8f2c4b1bd90e1cd99f7d405b49ef 100644 (file)
@@ -81,9 +81,6 @@
                                089C1665FE841158C02AAC07,
                                0867D69AFE84028FC02AAC07,
                                034768DFFF38A50411DB9C8B,
-                               F692A8C802555BA201FF60F7,
-                               F692A8C902555BA201FF60F7,
-                               F692A8CA02555BA201FF60F7,
                        );
                        isa = PBXGroup;
                        name = JavaScriptCore;
                                F692A85D0255597D01FF60F7,
                                F692A85E0255597D01FF60F7,
                                F692A85F0255597D01FF60F7,
+                               F692A8C802555BA201FF60F7,
+                               F692A8C902555BA201FF60F7,
+                               F692A8CA02555BA201FF60F7,
                                F692A8610255597D01FF60F7,
                                F692A8620255597D01FF60F7,
                                F692A8630255597D01FF60F7,
index b8adbf8fa137ba311a1b474c21077e90d7ea107c..2c5d4fdb942854e3410bde9faa2aef2948b5bd5d 100644 (file)
@@ -12,7 +12,7 @@ kjs_testkjs_LDFLAGS = -F$(SYMROOTS) -framework JavaScriptCore
 BUILT_SOURCES = JavaScriptCore-stamp
 CLEANFILES = $(BUILT_SOURCES)
 
-JavaScriptCore-stamp:
+JavaScriptCore-stamp: kjs/*.cpp kjs/*.h
        pbxbuild -buildstyle $(BUILDSTYLE)
        touch JavaScriptCore-stamp
 
index 28c43d317359db253855666cc9db68caa3bf6d77..f98c3e9e98f8e646dac59eb117463b8ce7bc48e2 100644 (file)
@@ -201,12 +201,15 @@ ObjectImp::ObjectImp()
 ObjectImp::~ObjectImp()
 {
   //fprintf(stderr,"ObjectImp::~ObjectImp %p\n",(void*)this);
+#if 0 // Those could be already deleted. The collector ensures no order
+      // ### Check if this leads to memory leaks....
   if (_proto)
     _proto->setGcAllowed();
   if (_internalValue)
     _internalValue->setGcAllowed();
   if (_scope)
     _scope->setGcAllowed();
+#endif
   delete _prop;
 }