Changeset 155471 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Sep 10, 2013, 2:00:42 PM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r155466 r155471 1 2013-09-10 Joseph Pecoraro <[email protected]> 2 3 Web Inspector: [JSC] Caught exception is treated as uncaught 4 https://bugs.webkit.org/show_bug.cgi?id=93607 5 6 Reviewed by Geoff Garen. 7 8 Check up the entire call stack to see if there is an exception handler. 9 10 * interpreter/Interpreter.cpp: 11 (JSC::GetExceptionHandlerFunctor::GetExceptionHandlerFunctor): 12 (JSC::GetExceptionHandlerFunctor::handler): 13 (JSC::GetExceptionHandlerFunctor::operator()): 14 1 15 2013-09-10 Filip Pizlo <[email protected]> 2 16 -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r155081 r155471 567 567 } 568 568 569 class GetExceptionHandlerFunctor { 570 public: 571 GetExceptionHandlerFunctor() 572 : m_handler(0) 573 { 574 } 575 576 HandlerInfo* handler() { return m_handler; } 577 578 StackVisitor::Status operator()(StackVisitor& visitor) 579 { 580 CodeBlock* codeBlock = visitor->codeBlock(); 581 if (!codeBlock) 582 return StackVisitor::Continue; 583 584 unsigned bytecodeOffset = visitor->bytecodeOffset(); 585 m_handler = codeBlock->handlerForBytecodeOffset(bytecodeOffset); 586 if (m_handler) 587 return StackVisitor::Done; 588 589 return StackVisitor::Continue; 590 } 591 592 private: 593 HandlerInfo* m_handler; 594 }; 595 569 596 class UnwindFunctor { 570 597 public: … … 628 655 // Afterwards, the values are put back to continue processing this error. 629 656 ClearExceptionScope scope(&callFrame->vm()); 630 631 657 DebuggerCallFrame debuggerCallFrame(callFrame, exceptionValue); 632 bool hasHandler = codeBlock->handlerForBytecodeOffset(bytecodeOffset); 658 659 bool hasHandler; 660 if (isTermination) 661 hasHandler = false; 662 else { 663 GetExceptionHandlerFunctor functor; 664 callFrame->iterate(functor); 665 hasHandler = !!functor.handler(); 666 } 667 633 668 debugger->exception(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->lineNumberForBytecodeOffset(bytecodeOffset), 0, hasHandler); 634 669 }
Note:
See TracChangeset
for help on using the changeset viewer.