Skip to content

Commit 9dfaca4

Browse files
Fix Assertion '!jcontext_has_pending_exception ()' failed
JerryScript-DCO-1.0-Signed-off-by: tangbin [email protected]
1 parent 5020015 commit 9dfaca4

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ ecma_builtin_regexp_prototype_match_all (ecma_object_t *regexp_obj_p, /**< this
498498
ecma_deref_ecma_string (str_p);
499499
ecma_deref_ecma_string (flags);
500500
ecma_deref_object (matcher_obj_p);
501+
return set;
501502
}
502503

503504
uint16_t parsed_flag;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
16+
function check_syntax_error (script)
17+
{
18+
try
19+
{
20+
eval (script);
21+
assert (false);
22+
}
23+
catch (e)
24+
{
25+
assert (e instanceof TypeError);
26+
}
27+
}
28+
29+
check_syntax_error("var t = Function( );t[Symbol.species] = Object;var e = new Proxy({ constructor:t}, {set:function( ){ }} );RegExp.prototype[Symbol.matchAll].call(e);")

0 commit comments

Comments
 (0)