Skip to content

Commit

Permalink
Merge r228388 - Fix missing exception check in RegExpObject::matchGlo…
Browse files Browse the repository at this point in the history
…bal().

https://bugs.webkit.org/show_bug.cgi?id=182701
<rdar://problem/37465865>

Reviewed by Michael Saboff.

This issue was discovered when running JSC tests on an asm LLInt build with
JSC_useJIT=false.

* runtime/RegExpObject.cpp:
(JSC::RegExpObject::matchGlobal):
  • Loading branch information
Mark Lam authored and carlosgcampos committed Feb 20, 2018
1 parent e0fed8a commit 6ef465e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
2018-02-12 Mark Lam <mark.lam@apple.com>

Fix missing exception check in RegExpObject::matchGlobal().
https://bugs.webkit.org/show_bug.cgi?id=182701
<rdar://problem/37465865>

Reviewed by Michael Saboff.

This issue was discovered when running JSC tests on an asm LLInt build with
JSC_useJIT=false.

* runtime/RegExpObject.cpp:
(JSC::RegExpObject::matchGlobal):

2018-02-08 Don Olmstead <don.olmstead@sony.com>

Remove JavaScriptCore/ForwardingHeaders directory
Expand Down
6 changes: 4 additions & 2 deletions Source/JavaScriptCore/runtime/RegExpObject.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
* Copyright (C) 2003-2017 Apple Inc. All Rights Reserved.
* Copyright (C) 2003-2018 Apple Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -258,8 +258,10 @@ JSValue RegExpObject::matchGlobal(ExecState* exec, JSGlobalObject* globalObject,
RETURN_IF_EXCEPTION(scope, { });

String s = string->value(exec);
RETURN_IF_EXCEPTION(scope, { });
RegExpConstructor* regExpConstructor = globalObject->regExpConstructor();


ASSERT(!s.isNull());
if (regExp->unicode()) {
unsigned stringLength = s.length();
scope.release();
Expand Down

0 comments on commit 6ef465e

Please sign in to comment.