Changeset 275924 in webkit
- Timestamp:
- Apr 13, 2021, 7:19:29 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r275920 r275924 1 2021-04-13 Mark Lam <mark.lam@apple.com> 2 3 The watchdog should not fire when it's not active. 4 https://bugs.webkit.org/show_bug.cgi?id=224494 5 rdar://76581259 6 7 Reviewed by Saam Barati and Yusuke Suzuki. 8 9 The watchdog is only active when we have entered the VM. If we haven't entered 10 the VM, we postpone starting the watchdog. For example, see Watchdog::enteredVM() 11 and Watchdog::exitedVM(). 12 13 The underlying timer may still fire the NeedWatchdogCheck event after 14 Watchdog::stopTimer() is called. So, we need to just ignore the event if the 15 watchdog isn't active. 16 17 * runtime/VMTraps.cpp: 18 (JSC::VMTraps::handleTraps): 19 * runtime/Watchdog.h: 20 (JSC::Watchdog::isActive const): 21 1 22 2021-04-13 Ross Kirsling <ross.kirsling@sony.com> 2 23 -
trunk/Source/JavaScriptCore/runtime/VMTraps.cpp
r275797 r275924 381 381 case NeedWatchdogCheck: 382 382 ASSERT(vm.watchdog()); 383 ASSERT(vm.entryScope->globalObject()); 384 if (LIKELY(!vm.watchdog()->shouldTerminate(vm.entryScope->globalObject()))) 383 if (LIKELY(!vm.watchdog()->isActive() || !vm.watchdog()->shouldTerminate(vm.entryScope->globalObject()))) 385 384 continue; 386 385 vm.setTerminationInProgress(true); -
trunk/Source/JavaScriptCore/runtime/Watchdog.h
r261464 r275924 1 1 /* 2 * Copyright (C) 2013-20 17Apple Inc. All rights reserved.2 * Copyright (C) 2013-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 51 51 bool shouldTerminate(JSGlobalObject*); 52 52 53 bool isActive() const { return m_hasEnteredVM; } 54 53 55 bool hasTimeLimit(); 54 56 void enteredVM();
Note:
See TracChangeset
for help on using the changeset viewer.