Ignore:
Timestamp:
Jul 2, 2008, 11:48:01 PM (17 years ago)
Author:
[email protected]
Message:

2008-07-02 Geoffrey Garen <[email protected]>

Reviewed by Cameron Zwarich.


Fixed https://bugs.webkit.org/show_bug.cgi?id=19862
REGRESSION (r34907): Gmail crashes in JavaScriptCore code while editing drafts


I was never able to reproduce this issue, but Cameron could, and he says
that this patch fixes it.


The crash seems tied to a timer or event handler callback. In such a case,
the sole reference to the global object may be in the current call frame,
so we can't depend on the global object to mark the call frame area in
the register file.


The new GC marking rule is: the global object is not responsible for
marking the whole register file -- it's just responsible for the globals
section it's tied to. The heap is responsible for marking the call frame area.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r34969 r34974  
    9393static void freeHeap(CollectorHeap*);
    9494
    95 Heap::Heap(bool isShared)
     95Heap::Heap(Machine* machine, bool isShared)
    9696    : m_markListSet(0)
    9797    , m_isShared(isShared)
     98    , m_machine(machine)
    9899{
    99100    memset(&primaryHeap, 0, sizeof(CollectorHeap));
     
    945946    if (m_markListSet && m_markListSet->size())
    946947        ArgList::markLists(*m_markListSet);
     948    m_machine->registerFile().markCallFrames(this);
    947949
    948950    JAVASCRIPTCORE_GC_MARKED();
Note: See TracChangeset for help on using the changeset viewer.