Fix jsp_early_error_check_for_duplication_of_prop_names.

Related issue: #689

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan 2015-10-28 21:30:48 +03:00
parent f2c54fbe39
commit 04ca231fa4
2 changed files with 21 additions and 0 deletions

View File

@ -125,6 +125,7 @@ jsp_early_error_check_for_duplication_of_prop_names (bool is_strict, locus loc _
{ {
if (STACK_SIZE (props) - STACK_TOP (size_t_stack) < 2) if (STACK_SIZE (props) - STACK_TOP (size_t_stack) < 2)
{ {
STACK_DROP (props, (size_t) (STACK_SIZE (props) - STACK_TOP (size_t_stack)));
STACK_DROP (size_t_stack, 1); STACK_DROP (size_t_stack, 1);
return; return;
} }

View File

@ -0,0 +1,20 @@
// Copyright 2015 Samsung Electronics Co., Ltd.
// Copyright 2015 University of Szeged.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
'use strict';
function f (g) {
new g ({prop_name: 'value'});
}