Changeset 34974 in webkit for trunk/JavaScriptCore/VM


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/VM/RegisterFile.h

    r34966 r34974  
    165165
    166166        Register* lastGlobal() { return m_base - m_numGlobals; }
    167 
    168         void mark(Heap* heap)
    169         {
    170             heap->markConservatively(lastGlobal(), m_base + m_size);
    171         }
     167       
     168        void markGlobals(Heap* heap) { heap->markConservatively(lastGlobal(), m_base); }
     169        void markCallFrames(Heap* heap) { heap->markConservatively(m_base, m_base + m_size); }
    172170
    173171    private:
Note: See TracChangeset for help on using the changeset viewer.