Changeset 53860 in webkit


Ignore:
Timestamp:
Jan 26, 2010 11:22:51 AM (14 years ago)
Author:
oliver@apple.com
Message:

2010-01-26 Oliver Hunt <oliver@apple.com>

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):
Location:
trunk/JavaScriptCore
Files:
2 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    }
  • trunk/JavaScriptCore/ChangeLog

    r53854 r53860  
     12010-01-26  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Using JavaScriptCore API with a webkit vended context can result in slow script dialog
     6        https://bugs.webkit.org/show_bug.cgi?id=34172
     7
     8        Make the APIShim correctly increment and decrement the timeout
     9        entry counter.
     10
     11        * API/APIShims.h:
     12        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
     13        (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
     14        (JSC::APICallbackShim::APICallbackShim):
     15        (JSC::APICallbackShim::~APICallbackShim):
     16
    1172010-01-26  Simon Hausmann  <simon.hausmann@nokia.com>
    218
Note: See TracChangeset for help on using the changeset viewer.