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

Side by Side Diff: src/accessors.cc

Issue 2206203002: Move FormatStackTrace to ErrorUtils (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@port-no-sideeffect-to-string
Patch Set: Rebase Created 4 years, 4 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
« no previous file with comments | « no previous file | src/builtins/builtins-error.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/accessors.h" 5 #include "src/accessors.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 stack_trace->IsUndefined(isolate)) { 1164 stack_trace->IsUndefined(isolate)) {
1165 Handle<Object> result = isolate->factory()->undefined_value(); 1165 Handle<Object> result = isolate->factory()->undefined_value();
1166 info.GetReturnValue().Set(Utils::ToLocal(result)); 1166 info.GetReturnValue().Set(Utils::ToLocal(result));
1167 return; 1167 return;
1168 } 1168 }
1169 1169
1170 // Format it, clear the internal structured trace and reconfigure as a data 1170 // Format it, clear the internal structured trace and reconfigure as a data
1171 // property. 1171 // property.
1172 1172
1173 Handle<Object> formatted_stack_trace; 1173 Handle<Object> formatted_stack_trace;
1174 if (!FormatStackTrace(isolate, holder, stack_trace) 1174 if (!ErrorUtils::FormatStackTrace(isolate, holder, stack_trace)
1175 .ToHandle(&formatted_stack_trace)) { 1175 .ToHandle(&formatted_stack_trace)) {
1176 isolate->OptionalRescheduleException(false); 1176 isolate->OptionalRescheduleException(false);
1177 return; 1177 return;
1178 } 1178 }
1179 1179
1180 MaybeHandle<Object> result = ClearInternalStackTrace(isolate, holder); 1180 MaybeHandle<Object> result = ClearInternalStackTrace(isolate, holder);
1181 if (result.is_null()) { 1181 if (result.is_null()) {
1182 isolate->OptionalRescheduleException(false); 1182 isolate->OptionalRescheduleException(false);
1183 return; 1183 return;
1184 } 1184 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 Handle<AccessorInfo> Accessors::ErrorStackInfo(Isolate* isolate, 1227 Handle<AccessorInfo> Accessors::ErrorStackInfo(Isolate* isolate,
1228 PropertyAttributes attributes) { 1228 PropertyAttributes attributes) {
1229 Handle<AccessorInfo> info = 1229 Handle<AccessorInfo> info =
1230 MakeAccessor(isolate, isolate->factory()->stack_string(), 1230 MakeAccessor(isolate, isolate->factory()->stack_string(),
1231 &ErrorStackGetter, &ErrorStackSetter, attributes); 1231 &ErrorStackGetter, &ErrorStackSetter, attributes);
1232 return info; 1232 return info;
1233 } 1233 }
1234 1234
1235 } // namespace internal 1235 } // namespace internal
1236 } // namespace v8 1236 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698