Skip to content

Commit e9a5b34

Browse files
LaszloLangokkristof
authored andcommitted
Assertion fix for missing class names.
Assertion 'builtin_id == ECMA_BUILTIN_ID_TYPE_ERROR_THROWER' failed in ecma_object_get_class_name. JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
1 parent 47cd42e commit e9a5b34

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,20 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
607607
break;
608608
}
609609
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
610+
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
611+
case ECMA_BUILTIN_ID_DATE:
612+
{
613+
class_name = LIT_MAGIC_STRING_DATE_UL;
614+
break;
615+
}
616+
#endif /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
617+
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
618+
case ECMA_BUILTIN_ID_REGEXP:
619+
{
620+
class_name = LIT_MAGIC_STRING_REGEXP_UL;
621+
break;
622+
}
623+
#endif /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN */
610624
default:
611625
{
612626
JERRY_ASSERT (builtin_id == ECMA_BUILTIN_ID_TYPE_ERROR_THROWER);
@@ -681,6 +695,12 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
681695
return LIT_MAGIC_STRING_ERROR_UL;
682696
}
683697
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS */
698+
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
699+
case ECMA_BUILTIN_ID_DATE_PROTOTYPE:
700+
{
701+
return LIT_MAGIC_STRING_DATE_UL;
702+
}
703+
#endif /* CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN */
684704
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN
685705
case ECMA_BUILTIN_ID_REGEXP_PROTOTYPE:
686706
{
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2015 Samsung Electronics Co., Ltd.
2+
// Copyright 2015 University of Szeged.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
NaN == RegExp;
17+
NaN == Date;

0 commit comments

Comments
 (0)