Title: [253869] trunk/Source/_javascript_Core
Revision
253869
Author
[email protected]
Date
2019-12-22 01:57:04 -0800 (Sun, 22 Dec 2019)

Log Message

Unreviewed, fix debug failures due to missing exception checks
https://bugs.webkit.org/show_bug.cgi?id=205327

* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSObject.cpp:
(JSC::JSObject::defineOwnNonIndexProperty):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (253868 => 253869)


--- trunk/Source/_javascript_Core/ChangeLog	2019-12-22 04:19:53 UTC (rev 253868)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-12-22 09:57:04 UTC (rev 253869)
@@ -1,3 +1,15 @@
+2019-12-22  Yusuke Suzuki  <[email protected]>
+
+        Unreviewed, fix debug failures due to missing exception checks
+        https://bugs.webkit.org/show_bug.cgi?id=205327
+
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::getOwnNonIndexPropertyNames):
+        (JSC::JSFunction::put):
+        (JSC::JSFunction::defineOwnProperty):
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::defineOwnNonIndexProperty):
+
 2019-12-21  Yusuke Suzuki  <[email protected]>
 
         [JSC] Improve our bound function implementation

Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (253868 => 253869)


--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp	2019-12-22 04:19:53 UTC (rev 253868)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp	2019-12-22 09:57:04 UTC (rev 253869)
@@ -496,11 +496,14 @@
 {
     JSFunction* thisObject = jsCast<JSFunction*>(object);
     VM& vm = globalObject->vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
     if (mode.includeDontEnumProperties()) {
         if (!thisObject->isHostOrBuiltinFunction()) {
             // Make sure prototype has been reified.
             PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
             thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, globalObject, vm.propertyNames->prototype, slot);
+            RETURN_IF_EXCEPTION(scope, void());
 
             if (thisObject->jsExecutable()->hasCallerAndArgumentsProperties()) {
                 propertyNames.add(vm.propertyNames->arguments);
@@ -519,7 +522,7 @@
             }
         }
     }
-    Base::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode);
+    RELEASE_AND_RETURN(scope, Base::getOwnNonIndexPropertyNames(thisObject, globalObject, propertyNames, mode));
 }
 
 bool JSFunction::put(JSCell* cell, JSGlobalObject* globalObject, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
@@ -555,6 +558,7 @@
         // following the rules set out in ECMA-262 8.12.9.
         PropertySlot getSlot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
         thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, globalObject, propertyName, getSlot);
+        RETURN_IF_EXCEPTION(scope, false);
         if (thisObject->m_rareData)
             thisObject->m_rareData->clear("Store to prototype property of a function");
         RELEASE_AND_RETURN(scope, Base::put(thisObject, globalObject, propertyName, value, slot));
@@ -633,6 +637,7 @@
         // following the rules set out in ECMA-262 8.12.9.
         PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
         thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, globalObject, propertyName, slot);
+        RETURN_IF_EXCEPTION(scope, false);
         if (thisObject->m_rareData)
             thisObject->m_rareData->clear("Store to prototype property of a function");
         RELEASE_AND_RETURN(scope, Base::defineOwnProperty(object, globalObject, propertyName, descriptor, throwException));
@@ -659,6 +664,7 @@
         }
     } else {
         thisObject->reifyLazyPropertyIfNeeded(vm, globalObject, propertyName);
+        RETURN_IF_EXCEPTION(scope, false);
         RELEASE_AND_RETURN(scope, Base::defineOwnProperty(object, globalObject, propertyName, descriptor, throwException));
     }
      

Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (253868 => 253869)


--- trunk/Source/_javascript_Core/runtime/JSObject.cpp	2019-12-22 04:19:53 UTC (rev 253868)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp	2019-12-22 09:57:04 UTC (rev 253869)
@@ -3727,6 +3727,7 @@
     VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
     PropertyDescriptor current;
     bool isCurrentDefined = getOwnPropertyDescriptor(globalObject, propertyName, current);
+    RETURN_IF_EXCEPTION(throwScope, false);
     bool isExtensible = this->isExtensible(globalObject);
     RETURN_IF_EXCEPTION(throwScope, false);
     RELEASE_AND_RETURN(throwScope, validateAndApplyPropertyDescriptor(globalObject, this, propertyName, isExtensible, descriptor, isCurrentDefined, current, throwException));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to