Changeset 34977 in webkit for trunk/JavaScriptCore/API/JSBase.cpp
- Timestamp:
- Jul 3, 2008, 12:44:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSBase.cpp
r34947 r34977 89 89 // and it may actually be garbage for some clients (most likely, because of JSGarbageCollect being called after releasing the context). 90 90 91 // FIXME: It would be good to avoid creating a JSGlobalData instance if it didn't exist for this thread yet. 92 Heap* heap = JSGlobalData::threadInstance().heap; 93 if (!heap->isBusy()) 94 heap->collect(); 91 if (JSGlobalData::threadInstanceExists()) { 92 Heap* heap = JSGlobalData::threadInstance().heap; 93 if (!heap->isBusy()) 94 heap->collect(); 95 } 95 96 96 97 JSLock lock(true); 97 98 98 // FIXME: Similarly, we shouldn't create a shared instance here. 99 heap = JSGlobalData::sharedInstance().heap; 100 if (!heap->isBusy()) 101 heap->collect(); 99 if (JSGlobalData::sharedInstanceExists()) { 100 Heap* heap = JSGlobalData::sharedInstance().heap; 101 if (!heap->isBusy()) 102 heap->collect(); 103 } 102 104 103 105 // FIXME: Perhaps we should trigger a second mark and sweep
Note:
See TracChangeset
for help on using the changeset viewer.