Changeset 34659 in webkit for trunk/JavaScriptCore/API/JSBase.cpp
- Timestamp:
- Jun 19, 2008, 10:29:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSBase.cpp
r34581 r34659 29 29 30 30 #include "APICast.h" 31 #include "completion.h" 31 32 #include <kjs/ExecState.h> 32 33 #include <kjs/InitializeThreading.h> … … 86 87 initializeThreading(); 87 88 89 // It might seem that we have a context passed to this function, and can use toJS(ctx)->heap(), but the parameter is likely to be NULL, 90 // and it may actually be garbage for some clients (most likely, because of JSGarbageCollect being called after releasing the context). 91 88 92 JSLock lock; 89 if (!Collector::isBusy()) 90 Collector::collect(); 93 94 // FIXME: It would be good to avoid creating a JSGlobalData instance if it didn't exist for this thread yet. 95 Heap* heap = JSGlobalData::threadInstance().heap; 96 if (!heap->isBusy()) 97 heap->collect(); 98 99 // FIXME: Similarly, we shouldn't create a shared instance here. 100 heap = JSGlobalData::sharedInstance().heap; 101 if (!heap->isBusy()) 102 heap->collect(); 103 91 104 // FIXME: Perhaps we should trigger a second mark and sweep 92 105 // once the garbage collector is done if this is called when
Note:
See TracChangeset
for help on using the changeset viewer.