Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 2ed2ae487e9848b84edbbbe516e139248d29f89a..1d45cb1d115987e9442b2e22a668ff0e064bb833 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1589,30 +1589,36 @@ RUNTIME_FUNCTION(RuntimeReference_ClassOf) { |
RUNTIME_FUNCTION(Runtime_DefineGetterPropertyUnchecked) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 3); |
+ DCHECK(args.length() == 4); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, getter, 2); |
+ CONVERT_SMI_ARG_CHECKED(unchecked, 3); |
+ RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); |
+ PropertyAttributes attrs = static_cast<PropertyAttributes>(unchecked); |
RETURN_FAILURE_ON_EXCEPTION( |
isolate, |
JSObject::DefineAccessor(object, name, getter, |
- isolate->factory()->null_value(), NONE)); |
+ isolate->factory()->null_value(), attrs)); |
return isolate->heap()->undefined_value(); |
} |
RUNTIME_FUNCTION(Runtime_DefineSetterPropertyUnchecked) { |
HandleScope scope(isolate); |
- DCHECK(args.length() == 3); |
+ DCHECK(args.length() == 4); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, setter, 2); |
+ CONVERT_SMI_ARG_CHECKED(unchecked, 3); |
+ RUNTIME_ASSERT((unchecked & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); |
+ PropertyAttributes attrs = static_cast<PropertyAttributes>(unchecked); |
RETURN_FAILURE_ON_EXCEPTION( |
isolate, |
JSObject::DefineAccessor(object, name, isolate->factory()->null_value(), |
- setter, NONE)); |
+ setter, attrs)); |
return isolate->heap()->undefined_value(); |
} |
} |