OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // element segments each containing a receiver, function, code and | 156 // element segments each containing a receiver, function, code and |
157 // native code offset. | 157 // native code offset. |
158 RUNTIME_FUNCTION(Runtime_CollectStackTrace) { | 158 RUNTIME_FUNCTION(Runtime_CollectStackTrace) { |
159 HandleScope scope(isolate); | 159 HandleScope scope(isolate); |
160 DCHECK(args.length() == 2); | 160 DCHECK(args.length() == 2); |
161 CONVERT_ARG_HANDLE_CHECKED(JSObject, error_object, 0); | 161 CONVERT_ARG_HANDLE_CHECKED(JSObject, error_object, 0); |
162 CONVERT_ARG_HANDLE_CHECKED(Object, caller, 1); | 162 CONVERT_ARG_HANDLE_CHECKED(Object, caller, 1); |
163 | 163 |
164 if (!isolate->bootstrapper()->IsActive()) { | 164 if (!isolate->bootstrapper()->IsActive()) { |
165 // Optionally capture a more detailed stack trace for the message. | 165 // Optionally capture a more detailed stack trace for the message. |
166 isolate->CaptureAndSetDetailedStackTrace(error_object); | 166 RETURN_FAILURE_ON_EXCEPTION( |
| 167 isolate, isolate->CaptureAndSetDetailedStackTrace(error_object)); |
167 // Capture a simple stack trace for the stack property. | 168 // Capture a simple stack trace for the stack property. |
168 isolate->CaptureAndSetSimpleStackTrace(error_object, caller); | 169 RETURN_FAILURE_ON_EXCEPTION( |
| 170 isolate, isolate->CaptureAndSetSimpleStackTrace(error_object, caller)); |
169 } | 171 } |
170 return isolate->heap()->undefined_value(); | 172 return isolate->heap()->undefined_value(); |
171 } | 173 } |
172 | 174 |
173 | 175 |
174 RUNTIME_FUNCTION(Runtime_RenderCallSite) { | 176 RUNTIME_FUNCTION(Runtime_RenderCallSite) { |
175 HandleScope scope(isolate); | 177 HandleScope scope(isolate); |
176 DCHECK(args.length() == 0); | 178 DCHECK(args.length() == 0); |
177 MessageLocation location; | 179 MessageLocation location; |
178 isolate->ComputeLocation(&location); | 180 isolate->ComputeLocation(&location); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 return args[0]; | 360 return args[0]; |
359 } | 361 } |
360 | 362 |
361 | 363 |
362 RUNTIME_FUNCTION(Runtime_HarmonyToString) { | 364 RUNTIME_FUNCTION(Runtime_HarmonyToString) { |
363 // TODO(caitp): Delete this runtime method when removing --harmony-tostring | 365 // TODO(caitp): Delete this runtime method when removing --harmony-tostring |
364 return isolate->heap()->ToBoolean(FLAG_harmony_tostring); | 366 return isolate->heap()->ToBoolean(FLAG_harmony_tostring); |
365 } | 367 } |
366 } | 368 } |
367 } // namespace v8::internal | 369 } // namespace v8::internal |
OLD | NEW |