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; |
} |