Changeset 189172 in webkit


Ignore:
Timestamp:
Aug 31, 2015 10:04:14 AM (9 years ago)
Author:
mark.lam@apple.com
Message:

Watchdog timer callback should release the lock before deref'ing the watchdog.
https://bugs.webkit.org/show_bug.cgi?id=148635

Reviewed by Filip Pizlo.

The deref'ing of the watchdog may free it. The lock may not be available to be unlocked
after the deref.

  • runtime/Watchdog.cpp:

(JSC::Watchdog::Watchdog):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r189162 r189172  
     12015-08-31  Mark Lam  <mark.lam@apple.com>
     2
     3        Watchdog timer callback should release the lock before deref'ing the watchdog.
     4        https://bugs.webkit.org/show_bug.cgi?id=148635
     5
     6        Reviewed by Filip Pizlo.
     7
     8        The deref'ing of the watchdog may free it.  The lock may not be available to be unlocked
     9        after the deref.
     10
     11        * runtime/Watchdog.cpp:
     12        (JSC::Watchdog::Watchdog):
     13
    1142015-08-30  Yusuke Suzuki  <utatane.tea@gmail.com>
    215
  • trunk/Source/JavaScriptCore/runtime/Watchdog.cpp

    r189009 r189172  
    5252{
    5353    m_timerHandler = [this] {
    54         LockHolder locker(m_lock);
    55         this->m_timerDidFire = true;
     54        {
     55            LockHolder locker(m_lock);
     56            this->m_timerDidFire = true;
     57        }
    5658        this->deref();
    5759    };
Note: See TracChangeset for help on using the changeset viewer.