mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Call property should handle ECMA_SIMPLE_VALUE_REGISTER_REF. (#1631)
Fixes #1624. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
parent
f780f2b8dc
commit
ca2b057356
@ -364,7 +364,13 @@ opfunc_call (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
{
|
||||
this_value = stack_top_p[-3];
|
||||
|
||||
if (vm_get_implicit_this_value (&this_value))
|
||||
if (this_value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_REGISTER_REF))
|
||||
{
|
||||
/* Lexical environment cannot be 'this' value. */
|
||||
stack_top_p[-2] = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
this_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
}
|
||||
else if (vm_get_implicit_this_value (&this_value))
|
||||
{
|
||||
ecma_free_value (stack_top_p[-3]);
|
||||
stack_top_p[-3] = this_value;
|
||||
|
||||
22
tests/jerry/fail/1/regression-test-issue-1624.js
Normal file
22
tests/jerry/fail/1/regression-test-issue-1624.js
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright JS Foundation and other contributors, http://js.foundation
|
||||
//
|
||||
// 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.
|
||||
|
||||
with ({}) {
|
||||
a = function (b)
|
||||
{
|
||||
var init;
|
||||
init();
|
||||
}
|
||||
}
|
||||
a();
|
||||
Loading…
x
Reference in New Issue
Block a user