| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 8e695d67f12f88beb8e33fa7eee4a822a4e6e38c..3c5d1a73da6e2bcedd0225d9405dddff3d21eef6 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -4745,11 +4745,13 @@ static int LocalPrototypeChainLength(JSObject* obj) {
|
| // args[0]: object
|
| RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLocalPropertyNames) {
|
| HandleScope scope(isolate);
|
| - ASSERT(args.length() == 1);
|
| + ASSERT(args.length() == 2);
|
| if (!args[0]->IsJSObject()) {
|
| return isolate->heap()->undefined_value();
|
| }
|
| CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
|
| + CONVERT_BOOLEAN_ARG_CHECKED(include_symbols, 1);
|
| + PropertyAttributes filter = include_symbols ? NONE : SYMBOLIC;
|
|
|
| // Skip the global proxy as it has no properties and always delegates to the
|
| // real global object.
|
| @@ -4782,7 +4784,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLocalPropertyNames) {
|
| return *isolate->factory()->NewJSArray(0);
|
| }
|
| int n;
|
| - n = jsproto->NumberOfLocalProperties();
|
| + n = jsproto->NumberOfLocalProperties(filter);
|
| local_property_count[i] = n;
|
| total_property_count += n;
|
| if (i < length - 1) {
|
| @@ -4799,7 +4801,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLocalPropertyNames) {
|
| int proto_with_hidden_properties = 0;
|
| int next_copy_index = 0;
|
| for (int i = 0; i < length; i++) {
|
| - jsproto->GetLocalPropertyNames(*names, next_copy_index);
|
| + jsproto->GetLocalPropertyNames(*names, next_copy_index, filter);
|
| next_copy_index += local_property_count[i];
|
| if (jsproto->HasHiddenProperties()) {
|
| proto_with_hidden_properties++;
|
| @@ -4809,7 +4811,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLocalPropertyNames) {
|
| }
|
| }
|
|
|
| - // Filter out name of hidden propeties object.
|
| + // Filter out name of hidden properties object.
|
| if (proto_with_hidden_properties > 0) {
|
| Handle<FixedArray> old_names = names;
|
| names = isolate->factory()->NewFixedArray(
|
|
|