Changeset 248927 in webkit
- Timestamp:
- Aug 20, 2019 5:39:02 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r248925 r248927 1 2019-08-20 Mark Lam <mark.lam@apple.com> 2 3 JSBigInt::m_length should be immutable. 4 https://bugs.webkit.org/show_bug.cgi?id=200956 5 6 Reviewed by Yusuke Suzuki. 7 8 This is because the JSBigInt cell size is allocated with that length. Changing 9 the length after construction does not change the size of the cell, and hence, 10 makes no sense. 11 12 This patch removes the setLength() method, and decorates the m_length field with 13 const to enforce that it is immutable after construction. 14 15 * runtime/JSBigInt.h: 16 1 17 2019-08-20 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/JavaScriptCore/runtime/JSBigInt.h
r248898 r248927 1 1 /* 2 2 * Copyright (C) 2017 Caio Lima <ticaiolima@gmail.com> 3 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 72 73 bool sign() const { return m_sign; } 73 74 74 void setLength(unsigned length) { m_length = length; }75 75 unsigned length() const { return m_length; } 76 76 … … 247 247 Digit digit(unsigned); 248 248 void setDigit(unsigned, Digit); 249 250 unsigned m_length;249 250 const unsigned m_length; 251 251 bool m_sign { false }; 252 252 };
Note: See TracChangeset
for help on using the changeset viewer.