Changeset 98302 in webkit
- Timestamp:
- Oct 24, 2011, 5:21:29 PM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r98299 r98302 1 2011-10-24 Oliver Hunt <oliver@apple.com> 2 3 Crash in void JSC::validateCell<JSC::RegExp*>(JSC::RegExp*) 4 https://bugs.webkit.org/show_bug.cgi?id=70689 5 6 Reviewed by Filip Pizlo. 7 8 While performing codegen we need to make the GlobalData explicitly 9 aware of the codeblock being compiled, as compilation may trigger GC 10 and CodeBlock holds GC values, but has not yet been assigned to its 11 owner executable. 12 13 * bytecompiler/BytecodeGenerator.cpp: 14 (JSC::BytecodeGenerator::BytecodeGenerator): 15 (JSC::BytecodeGenerator::~BytecodeGenerator): 16 * bytecompiler/BytecodeGenerator.h: 17 * heap/AllocationSpace.cpp: 18 (JSC::AllocationSpace::allocateSlowCase): 19 * heap/Heap.cpp: 20 (JSC::Heap::markRoots): 21 * runtime/JSGlobalData.cpp: 22 (JSC::JSGlobalData::JSGlobalData): 23 * runtime/JSGlobalData.h: 24 (JSC::JSGlobalData::startedCompiling): 25 (JSC::JSGlobalData::finishedCompiling): 26 1 27 2011-10-24 Filip Pizlo <fpizlo@apple.com> 2 28 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r98179 r98302 220 220 , m_expressionTooDeep(false) 221 221 { 222 m_globalData->startedCompiling(m_codeBlock); 222 223 if (m_shouldEmitDebugHooks) 223 224 m_codeBlock->setNeedsFullScopeChain(true); … … 290 291 , m_expressionTooDeep(false) 291 292 { 293 m_globalData->startedCompiling(m_codeBlock); 292 294 if (m_shouldEmitDebugHooks) 293 295 m_codeBlock->setNeedsFullScopeChain(true); … … 451 453 , m_expressionTooDeep(false) 452 454 { 455 m_globalData->startedCompiling(m_codeBlock); 453 456 if (m_shouldEmitDebugHooks || m_baseScopeDepth) 454 457 m_codeBlock->setNeedsFullScopeChain(true); … … 471 474 codeBlock->m_numCapturedVars = codeBlock->m_numVars; 472 475 preserveLastVar(); 476 } 477 478 BytecodeGenerator::~BytecodeGenerator() 479 { 480 m_globalData->finishedCompiling(m_codeBlock); 473 481 } 474 482 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r97675 r98302 97 97 BytecodeGenerator(EvalNode*, ScopeChainNode*, SymbolTable*, EvalCodeBlock*, CompilationKind); 98 98 99 ~BytecodeGenerator(); 100 99 101 JSGlobalData* globalData() const { return m_globalData; } 100 102 const CommonIdentifiers& propertyNames() const { return *m_globalData->propertyNames; } -
trunk/Source/JavaScriptCore/heap/AllocationSpace.cpp
r96432 r98302 45 45 { 46 46 #if COLLECT_ON_EVERY_ALLOCATION 47 collectAllGarbage();47 m_heap->collectAllGarbage(); 48 48 ASSERT(m_heap->m_operationInProgress == NoOperation); 49 49 #endif -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r97642 r98302 601 601 } 602 602 #endif 603 603 604 if (CodeBlock* codeBlock = m_globalData->codeBlockBeingCompiled) { 605 GCPHASE(VisitActiveCodeBlock); 606 codeBlock->visitAggregate(visitor); 607 } 608 604 609 { 605 610 GCPHASE(VisitMachineRoots); -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
r96563 r98302 180 180 , propertyNames(new CommonIdentifiers(this)) 181 181 , emptyList(new MarkedArgumentBuffer) 182 , codeBlockBeingCompiled(0) 182 183 #if ENABLE(ASSEMBLER) 183 184 , executableAllocator(*this) -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.h
r96563 r98302 189 189 NumericStrings numericStrings; 190 190 DateInstanceCache dateInstanceCache; 191 191 CodeBlock* codeBlockBeingCompiled; 192 void startedCompiling(CodeBlock* codeBlock) 193 { 194 ASSERT(!codeBlockBeingCompiled); 195 codeBlockBeingCompiled = codeBlock; 196 } 197 198 void finishedCompiling(CodeBlock* codeBlock) 199 { 200 ASSERT_UNUSED(codeBlock, codeBlock == codeBlockBeingCompiled); 201 codeBlockBeingCompiled = 0; 202 } 203 192 204 #if ENABLE(ASSEMBLER) 193 205 ExecutableAllocator executableAllocator;
Note:
See TracChangeset
for help on using the changeset viewer.