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

Side by Side Diff: src/debug.cc

Issue 6685087: Make exception thrown via v8 public API propagate to v8::TryCatch as JS thrown exceptions do. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Next round Created 9 years, 9 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
« src/api.cc ('K') | « src/api.cc ('k') | src/handles.h » ('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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 FACTORY->NewFunctionFromSharedFunctionInfo(function_info, context); 801 FACTORY->NewFunctionFromSharedFunctionInfo(function_info, context);
802 Handle<Object> result = 802 Handle<Object> result =
803 Execution::TryCall(function, Handle<Object>(context->global()), 803 Execution::TryCall(function, Handle<Object>(context->global()),
804 0, NULL, &caught_exception); 804 0, NULL, &caught_exception);
805 805
806 // Check for caught exceptions. 806 // Check for caught exceptions.
807 if (caught_exception) { 807 if (caught_exception) {
808 Handle<Object> message = MessageHandler::MakeMessageObject( 808 Handle<Object> message = MessageHandler::MakeMessageObject(
809 "error_loading_debugger", NULL, Vector<Handle<Object> >::empty(), 809 "error_loading_debugger", NULL, Vector<Handle<Object> >::empty(),
810 Handle<String>(), Handle<JSArray>()); 810 Handle<String>(), Handle<JSArray>());
811 MessageHandler::ReportMessage(NULL, message); 811 MessageHandler::ReportMessage(Isolate::Current(), NULL, message);
812 return false; 812 return false;
813 } 813 }
814 814
815 // Mark this script as native and return successfully. 815 // Mark this script as native and return successfully.
816 Handle<Script> script(Script::cast(function->shared()->script())); 816 Handle<Script> script(Script::cast(function->shared()->script()));
817 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); 817 script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
818 return true; 818 return true;
819 } 819 }
820 820
821 821
(...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after
3162 { 3162 {
3163 Locker locker; 3163 Locker locker;
3164 Isolate::Current()->debugger()->CallMessageDispatchHandler(); 3164 Isolate::Current()->debugger()->CallMessageDispatchHandler();
3165 } 3165 }
3166 } 3166 }
3167 } 3167 }
3168 3168
3169 #endif // ENABLE_DEBUGGER_SUPPORT 3169 #endif // ENABLE_DEBUGGER_SUPPORT
3170 3170
3171 } } // namespace v8::internal 3171 } } // namespace v8::internal
OLDNEW
« src/api.cc ('K') | « src/api.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698