diff --git a/jerry-core/ecma/base/ecma-helpers.cpp b/jerry-core/ecma/base/ecma-helpers.cpp index f6fa11a49d..d1c55f9e03 100644 --- a/jerry-core/ecma/base/ecma-helpers.cpp +++ b/jerry-core/ecma/base/ecma-helpers.cpp @@ -801,8 +801,13 @@ ecma_free_internal_property (ecma_property_t *property_p) /**< the property */ case ECMA_INTERNAL_PROPERTY_NON_INSTANTIATED_BUILT_IN_MASK_0_31: /* an integer (bit-mask) */ case ECMA_INTERNAL_PROPERTY_NON_INSTANTIATED_BUILT_IN_MASK_32_63: /* an integer (bit-mask) */ case ECMA_INTERNAL_PROPERTY_BOUND_FUNCTION_TARGET_FUNCTION: + { + break; + } + case ECMA_INTERNAL_PROPERTY_BOUND_FUNCTION_BOUND_THIS: { + ecma_free_value (property_value, false); break; } diff --git a/tests/jerry/function-prototype-bind.js b/tests/jerry/function-prototype-bind.js index 60f5d1e98a..7e619ab5c5 100644 --- a/tests/jerry/function-prototype-bind.js +++ b/tests/jerry/function-prototype-bind.js @@ -115,6 +115,9 @@ assert (foo == 3); assert (foo instanceof Number); assert (foo.prototype === undefined); +var func = Number.prototype.toString.bind('foo'); +assert (func instanceof Function); + try { var this_obj = this.constructor; var bound = this_obj.bind(null, "foo");