Title: [179860] trunk/Source/WebCore
- Revision
- 179860
- Author
- [email protected]
- Date
- 2015-02-09 17:17:44 -0800 (Mon, 09 Feb 2015)
Log Message
Check for self-assignment in Length::operator=(const Length&)
https://bugs.webkit.org/show_bug.cgi?id=141402
Reviewed by Andreas Kling.
Check for self-assignment in Length::operator=(const Length&) as
calling memcpy() with the same source and destination addresses has
undefined behavior.
* platform/Length.h:
(WebCore::Length::operator=):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (179859 => 179860)
--- trunk/Source/WebCore/ChangeLog 2015-02-10 01:02:28 UTC (rev 179859)
+++ trunk/Source/WebCore/ChangeLog 2015-02-10 01:17:44 UTC (rev 179860)
@@ -1,3 +1,17 @@
+2015-02-09 Chris Dumez <[email protected]>
+
+ Check for self-assignment in Length::operator=(const Length&)
+ https://bugs.webkit.org/show_bug.cgi?id=141402
+
+ Reviewed by Andreas Kling.
+
+ Check for self-assignment in Length::operator=(const Length&) as
+ calling memcpy() with the same source and destination addresses has
+ undefined behavior.
+
+ * platform/Length.h:
+ (WebCore::Length::operator=):
+
2015-02-09 Roger Fong <[email protected]>
WebGL: Update 1.0.2 conformance layout tests and address new failure.
Modified: trunk/Source/WebCore/platform/Length.h (179859 => 179860)
--- trunk/Source/WebCore/platform/Length.h 2015-02-10 01:02:28 UTC (rev 179859)
+++ trunk/Source/WebCore/platform/Length.h 2015-02-10 01:17:44 UTC (rev 179860)
@@ -179,6 +179,9 @@
inline Length& Length::operator=(const Length& other)
{
+ if (this == &other)
+ return *this;
+
if (other.isCalculated())
other.ref();
if (isCalculated())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes