Changeset 252558 in webkit
- Timestamp:
- Nov 18, 2019 12:35:59 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r252557 r252558 1 2019-11-18 Mark Lam <mark.lam@apple.com> 2 3 Clarify that OptionRange::operator=() is only used for initializing to 0 (i.e. state Uninitialized). 4 https://bugs.webkit.org/show_bug.cgi?id=204309 5 6 Reviewed by Saam Barati. 7 8 Added a RELEASE_ASSERT in OptionRange::operator=() to enforce that it should 9 never be called with any value other than 0. 10 11 * runtime/OptionsList.h: 12 (JSC::OptionRange::operator= ): 13 1 14 2019-11-18 Mark Lam <mark.lam@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/OptionsList.h
r252557 r252558 552 552 enum RangeState { Uninitialized, InitError, Normal, Inverted }; 553 553 public: 554 OptionRange& operator= (const int& rhs) 555 { // Only needed for initialization 556 if (!rhs) { 557 m_state = Uninitialized; 558 m_rangeString = 0; 559 m_lowLimit = 0; 560 m_highLimit = 0; 561 } 554 OptionRange& operator=(int value) 555 { 556 // Only used for initialization to state Uninitialized. 557 // OptionsList specifies OptionRange options with default value 0. 558 RELEASE_ASSERT(!value); 559 560 m_state = Uninitialized; 561 m_rangeString = 0; 562 m_lowLimit = 0; 563 m_highLimit = 0; 562 564 return *this; 563 565 }
Note: See TracChangeset
for help on using the changeset viewer.