[webkit-changes] cvs commit: JavaScriptCore/bindings runtime_root.cpp runtime_root.h

Timothy thatcher at opensource.apple.com
Thu Sep 22 12:14:24 PDT 2005


thatcher    05/09/22 12:14:24

  Modified:    .        Tag: Safari-2-0-branch ChangeLog
               bindings Tag: Safari-2-0-branch runtime_root.cpp
                        runtime_root.h
  Log:
  	    Merges fixes from TOT to Safari-2-0-branch
  
      2005-09-20  Geoffrey Garen  <ggaren at apple.com>
  
          - More changes needed to fix <rdar://problem/4214783> 8F29 REGRESSION(Denver/Chardonnay):
            kjs_fast_malloc crash due to lack of locking on multiple threads (seen selecting volumes in
            the installer)
  
          Added InterpreterLocks in some places in the bindings we missed before.
  
          Reviewed by john.
  
          * bindings/runtime_root.cpp:
          (KJS::Bindings::addNativeReference):
          (KJS::Bindings::removeNativeReference):
          (RootObject::removeAllNativeReferences):
          * bindings/runtime_root.h:
          (KJS::Bindings::RootObject::~RootObject):
          (KJS::Bindings::RootObject::setRootObjectImp):
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.677.6.36 +22 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.677.6.35
  retrieving revision 1.677.6.36
  diff -u -r1.677.6.35 -r1.677.6.36
  --- ChangeLog	16 Sep 2005 02:33:56 -0000	1.677.6.35
  +++ ChangeLog	22 Sep 2005 19:14:22 -0000	1.677.6.36
  @@ -1,3 +1,25 @@
  +2005-09-22  Timothy Hatcher  <timothy at apple.com>
  +
  +	    Merges fixes from TOT to Safari-2-0-branch
  +
  +    2005-09-20  Geoffrey Garen  <ggaren at apple.com>
  +
  +        - More changes needed to fix <rdar://problem/4214783> 8F29 REGRESSION(Denver/Chardonnay):
  +          kjs_fast_malloc crash due to lack of locking on multiple threads (seen selecting volumes in
  +          the installer)
  +          
  +        Added InterpreterLocks in some places in the bindings we missed before.
  +        
  +        Reviewed by john.
  +
  +        * bindings/runtime_root.cpp:
  +        (KJS::Bindings::addNativeReference):
  +        (KJS::Bindings::removeNativeReference):
  +        (RootObject::removeAllNativeReferences):
  +        * bindings/runtime_root.h:
  +        (KJS::Bindings::RootObject::~RootObject):
  +        (KJS::Bindings::RootObject::setRootObjectImp):
  +
   2005-09-14  Maciej Stachowiak  <mjs at apple.com>
   
           Reviewed by Geoff.
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.8.10.1  +10 -5     JavaScriptCore/bindings/runtime_root.cpp
  
  Index: runtime_root.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_root.cpp,v
  retrieving revision 1.8
  retrieving revision 1.8.10.1
  diff -u -r1.8 -r1.8.10.1
  --- runtime_root.cpp	17 Jan 2005 22:41:22 -0000	1.8
  +++ runtime_root.cpp	22 Sep 2005 19:14:23 -0000	1.8.10.1
  @@ -161,10 +161,11 @@
           unsigned int numReferences = (unsigned int)CFDictionaryGetValue (referencesDictionary, imp);
           if (numReferences == 0) {
   #if !USE_CONSERVATIVE_GC
  -	    imp->ref();
  +            imp->ref();
   #endif
   #if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  -	    gcProtect(imp);
  +            InterpreterLock lock;
  +            gcProtect(imp);
   #endif 
               CFDictionaryAddValue (referencesDictionary, imp,  (const void *)1);
           }
  @@ -185,10 +186,11 @@
           unsigned int numReferences = (unsigned int)CFDictionaryGetValue (referencesDictionary, imp);
           if (numReferences == 1) {
   #if !USE_CONSERVATIVE_GC
  -	    imp->deref();
  +            imp->deref();
   #endif
   #if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  -	    gcUnprotect(imp);
  +            InterpreterLock lock;
  +            gcUnprotect(imp);
   #endif 
               CFDictionaryRemoveValue (referencesDictionary, imp);
           }
  @@ -335,12 +337,15 @@
           allImps = (void **)malloc (sizeof(void *) * count);
           CFDictionaryGetKeysAndValues (referencesDictionary, (const void **)allImps, NULL);
           for(i = 0; i < count; i++) {
  +#if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  +            InterpreterLock lock;
  +#endif
               ObjectImp *anImp = static_cast<ObjectImp*>(allImps[i]);
   #if !USE_CONSERVATIVE_GC
               anImp->deref();
   #endif
   #if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  -	    gcUnprotect(anImp);
  +            gcUnprotect(anImp);
   #endif
           }
           free ((void *)allImps);
  
  
  
  1.6.10.3  +6 -3      JavaScriptCore/bindings/runtime_root.h
  
  Index: runtime_root.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/bindings/runtime_root.h,v
  retrieving revision 1.6.10.2
  retrieving revision 1.6.10.3
  diff -u -r1.6.10.2 -r1.6.10.3
  --- runtime_root.h	16 Sep 2005 02:34:00 -0000	1.6.10.2
  +++ runtime_root.h	22 Sep 2005 19:14:23 -0000	1.6.10.3
  @@ -54,18 +54,21 @@
           _imp->deref();
   #endif
   #if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  -	gcUnprotect(_imp);
  +        InterpreterLock lock;
  +        gcUnprotect(_imp);
   #endif
       }
       
       void setRootObjectImp (ObjectImp *i) { 
  +#if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  +        InterpreterLock lock;
  +#endif
           _imp = i;
   #if !USE_CONSERVATIVE_GC
           _imp->ref();
  -
   #endif
   #if USE_CONSERVATIVE_GC | TEST_CONSERVATIVE_GC
  -	gcProtect(_imp);
  +        gcProtect(_imp);
   #endif
       }
       
  
  
  



More information about the webkit-changes mailing list