More exception check book-keeping needed found by 32-bit JSC test failures.
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Sep 2017 22:16:38 +0000 (22:16 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Sep 2017 22:16:38 +0000 (22:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176742

Reviewed by Michael Saboff and Keith Miller.

* dfg/DFGOperations.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221881 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGOperations.cpp

index 6e3c550..8c82f3e 100644 (file)
@@ -1,5 +1,14 @@
 2017-09-11  Mark Lam  <mark.lam@apple.com>
 
+        More exception check book-keeping needed found by 32-bit JSC test failures.
+        https://bugs.webkit.org/show_bug.cgi?id=176742
+
+        Reviewed by Michael Saboff and Keith Miller.
+
+        * dfg/DFGOperations.cpp:
+
+2017-09-11  Mark Lam  <mark.lam@apple.com>
+
         Make jsc dump the command line if JSC_dumpOption environment variable is set with a non-zero value.
         https://bugs.webkit.org/show_bug.cgi?id=176722
 
index 03b7333..f227070 100644 (file)
@@ -571,13 +571,17 @@ EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base
 
     JSValue property = JSValue::decode(encodedProperty);
 
-    if (property.isUInt32())
+    if (property.isUInt32()) {
+        scope.release();
         return getByVal(exec, base, property.asUInt32());
+    }
     if (property.isDouble()) {
         double propertyAsDouble = property.asDouble();
         uint32_t propertyAsUInt32 = static_cast<uint32_t>(propertyAsDouble);
-        if (propertyAsUInt32 == propertyAsDouble)
+        if (propertyAsUInt32 == propertyAsDouble) {
+            scope.release();
             return getByVal(exec, base, propertyAsUInt32);
+        }
     } else if (property.isString()) {
         Structure& structure = *base->structure(vm);
         if (JSCell::canUseFastGetOwnProperty(structure)) {
@@ -590,6 +594,7 @@ EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base
 
     auto propertyName = property.toPropertyKey(exec);
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
+    scope.release();
     return JSValue::encode(JSValue(base).get(exec, propertyName));
 }