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

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

Issue 1442643009: Rename original constructor to new target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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/runtime/runtime-function.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 707b05e57b756ccffc0b9ba422b0f2c0b1fde14a..9e5a1cb264a1514364a8788712d50b2af810c2c7 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -984,7 +984,7 @@ RUNTIME_FUNCTION(Runtime_AllocateHeapNumber) {
static Object* Runtime_NewObjectHelper(Isolate* isolate,
Handle<Object> constructor,
- Handle<Object> original_constructor,
+ Handle<Object> new_target,
Handle<AllocationSite> site) {
// If the constructor isn't a proper function we throw a type error.
if (!constructor->IsJSFunction()) {
@@ -994,9 +994,8 @@ static Object* Runtime_NewObjectHelper(Isolate* isolate,
Handle<JSFunction> function = Handle<JSFunction>::cast(constructor);
- CHECK(original_constructor->IsJSFunction());
- Handle<JSFunction> original_function =
- Handle<JSFunction>::cast(original_constructor);
+ CHECK(new_target->IsJSFunction());
+ Handle<JSFunction> original_function = Handle<JSFunction>::cast(new_target);
// Check that function is a constructor.
@@ -1038,8 +1037,8 @@ RUNTIME_FUNCTION(Runtime_NewObject) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(Object, constructor, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, original_constructor, 1);
- return Runtime_NewObjectHelper(isolate, constructor, original_constructor,
+ CONVERT_ARG_HANDLE_CHECKED(Object, new_target, 1);
+ return Runtime_NewObjectHelper(isolate, constructor, new_target,
Handle<AllocationSite>::null());
}
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698