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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.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/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 isolate, isolate->CaptureAndSetSimpleStackTrace(error_object, caller)); | 249 isolate, isolate->CaptureAndSetSimpleStackTrace(error_object, caller)); |
250 } | 250 } |
251 return isolate->heap()->undefined_value(); | 251 return isolate->heap()->undefined_value(); |
252 } | 252 } |
253 | 253 |
254 | 254 |
255 RUNTIME_FUNCTION(Runtime_RenderCallSite) { | 255 RUNTIME_FUNCTION(Runtime_RenderCallSite) { |
256 HandleScope scope(isolate); | 256 HandleScope scope(isolate); |
257 DCHECK(args.length() == 0); | 257 DCHECK(args.length() == 0); |
258 MessageLocation location; | 258 MessageLocation location; |
259 isolate->ComputeLocation(&location); | 259 if (!isolate->ComputeLocation(&location)) { |
260 if (location.start_pos() == -1) return isolate->heap()->empty_string(); | 260 return isolate->heap()->empty_string(); |
| 261 } |
261 | 262 |
262 Zone zone; | 263 Zone zone; |
263 base::SmartPointer<ParseInfo> info( | 264 base::SmartPointer<ParseInfo> info( |
264 location.function()->shared()->is_function() | 265 location.function()->shared()->is_function() |
265 ? new ParseInfo(&zone, location.function()) | 266 ? new ParseInfo(&zone, location.function()) |
266 : new ParseInfo(&zone, location.script())); | 267 : new ParseInfo(&zone, location.script())); |
267 | 268 |
268 if (!Parser::ParseStatic(info.get())) { | 269 if (!Parser::ParseStatic(info.get())) { |
269 isolate->clear_pending_exception(); | 270 isolate->clear_pending_exception(); |
270 return isolate->heap()->empty_string(); | 271 return isolate->heap()->empty_string(); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 } | 414 } |
414 | 415 |
415 | 416 |
416 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { | 417 RUNTIME_FUNCTION(Runtime_GetCodeStubExportsObject) { |
417 HandleScope shs(isolate); | 418 HandleScope shs(isolate); |
418 return isolate->heap()->code_stub_exports_object(); | 419 return isolate->heap()->code_stub_exports_object(); |
419 } | 420 } |
420 | 421 |
421 } // namespace internal | 422 } // namespace internal |
422 } // namespace v8 | 423 } // namespace v8 |
OLD | NEW |