Skip to content

Commit c494893

Browse files
rerobikadbatyai
authored andcommitted
Add missing release value to ecma_op_object_get_property_names (#3524)
This patch fixes #3523. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
1 parent f3d49f6 commit c494893

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

jerry-core/ecma/operations/ecma-objects.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,6 +2159,7 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
21592159
}
21602160
else
21612161
{
2162+
ecma_deref_ecma_string (name_p);
21622163
continue;
21632164
}
21642165

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright JS Foundation and other contributors, http://js.foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
var obj = {
16+
sort: Array.prototype.sort,
17+
$: 0
18+
}
19+
assert(obj.sort() === obj);

0 commit comments

Comments
 (0)