Changeset 244136 in webkit
- Timestamp:
- Apr 10, 2019 11:05:00 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r244079 r244136 1 2019-04-10 Robin Morisset <rmorisset@apple.com> 2 3 We should clear m_needsOverflowCheck when hitting an exception in defineProperties in ObjectConstructor.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=196746 5 6 Reviewed by Yusuke Suzuki. 7 8 * stress/cyclic-define-properties.js: Added. 9 (foo): 10 1 11 2019-04-09 Saam barati <sbarati@apple.com> 2 12 -
trunk/Source/JavaScriptCore/ChangeLog
r244114 r244136 1 2019-04-10 Robin Morisset <rmorisset@apple.com> 2 3 We should clear m_needsOverflowCheck when hitting an exception in defineProperties in ObjectConstructor.cpp 4 https://bugs.webkit.org/show_bug.cgi?id=196746 5 6 Reviewed by Yusuke Suzuki.. 7 8 It should be safe as in that case we are not completing the operation, and so not going to have any buffer overflow. 9 10 * runtime/ObjectConstructor.cpp: 11 (JSC::defineProperties): 12 1 13 2019-04-10 Antoine Quint <graouts@apple.com> 2 14 -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r242650 r244136 607 607 Vector<PropertyDescriptor> descriptors; 608 608 MarkedArgumentBuffer markBuffer; 609 #define RETURN_IF_EXCEPTION_CLEARING_OVERFLOW(value) do { \ 610 if (scope.exception()) { \ 611 markBuffer.overflowCheckNotNeeded(); \ 612 return value; \ 613 } \ 614 } while (false) 609 615 for (size_t i = 0; i < numProperties; i++) { 610 616 JSValue prop = properties->get(exec, propertyNames[i]); 611 RETURN_IF_EXCEPTION (scope,{ });617 RETURN_IF_EXCEPTION_CLEARING_OVERFLOW({ }); 612 618 PropertyDescriptor descriptor; 613 bool success = toPropertyDescriptor(exec, prop, descriptor); 614 EXCEPTION_ASSERT(!scope.exception() || !success); 615 if (UNLIKELY(!success)) { 616 markBuffer.overflowCheckNotNeeded(); 617 return jsNull(); 618 } 619 toPropertyDescriptor(exec, prop, descriptor); 620 RETURN_IF_EXCEPTION_CLEARING_OVERFLOW({ }); 619 621 descriptors.append(descriptor); 620 622 // Ensure we mark all the values that we're accumulating … … 629 631 } 630 632 RELEASE_ASSERT(!markBuffer.hasOverflowed()); 633 #undef RETURN_IF_EXCEPTION_CLEARING_OVERFLOW 631 634 for (size_t i = 0; i < numProperties; i++) { 632 635 auto& propertyName = propertyNames[i];
Note: See TracChangeset
for help on using the changeset viewer.