Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/top.cc

Issue 6816021: Report stack overflow exceptions to V8 message listeners (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 try_catch_handler()->exception_ = thread_local_top()->pending_exception_; 821 try_catch_handler()->exception_ = thread_local_top()->pending_exception_;
822 if (!thread_local_top()->pending_message_obj_->IsTheHole()) { 822 if (!thread_local_top()->pending_message_obj_->IsTheHole()) {
823 try_catch_handler()->message_ = 823 try_catch_handler()->message_ =
824 thread_local_top()->pending_message_obj_; 824 thread_local_top()->pending_message_obj_;
825 } 825 }
826 } 826 }
827 if (thread_local_top()->has_pending_message_) { 827 if (thread_local_top()->has_pending_message_) {
828 thread_local_top()->has_pending_message_ = false; 828 thread_local_top()->has_pending_message_ = false;
829 if (thread_local_top()->pending_message_ != NULL) { 829 if (thread_local_top()->pending_message_ != NULL) {
830 MessageHandler::ReportMessage(thread_local_top()->pending_message_); 830 MessageHandler::ReportMessage(thread_local_top()->pending_message_);
831 } else if (!thread_local_top()->pending_message_obj_->IsTheHole()) { 831 }
832 if (!thread_local_top()->pending_message_obj_->IsTheHole()) {
antonm 2011/04/07 18:53:32 sorry for popping up, but maybe stack overflow exc
yurys 2011/04/08 07:51:42 MessageHandler::ReportMessage(const char*) just pr
832 Handle<Object> message_obj(thread_local_top()->pending_message_obj_); 833 Handle<Object> message_obj(thread_local_top()->pending_message_obj_);
833 if (thread_local_top()->pending_message_script_ != NULL) { 834 if (thread_local_top()->pending_message_script_ != NULL) {
834 Handle<Script> script(thread_local_top()->pending_message_script_); 835 Handle<Script> script(thread_local_top()->pending_message_script_);
835 int start_pos = thread_local_top()->pending_message_start_pos_; 836 int start_pos = thread_local_top()->pending_message_start_pos_;
836 int end_pos = thread_local_top()->pending_message_end_pos_; 837 int end_pos = thread_local_top()->pending_message_end_pos_;
837 MessageLocation location(script, start_pos, end_pos); 838 MessageLocation location(script, start_pos, end_pos);
838 MessageHandler::ReportMessage(&location, message_obj); 839 MessageHandler::ReportMessage(&location, message_obj);
839 } else { 840 } else {
840 MessageHandler::ReportMessage(NULL, message_obj); 841 MessageHandler::ReportMessage(NULL, message_obj);
841 } 842 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 thread_local_top()->simulator_ = Simulator::current(this); 975 thread_local_top()->simulator_ = Simulator::current(this);
975 #endif 976 #endif
976 #endif 977 #endif
977 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { 978 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) {
978 RuntimeProfiler::IsolateEnteredJS(this); 979 RuntimeProfiler::IsolateEnteredJS(this);
979 } 980 }
980 return from + sizeof(ThreadLocalTop); 981 return from + sizeof(ThreadLocalTop);
981 } 982 }
982 983
983 } } // namespace v8::internal 984 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698