Changeset 35663 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Aug 11, 2008, 5:01:26 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Mark Rowe.

<rdar://problem/6130393> REGRESSION: PhotoBooth hangs after launching under TOT Webkit

  • API/JSContextRef.cpp: (JSGlobalContextRelease): Corrected a comment.
  • kjs/collector.cpp: (KJS::Heap::~Heap): Ensure that JSGlobalData is not deleted while sweeping the heap.
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSContextRef.cpp

    r35478 r35663  
    102102        ASSERT(!heap->isBusy());
    103103
    104         // Heap::destroy() will delete JSGlobalObject, which will in turn delete JSGlobalData, which will
     104        // Heap destructor will delete JSGlobalObject, which will in turn delete JSGlobalData, which will
    105105        // delete the heap, which would cause a crash if allowed.
    106106        globalData.heap = 0;
  • trunk/JavaScriptCore/ChangeLog

    r35662 r35663  
     12008-08-11  Alexey Proskuryakov  <[email protected]>
     2
     3        Reviewed by Mark Rowe.
     4
     5        <rdar://problem/6130393> REGRESSION: PhotoBooth hangs after launching under TOT Webkit
     6
     7        * API/JSContextRef.cpp: (JSGlobalContextRelease): Corrected a comment.
     8
     9        * kjs/collector.cpp: (KJS::Heap::~Heap): Ensure that JSGlobalData is not deleted while
     10        sweeping the heap.
     11
    112== Rolled over to ChangeLog-2008-08-10 ==
  • trunk/JavaScriptCore/kjs/collector.cpp

    r35639 r35663  
    135135Heap::~Heap()
    136136{
     137    // The global object is not GC protected at this point, so sweeping may delete it (and thus the global data)
     138    // before other objects that may use the global data.
     139    RefPtr<JSGlobalData> protect(m_globalData);
     140
    137141    delete m_markListSet;
     142    m_markListSet = 0;
     143
    138144    sweep<PrimaryHeap>();
    139145    // No need to sweep number heap, because the JSNumber destructor doesn't do anything.
Note: See TracChangeset for help on using the changeset viewer.