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

Unified Diff: src/runtime/runtime-debug.cc

Issue 1369293003: Wrap JSFunction bindings in a helper object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 9f49e4d5d2a1add0faadb9994ebb295481014f7c..f47d47b8f39862bd6b7b95fca10f7415944999b2 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -156,29 +156,24 @@ MaybeHandle<JSArray> Runtime::GetInternalProperties(Isolate* isolate,
RUNTIME_ASSERT_HANDLIFIED(function->function_bindings()->IsFixedArray(),
JSArray);
- Handle<FixedArray> bindings(function->function_bindings());
+ Handle<BindingsArray> bindings(function->function_bindings());
Handle<FixedArray> result = factory->NewFixedArray(2 * 3);
Handle<String> target =
factory->NewStringFromAsciiChecked("[[TargetFunction]]");
result->set(0, *target);
- result->set(1, bindings->get(JSFunction::kBoundFunctionIndex));
+ result->set(1, bindings->bound_function());
Handle<String> bound_this =
factory->NewStringFromAsciiChecked("[[BoundThis]]");
result->set(2, *bound_this);
- result->set(3, bindings->get(JSFunction::kBoundThisIndex));
+ result->set(3, bindings->bound_this());
- Handle<FixedArray> arguments = factory->NewFixedArray(
- bindings->length() - JSFunction::kBoundArgumentsStartIndex);
- bindings->CopyTo(
- JSFunction::kBoundArgumentsStartIndex, *arguments, 0,
- bindings->length() - JSFunction::kBoundArgumentsStartIndex);
Handle<String> bound_args =
factory->NewStringFromAsciiChecked("[[BoundArgs]]");
result->set(4, *bound_args);
Handle<JSArray> arguments_array =
- factory->NewJSArrayWithElements(arguments);
+ BindingsArray::CreateBoundArguments(bindings);
result->set(5, *arguments_array);
return factory->NewJSArrayWithElements(result);
}
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698