Changeset 53860 in webkit for trunk/JavaScriptCore/API


Ignore:
Timestamp:
Jan 26, 2010, 11:22:51 AM (15 years ago)
Author:
[email protected]
Message:

2010-01-26 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

Using JavaScriptCore API with a webkit vended context can result in slow script dialog
https://bugs.webkit.org/show_bug.cgi?id=34172

Make the APIShim correctly increment and decrement the timeout
entry counter.

  • API/APIShims.h: (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock): (JSC::APICallbackShim::APICallbackShim): (JSC::APICallbackShim::~APICallbackShim):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/APIShims.h

    r52856 r53860  
    3535protected:
    3636    APIEntryShimWithoutLock(JSGlobalData* globalData, bool registerThread)
    37         : m_entryIdentifierTable(setCurrentIdentifierTable(globalData->identifierTable))
     37        : m_globalData(globalData)
     38        , m_entryIdentifierTable(setCurrentIdentifierTable(globalData->identifierTable))
    3839    {
    3940        if (registerThread)
    4041            globalData->heap.registerThread();
     42        m_globalData->timeoutChecker.start();
    4143    }
    4244
    4345    ~APIEntryShimWithoutLock()
    4446    {
     47        m_globalData->timeoutChecker.stop();
    4548        setCurrentIdentifierTable(m_entryIdentifierTable);
    4649    }
    4750
    4851private:
     52    JSGlobalData* m_globalData;
    4953    IdentifierTable* m_entryIdentifierTable;
    5054};
     
    7781    {
    7882        resetCurrentIdentifierTable();
     83        m_globalData->timeoutChecker.start();
    7984    }
    8085
    8186    ~APICallbackShim()
    8287    {
     88        m_globalData->timeoutChecker.stop();
    8389        setCurrentIdentifierTable(m_globalData->identifierTable);
    8490    }
Note: See TracChangeset for help on using the changeset viewer.