Changeset 37215 in webkit for trunk/JavaScriptCore/API/JSContextRef.cpp
- Timestamp:
- Oct 2, 2008, 4:48:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSContextRef.cpp
r36263 r37215 88 88 JSGlobalData& globalData = exec->globalData(); 89 89 90 globalData.heap ->registerThread();90 globalData.heap.registerThread(); 91 91 92 92 gcProtect(exec->dynamicGlobalObject()); … … 105 105 if (globalData.refCount() == 2) { // One reference is held by JSGlobalObject, another added by JSGlobalContextRetain(). 106 106 // The last reference was released, this is our last chance to collect. 107 Heap* heap = globalData.heap; 108 109 ASSERT(!heap->protectedObjectCount()); 110 ASSERT(!heap->isBusy()); 111 112 delete heap; 113 globalData.heap = 0; 107 ASSERT(!globalData.heap.protectedObjectCount()); 108 ASSERT(!globalData.heap.isBusy()); 109 globalData.heap.destroy(); 114 110 } else 115 globalData.heap ->collect();111 globalData.heap.collect(); 116 112 117 113 globalData.deref(); … … 121 117 { 122 118 ExecState* exec = toJS(ctx); 123 exec->globalData().heap ->registerThread();119 exec->globalData().heap.registerThread(); 124 120 JSLock lock(exec); 125 121
Note:
See TracChangeset
for help on using the changeset viewer.