Changeset 235419 in webkit for trunk/Source/JavaScriptCore/jit/JITExceptions.cpp
- Timestamp:
- Aug 27, 2018, 10:01:05 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITExceptions.cpp
r230865 r235419 31 31 #include "CodeBlock.h" 32 32 #include "Disassembler.h" 33 #include "EntryFrame.h" 33 34 #include "Interpreter.h" 34 35 #include "JSCInlines.h" … … 39 40 #include "Opcode.h" 40 41 #include "ShadowChicken.h" 41 #include "VM .h"42 #include "VMInlines.h" 42 43 43 44 namespace JSC { 44 45 45 void genericUnwind(VM* vm, ExecState* callFrame , UnwindStart unwindStart)46 void genericUnwind(VM* vm, ExecState* callFrame) 46 47 { 47 48 auto scope = DECLARE_CATCH_SCOPE(*vm); 49 CallFrame* topJSCallFrame = vm->topJSCallFrame(); 48 50 if (Options::breakOnThrow()) { 49 CodeBlock* codeBlock = callFrame->codeBlock(); 50 if (codeBlock) 51 dataLog("In call frame ", RawPointer(callFrame), " for code block ", *codeBlock, "\n"); 52 else 53 dataLog("In call frame ", RawPointer(callFrame), " with null CodeBlock\n"); 51 CodeBlock* codeBlock = topJSCallFrame->codeBlock(); 52 dataLog("In call frame ", RawPointer(topJSCallFrame), " for code block ", codeBlock, "\n"); 54 53 CRASH(); 55 54 } 56 55 57 ExecState* shadowChickenTopFrame = callFrame; 58 if (unwindStart == UnwindFromCallerFrame) { 59 EntryFrame* topEntryFrame = vm->topEntryFrame; 60 shadowChickenTopFrame = callFrame->callerFrame(topEntryFrame); 61 } 62 vm->shadowChicken().log(*vm, shadowChickenTopFrame, ShadowChicken::Packet::throwPacket()); 63 56 vm->shadowChicken().log(*vm, topJSCallFrame, ShadowChicken::Packet::throwPacket()); 57 64 58 Exception* exception = scope.exception(); 65 59 RELEASE_ASSERT(exception); 66 HandlerInfo* handler = vm->interpreter->unwind(*vm, callFrame, exception , unwindStart); // This may update callFrame.60 HandlerInfo* handler = vm->interpreter->unwind(*vm, callFrame, exception); // This may update callFrame. 67 61 68 62 void* catchRoutine; … … 84 78 } else 85 79 catchRoutine = LLInt::getCodePtr<ExceptionHandlerPtrTag>(handleUncaughtException).executableAddress(); 86 80 87 81 ASSERT(bitwise_cast<uintptr_t>(callFrame) < bitwise_cast<uintptr_t>(vm->topEntryFrame)); 88 82 … … 95 89 } 96 90 97 void genericUnwind(VM* vm, ExecState* callFrame)98 {99 genericUnwind(vm, callFrame, UnwindFromCurrentFrame);100 }101 102 91 } // namespace JSC
Note:
See TracChangeset
for help on using the changeset viewer.