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

Unified Diff: src/isolate.cc

Issue 1077153003: Throw when attaching a stack trace to an object fails. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 9c4bc52288c84c02753d8e9d529a109eb916badc..34b96730103894efcf4e026ae5e682ea0d9df764 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -414,24 +414,31 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSObject> error_object,
}
-void Isolate::CaptureAndSetDetailedStackTrace(Handle<JSObject> error_object) {
+MaybeHandle<JSObject> Isolate::CaptureAndSetDetailedStackTrace(
+ Handle<JSObject> error_object) {
if (capture_stack_trace_for_uncaught_exceptions_) {
// Capture stack trace for a detailed exception message.
Handle<Name> key = factory()->detailed_stack_trace_symbol();
Handle<JSArray> stack_trace = CaptureCurrentStackTrace(
stack_trace_for_uncaught_exceptions_frame_limit_,
stack_trace_for_uncaught_exceptions_options_);
- JSObject::SetProperty(error_object, key, stack_trace, STRICT).Assert();
+ RETURN_ON_EXCEPTION(
+ this, JSObject::SetProperty(error_object, key, stack_trace, STRICT),
+ JSObject);
}
+ return error_object;
}
-void Isolate::CaptureAndSetSimpleStackTrace(Handle<JSObject> error_object,
- Handle<Object> caller) {
+MaybeHandle<JSObject> Isolate::CaptureAndSetSimpleStackTrace(
+ Handle<JSObject> error_object, Handle<Object> caller) {
// Capture stack trace for simple stack trace string formatting.
Handle<Name> key = factory()->stack_trace_symbol();
Handle<Object> stack_trace = CaptureSimpleStackTrace(error_object, caller);
- JSObject::SetProperty(error_object, key, stack_trace, STRICT).Assert();
+ RETURN_ON_EXCEPTION(
+ this, JSObject::SetProperty(error_object, key, stack_trace, STRICT),
+ JSObject);
+ return error_object;
}
« no previous file with comments | « src/isolate.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698