Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 3681e070df6bf40018ea8c796b3cdf86600aa33c..c1477769bacdd569ff3d4903cc7ea4806d632509 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -648,14 +648,20 @@ RUNTIME_FUNCTION(Runtime_DefineAccessorPropertyUnchecked) { |
RUNTIME_FUNCTION(Runtime_DefineDataPropertyInLiteral) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 5); |
+ DCHECK(args.length() == 4); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
- CONVERT_PROPERTY_ATTRIBUTES_CHECKED(attrs, 3); |
- CONVERT_SMI_ARG_CHECKED(set_function_name, 4); |
+ CONVERT_SMI_ARG_CHECKED(flag, 3); |
+ |
+ DataPropertyInLiteralFlags flags = |
+ static_cast<DataPropertyInLiteralFlag>(flag); |
+ |
+ PropertyAttributes attrs = (flags & DataPropertyInLiteralFlag::kDontEnum) |
+ ? PropertyAttributes::DONT_ENUM |
+ : PropertyAttributes::NONE; |
- if (set_function_name) { |
+ if (flags & DataPropertyInLiteralFlag::kSetFunctionName) { |
DCHECK(value->IsJSFunction()); |
JSFunction::SetName(Handle<JSFunction>::cast(value), name, |
isolate->factory()->empty_string()); |