Title: [233987] trunk/Source/_javascript_Core
- Revision
- 233987
- Author
- [email protected]
- Date
- 2018-07-19 10:06:38 -0700 (Thu, 19 Jul 2018)
Log Message
Unreviewed, check scope after performing getPropertySlot in JSON.stringify
https://bugs.webkit.org/show_bug.cgi?id=187807
Properly putting EXCEPTION_ASSERT to tell our exception checker mechanism
that we know that exception occurrence and handle it well.
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (233986 => 233987)
--- trunk/Source/_javascript_Core/ChangeLog 2018-07-19 16:56:58 UTC (rev 233986)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-07-19 17:06:38 UTC (rev 233987)
@@ -1,3 +1,14 @@
+2018-07-19 Yusuke Suzuki <[email protected]>
+
+ Unreviewed, check scope after performing getPropertySlot in JSON.stringify
+ https://bugs.webkit.org/show_bug.cgi?id=187807
+
+ Properly putting EXCEPTION_ASSERT to tell our exception checker mechanism
+ that we know that exception occurrence and handle it well.
+
+ * runtime/JSONObject.cpp:
+ (JSC::Stringifier::Holder::appendNextProperty):
+
2018-07-18 Yusuke Suzuki <[email protected]>
[JSC] Reduce size of AST nodes
Modified: trunk/Source/_javascript_Core/runtime/JSONObject.cpp (233986 => 233987)
--- trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2018-07-19 16:56:58 UTC (rev 233986)
+++ trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2018-07-19 17:06:38 UTC (rev 233987)
@@ -514,7 +514,9 @@
value = asArray(m_object)->getIndexQuickly(index);
else {
PropertySlot slot(m_object, PropertySlot::InternalMethodType::Get);
- if (m_object->getPropertySlot(exec, index, slot))
+ bool hasProperty = m_object->getPropertySlot(exec, index, slot);
+ EXCEPTION_ASSERT(!scope.exception() || !hasProperty);
+ if (hasProperty)
value = slot.getValue(exec, index);
else
value = jsUndefined();
@@ -533,7 +535,9 @@
// Get the value.
PropertySlot slot(m_object, PropertySlot::InternalMethodType::Get);
Identifier& propertyName = m_propertyNames->propertyNameVector()[index];
- if (!m_object->getPropertySlot(exec, propertyName, slot))
+ bool hasProperty = m_object->getPropertySlot(exec, propertyName, slot);
+ EXCEPTION_ASSERT(!scope.exception() || !hasProperty);
+ if (!hasProperty)
return true;
JSValue value = slot.getValue(exec, propertyName);
RETURN_IF_EXCEPTION(scope, false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes