Title: [231957] trunk/Source/_javascript_Core
Revision
231957
Author
[email protected]
Date
2018-05-18 09:15:50 -0700 (Fri, 18 May 2018)

Log Message

Unreviewed, fix exception checking
https://bugs.webkit.org/show_bug.cgi?id=185350

* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::putDirectWithReify):
(JSC::CommonSlowPaths::putDirectAccessorWithReify):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (231956 => 231957)


--- trunk/Source/_javascript_Core/ChangeLog	2018-05-18 16:08:09 UTC (rev 231956)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-05-18 16:15:50 UTC (rev 231957)
@@ -1,3 +1,12 @@
+2018-05-18  Yusuke Suzuki  <[email protected]>
+
+        Unreviewed, fix exception checking
+        https://bugs.webkit.org/show_bug.cgi?id=185350
+
+        * runtime/CommonSlowPaths.h:
+        (JSC::CommonSlowPaths::putDirectWithReify):
+        (JSC::CommonSlowPaths::putDirectAccessorWithReify):
+
 2018-05-17  Michael Saboff  <[email protected]>
 
         We don't throw SyntaxErrors for runtime generated regular expressions with errors

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h (231956 => 231957)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h	2018-05-18 16:08:09 UTC (rev 231956)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h	2018-05-18 16:15:50 UTC (rev 231957)
@@ -227,23 +227,26 @@
 
 static ALWAYS_INLINE void putDirectWithReify(VM& vm, ExecState* exec, JSObject* baseObject, PropertyName propertyName, JSValue value, PutPropertySlot& slot, Structure** result = nullptr)
 {
+    auto scope = DECLARE_THROW_SCOPE(vm);
     if (baseObject->inherits<JSFunction>(vm)) {
-        auto scope = DECLARE_THROW_SCOPE(vm);
         jsCast<JSFunction*>(baseObject)->reifyLazyPropertyIfNeeded(vm, exec, propertyName);
         RETURN_IF_EXCEPTION(scope, void());
     }
     if (result)
         *result = baseObject->structure(vm);
+    scope.release();
     baseObject->putDirect(vm, propertyName, value, slot);
 }
 
 static ALWAYS_INLINE void putDirectAccessorWithReify(VM& vm, ExecState* exec, JSObject* baseObject, PropertyName propertyName, GetterSetter* accessor, unsigned attribute)
 {
+    auto scope = DECLARE_THROW_SCOPE(vm);
     if (baseObject->inherits<JSFunction>(vm)) {
         auto scope = DECLARE_THROW_SCOPE(vm);
         jsCast<JSFunction*>(baseObject)->reifyLazyPropertyIfNeeded(vm, exec, propertyName);
         RETURN_IF_EXCEPTION(scope, void());
     }
+    scope.release();
     baseObject->putDirectAccessor(exec, propertyName, accessor, attribute);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to