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

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

Issue 2806303002: [debug,api] Do not use embedder field for debug context id. (Closed)
Patch Set: restore enum Created 3 years, 8 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/inspector/inspected-context.cc ('k') | src/wasm/wasm-module.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 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/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/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 CONVERT_ARG_CHECKED(JSFunction, fun, 0); 104 CONVERT_ARG_CHECKED(JSFunction, fun, 0);
105 int pos = fun->shared()->start_position(); 105 int pos = fun->shared()->start_position();
106 return Smi::FromInt(pos); 106 return Smi::FromInt(pos);
107 } 107 }
108 108
109 RUNTIME_FUNCTION(Runtime_FunctionGetContextData) { 109 RUNTIME_FUNCTION(Runtime_FunctionGetContextData) {
110 SealHandleScope shs(isolate); 110 SealHandleScope shs(isolate);
111 DCHECK_EQ(1, args.length()); 111 DCHECK_EQ(1, args.length());
112 112
113 CONVERT_ARG_CHECKED(JSFunction, fun, 0); 113 CONVERT_ARG_CHECKED(JSFunction, fun, 0);
114 FixedArray* array = fun->native_context()->embedder_data(); 114 return fun->native_context()->debug_context_id();
115 return array->get(v8::Context::kDebugIdIndex);
116 } 115 }
117 116
118 RUNTIME_FUNCTION(Runtime_FunctionSetInstanceClassName) { 117 RUNTIME_FUNCTION(Runtime_FunctionSetInstanceClassName) {
119 SealHandleScope shs(isolate); 118 SealHandleScope shs(isolate);
120 DCHECK_EQ(2, args.length()); 119 DCHECK_EQ(2, args.length());
121 120
122 CONVERT_ARG_CHECKED(JSFunction, fun, 0); 121 CONVERT_ARG_CHECKED(JSFunction, fun, 0);
123 CONVERT_ARG_CHECKED(String, name, 1); 122 CONVERT_ARG_CHECKED(String, name, 1);
124 fun->shared()->set_instance_class_name(name); 123 fun->shared()->set_instance_class_name(name);
125 return isolate->heap()->undefined_value(); 124 return isolate->heap()->undefined_value();
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 DCHECK_EQ(1, args.length()); 305 DCHECK_EQ(1, args.length());
307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); 306 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0);
308 return function->IsJSBoundFunction() 307 return function->IsJSBoundFunction()
309 ? *JSBoundFunction::ToString( 308 ? *JSBoundFunction::ToString(
310 Handle<JSBoundFunction>::cast(function)) 309 Handle<JSBoundFunction>::cast(function))
311 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); 310 : *JSFunction::ToString(Handle<JSFunction>::cast(function));
312 } 311 }
313 312
314 } // namespace internal 313 } // namespace internal
315 } // namespace v8 314 } // namespace v8
OLDNEW
« no previous file with comments | « src/inspector/inspected-context.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698