Title: [244862] trunk
Revision
244862
Author
[email protected]
Date
2019-05-01 19:04:07 -0700 (Wed, 01 May 2019)

Log Message

ASSERTION FAILED: !m_needExceptionCheck with --validateExceptionChecks=1; ProxyObject.getOwnPropertySlotCommon/JSFunction.callerGetter
https://bugs.webkit.org/show_bug.cgi?id=197485

Reviewed by Saam Barati.

JSTests:

New test.

* stress/proxy-getOwnPropertySlots-exceptionChecks.js: Added.
(foo):

Source/_javascript_Core:

Added an EXCEPTION_ASSERT after call to getOwnPropertySlot().

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (244861 => 244862)


--- trunk/JSTests/ChangeLog	2019-05-02 00:25:46 UTC (rev 244861)
+++ trunk/JSTests/ChangeLog	2019-05-02 02:04:07 UTC (rev 244862)
@@ -1,3 +1,15 @@
+2019-05-01  Michael Saboff  <[email protected]>
+
+        ASSERTION FAILED: !m_needExceptionCheck with --validateExceptionChecks=1; ProxyObject.getOwnPropertySlotCommon/JSFunction.callerGetter
+        https://bugs.webkit.org/show_bug.cgi?id=197485
+
+        Reviewed by Saam Barati.
+
+        New test.
+
+        * stress/proxy-getOwnPropertySlots-exceptionChecks.js: Added.
+        (foo):
+
 2019-05-01  Ross Kirsling  <[email protected]>
 
         Unreviewed correction to Test262 expectations following r244828.

Added: trunk/JSTests/stress/proxy-getOwnPropertySlots-exceptionChecks.js (0 => 244862)


--- trunk/JSTests/stress/proxy-getOwnPropertySlots-exceptionChecks.js	                        (rev 0)
+++ trunk/JSTests/stress/proxy-getOwnPropertySlots-exceptionChecks.js	2019-05-02 02:04:07 UTC (rev 244862)
@@ -0,0 +1,9 @@
+//@ runWithoutBaseOption("default", "--validateExceptionChecks=1")
+
+// This test that we have appropriate exception check processing Proxy.getOwnPropertySlots
+
+function foo()
+{
+}
+
+let a = {...new Proxy(foo, {})}

Modified: trunk/Source/_javascript_Core/ChangeLog (244861 => 244862)


--- trunk/Source/_javascript_Core/ChangeLog	2019-05-02 00:25:46 UTC (rev 244861)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-05-02 02:04:07 UTC (rev 244862)
@@ -1,3 +1,15 @@
+2019-05-01  Michael Saboff  <[email protected]>
+
+        ASSERTION FAILED: !m_needExceptionCheck with --validateExceptionChecks=1; ProxyObject.getOwnPropertySlotCommon/JSFunction.callerGetter
+        https://bugs.webkit.org/show_bug.cgi?id=197485
+
+        Reviewed by Saam Barati.
+
+        Added an EXCEPTION_ASSERT after call to getOwnPropertySlot().
+
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::getOwnPropertyDescriptor):
+
 2019-05-01  Ross Kirsling  <[email protected]>
 
         RemoteInspector::updateAutomaticInspectionCandidate should have a default implementation.

Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (244861 => 244862)


--- trunk/Source/_javascript_Core/runtime/JSObject.cpp	2019-05-02 00:25:46 UTC (rev 244861)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp	2019-05-02 02:04:07 UTC (rev 244862)
@@ -3441,10 +3441,14 @@
 bool JSObject::getOwnPropertyDescriptor(ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
 {
     VM& vm = exec->vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
     JSC::PropertySlot slot(this, PropertySlot::InternalMethodType::GetOwnProperty);
     if (!methodTable(vm)->getOwnPropertySlot(this, exec, propertyName, slot))
         return false;
-
+    EXCEPTION_ASSERT(!scope.exception());
+    scope.release();
+    
     // DebuggerScope::getOwnPropertySlot() (and possibly others) may return attributes from the prototype chain
     // but getOwnPropertyDescriptor() should only work for 'own' properties so we exit early if we detect that
     // the property is not an own property.
@@ -3490,6 +3494,7 @@
             descriptor.setSetter(getCustomGetterSetterFunctionForGetterSetter(exec, propertyName, getterSetter, JSCustomGetterSetterFunction::Type::Setter));
     } else
         descriptor.setDescriptor(slot.getValue(exec, propertyName), slot.attributes());
+
     return true;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to