Changeset 77360 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Feb 1, 2011, 9:05:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r77324 r77360 58 58 * DerivedSources.make: 59 59 * JavaScriptCore.xcodeproj/project.pbxproj: 60 61 2011-02-01 Geoffrey Garen <[email protected]> 62 63 Reviewed by Oliver Hunt. 64 65 Refactor JSGlobalObject-related tear-down 66 https://bugs.webkit.org/show_bug.cgi?id=53478 67 68 While investigating crashes caused by r77082, I noticed some strange 69 destructor-time behaviors. This patch makes them less strange. 70 71 * bytecode/CodeBlock.cpp: 72 (JSC::CodeBlock::CodeBlock): 73 (JSC::CodeBlock::markAggregate): 74 * bytecode/CodeBlock.h: 75 (JSC::CodeBlock::globalObject): 76 (JSC::GlobalCodeBlock::GlobalCodeBlock): 77 (JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code 78 blocks on the Heap, instead of on independent global objects. The heap 79 is guaranteed to outlast any GC-owned data structure. The heap is also 80 a natural place to store objects that needs out-of-band marking, since 81 the heap is responsible for marking all roots. 82 83 * runtime/Heap.cpp: 84 (JSC::Heap::markRoots): 85 (JSC::Heap::globalObjectCount): 86 (JSC::Heap::protectedGlobalObjectCount): 87 * runtime/Heap.h: 88 (JSC::Heap::codeBlocks): 89 * runtime/JSGlobalData.cpp: 90 (JSC::JSGlobalData::JSGlobalData): 91 * runtime/JSGlobalData.h: 92 * runtime/JSGlobalObject.cpp: 93 (JSC::JSGlobalObject::~JSGlobalObject): 94 (JSC::JSGlobalObject::init): 95 (JSC::JSGlobalObject::markChildren): 96 * runtime/JSGlobalObject.h: 97 * runtime/MarkedSpace.cpp: Store the set of global objects in a weak map 98 owned by JSGlobalData, instead of an instrusive circular linked list. 99 This is simpler, and it avoids destructor-time access between garbage 100 collected objects, which is hard to get right. 101 102 (JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing 103 everything down. Otherwise, weak data structures will incorrectly report 104 that objects pending destruction are still alive. 60 105 61 106 2011-02-01 Geoffrey Garen <[email protected]>
Note:
See TracChangeset
for help on using the changeset viewer.