Changeset 37215 in webkit for trunk/JavaScriptCore/kjs/collector.cpp
- Timestamp:
- Oct 2, 2008, 4:48:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/collector.cpp
r36263 r37215 124 124 , m_globalData(globalData) 125 125 { 126 ASSERT(globalData); 127 126 128 #if ENABLE(JSC_MULTIPLE_THREADS) 127 129 int error = pthread_key_create(&m_currentThreadRegistrar, unregisterThread); … … 136 138 Heap::~Heap() 137 139 { 140 // The destroy function must already have been called, so assert this. 141 ASSERT(!m_globalData); 142 } 143 144 void Heap::destroy() 145 { 138 146 JSLock lock(false); 139 147 140 // The global object is not GC protected at this point, so sweeping may delete it (and thus the global data) 141 // before other objects that may use the global data. 148 if (!m_globalData) 149 return; 150 151 // The global object is not GC protected at this point, so sweeping may delete it 152 // (and thus the global data) before other objects that may use the global data. 142 153 RefPtr<JSGlobalData> protect(m_globalData); 143 154 … … 167 178 } 168 179 #endif 180 181 m_globalData = 0; 169 182 } 170 183
Note:
See TracChangeset
for help on using the changeset viewer.