Ignore:
Timestamp:
Oct 24, 2011, 5:21:29 PM (14 years ago)
Author:
[email protected]
Message:

Crash in void JSC::validateCell<JSC::RegExp*>(JSC::RegExp*)
https://bugs.webkit.org/show_bug.cgi?id=70689

Reviewed by Filip Pizlo.

While performing codegen we need to make the GlobalData explicitly
aware of the codeblock being compiled, as compilation may trigger GC
and CodeBlock holds GC values, but has not yet been assigned to its
owner executable.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::~BytecodeGenerator):

  • bytecompiler/BytecodeGenerator.h:
  • heap/AllocationSpace.cpp:

(JSC::AllocationSpace::allocateSlowCase):

  • heap/Heap.cpp:

(JSC::Heap::markRoots):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::startedCompiling):
(JSC::JSGlobalData::finishedCompiling):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSGlobalData.h

    r96563 r98302  
    189189        NumericStrings numericStrings;
    190190        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
    192204#if ENABLE(ASSEMBLER)
    193205        ExecutableAllocator executableAllocator;
Note: See TracChangeset for help on using the changeset viewer.