Ignore:
Timestamp:
Jul 1, 2008, 12:01:51 AM (17 years ago)
Author:
[email protected]
Message:

2008-06-30 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.


Fixed a global object leak caused by the switch to one register file.


Don't unconditionally mark the register file, since that logically
makes all global variables GC roots, even when their global object is
no longer reachable.


Instead, make the global object associated with the register file
responsible for marking the register file.

File:
1 edited

Legend:

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

    r34906 r34907  
    347347        (*it)->mark();
    348348
     349    RegisterFile& registerFile = globalData()->machine->registerFile();
     350    if (registerFile.globalObject() == this)
     351        registerFile.mark(globalData()->heap);
     352
    349353    markIfNeeded(d()->globalExec->exception());
    350354
Note: See TracChangeset for help on using the changeset viewer.