Title: [228388] trunk/Source/_javascript_Core
Revision
228388
Author
mark....@apple.com
Date
2018-02-12 12:28:02 -0800 (Mon, 12 Feb 2018)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (228387 => 228388)


--- trunk/Source/_javascript_Core/ChangeLog	2018-02-12 20:12:35 UTC (rev 228387)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-02-12 20:28:02 UTC (rev 228388)
@@ -1,3 +1,17 @@
+2018-02-12  Mark Lam  <mark....@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-11  Guillaume Emont  <guijem...@igalia.com>
 
         [MIPS] JSC needs to be built with -latomic

Modified: trunk/Source/_javascript_Core/runtime/RegExpObject.cpp (228387 => 228388)


--- trunk/Source/_javascript_Core/runtime/RegExpObject.cpp	2018-02-12 20:12:35 UTC (rev 228387)
+++ trunk/Source/_javascript_Core/runtime/RegExpObject.cpp	2018-02-12 20:28:02 UTC (rev 228388)
@@ -1,6 +1,6 @@
 /*
  *  Copyright (C) 1999-2000 Harri Porten (por...@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
@@ -258,8 +258,10 @@
     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();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to