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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 919653002: [V8] Use Function.name in Error.stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/stack-traces.js » ('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 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 2606
2607 RUNTIME_FUNCTION(Runtime_FunctionGetInferredName) { 2607 RUNTIME_FUNCTION(Runtime_FunctionGetInferredName) {
2608 SealHandleScope shs(isolate); 2608 SealHandleScope shs(isolate);
2609 DCHECK(args.length() == 1); 2609 DCHECK(args.length() == 1);
2610 2610
2611 CONVERT_ARG_CHECKED(JSFunction, f, 0); 2611 CONVERT_ARG_CHECKED(JSFunction, f, 0);
2612 return f->shared()->inferred_name(); 2612 return f->shared()->inferred_name();
2613 } 2613 }
2614 2614
2615 2615
2616 RUNTIME_FUNCTION(Runtime_FunctionGetDebugName) {
2617 HandleScope scope(isolate);
2618 DCHECK(args.length() == 1);
2619
2620 CONVERT_ARG_HANDLE_CHECKED(JSFunction, f, 0);
2621 return *JSFunction::GetDebugName(f);
2622 }
2623
2624
2616 // A testing entry. Returns statement position which is the closest to 2625 // A testing entry. Returns statement position which is the closest to
2617 // source_position. 2626 // source_position.
2618 RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) { 2627 RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) {
2619 HandleScope scope(isolate); 2628 HandleScope scope(isolate);
2620 CHECK(isolate->debug()->live_edit_enabled()); 2629 CHECK(isolate->debug()->live_edit_enabled());
2621 DCHECK(args.length() == 2); 2630 DCHECK(args.length() == 2);
2622 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 2631 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
2623 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); 2632 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
2624 2633
2625 Handle<Code> code(function->code(), isolate); 2634 Handle<Code> code(function->code(), isolate);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2811 return Smi::FromInt(isolate->debug()->is_active()); 2820 return Smi::FromInt(isolate->debug()->is_active());
2812 } 2821 }
2813 2822
2814 2823
2815 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { 2824 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) {
2816 UNIMPLEMENTED(); 2825 UNIMPLEMENTED();
2817 return NULL; 2826 return NULL;
2818 } 2827 }
2819 } 2828 }
2820 } // namespace v8::internal 2829 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/stack-traces.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698