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

Unified Diff: src/api.cc

Issue 1507273002: Make Error.prototype.toString spec compliant; and fix various side-effect-free error printing metho… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « no previous file | src/ast/scopes.cc » ('j') | src/messages.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 38d641dd99bfac3280f4b6185d74d44e2d9a042c..ddd87d5c41a885de27e5a2b60339d53c3856bab5 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2898,12 +2898,16 @@ Local<String> Value::ToString(Isolate* isolate) const {
MaybeLocal<String> Value::ToDetailString(Local<Context> context) const {
- auto obj = Utils::OpenHandle(this);
+ i::Handle<i::Object> obj = Utils::OpenHandle(this);
if (obj->IsString()) return ToApiHandle<String>(obj);
PREPARE_FOR_EXECUTION(context, "ToDetailString", String);
Local<String> result;
- has_pending_exception =
- !ToLocal<String>(i::Execution::ToDetailString(isolate, obj), &result);
+ i::Handle<i::Object> args[] = {obj};
+ has_pending_exception = !ToLocal<String>(
+ i::Execution::TryCall(isolate, isolate->no_side_effects_to_string_fun(),
+ isolate->factory()->undefined_value(),
+ arraysize(args), args),
+ &result);
RETURN_ON_FAILED_EXECUTION(String);
RETURN_ESCAPED(result);
}
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | src/messages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698