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

Unified Diff: src/isolate.cc

Issue 1844223004: Display a meaningfull error message when trying to capture a stack trace to a proxy. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 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 3336bd0c401997201820c7e5af0e9913bf1b839f..4caedf6cb092637ec640db33d6de8c4a5d2b6b91 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -355,7 +355,7 @@ static Handle<FixedArray> MaybeGrow(Isolate* isolate,
return elements;
}
-Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSObject> error_object,
+Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
Handle<Object> caller) {
// Get stack trace limit.
Handle<JSObject> error = error_function();
@@ -456,8 +456,8 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSObject> error_object,
return result;
}
-MaybeHandle<JSObject> Isolate::CaptureAndSetDetailedStackTrace(
- Handle<JSObject> error_object) {
+MaybeHandle<JSReceiver> Isolate::CaptureAndSetDetailedStackTrace(
+ Handle<JSReceiver> 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();
@@ -465,21 +465,20 @@ MaybeHandle<JSObject> Isolate::CaptureAndSetDetailedStackTrace(
stack_trace_for_uncaught_exceptions_frame_limit_,
stack_trace_for_uncaught_exceptions_options_);
RETURN_ON_EXCEPTION(
- this, JSObject::SetProperty(error_object, key, stack_trace, STRICT),
- JSObject);
+ this, JSReceiver::SetProperty(error_object, key, stack_trace, STRICT),
+ JSReceiver);
}
return error_object;
}
-
-MaybeHandle<JSObject> Isolate::CaptureAndSetSimpleStackTrace(
- Handle<JSObject> error_object, Handle<Object> caller) {
+MaybeHandle<JSReceiver> Isolate::CaptureAndSetSimpleStackTrace(
+ Handle<JSReceiver> 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);
RETURN_ON_EXCEPTION(
- this, JSObject::SetProperty(error_object, key, stack_trace, STRICT),
- JSObject);
+ this, JSReceiver::SetProperty(error_object, key, stack_trace, STRICT),
+ JSReceiver);
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