Changeset 290869 in webkit for trunk/Source/JavaScriptCore/interpreter/FrameTracers.h
- Timestamp:
- Mar 5, 2022, 10:55:21 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/FrameTracers.h
r254087 r290869 1 1 /* 2 * Copyright (C) 2016-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2016-2022 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 36 36 class SuspendExceptionScope { 37 37 public: 38 SuspendExceptionScope(VM *vm)38 SuspendExceptionScope(VM& vm) 39 39 : m_vm(vm) 40 , m_exceptionWasSet(vm.m_exception) 41 , m_savedException(vm.m_exception, nullptr) 42 , m_savedLastException(vm.m_lastException, nullptr) 40 43 { 41 auto scope = DECLARE_CATCH_SCOPE(*vm); 42 oldException = scope.exception(); 43 scope.clearException(); 44 if (m_exceptionWasSet) 45 m_vm.traps().clearTrapBit(VMTraps::NeedExceptionHandling); 44 46 } 45 47 ~SuspendExceptionScope() 46 48 { 47 m_vm->restorePreviousException(oldException); 49 if (m_exceptionWasSet) 50 m_vm.traps().setTrapBit(VMTraps::NeedExceptionHandling); 48 51 } 49 52 private: 50 Exception* oldException; 51 VM* m_vm; 53 VM& m_vm; 54 bool m_exceptionWasSet; 55 SetForScope<Exception*> m_savedException; 56 SetForScope<Exception*> m_savedLastException; 52 57 }; 53 58
Note:
See TracChangeset
for help on using the changeset viewer.