Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: third_party/WebKit/Source/platform/Decimal.cpp

Issue 2048943002: Fix an assertion failure in InputType::applyStep() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/Decimal.h ('k') | third_party/WebKit/Source/platform/DecimalTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/Decimal.cpp
diff --git a/third_party/WebKit/Source/platform/Decimal.cpp b/third_party/WebKit/Source/platform/Decimal.cpp
index a90cdf8206ab2eef59f8e073b7d4affeafee5bb4..b0c57e33d84d20dc616774e6244b3b0312adb93c 100644
--- a/third_party/WebKit/Source/platform/Decimal.cpp
+++ b/third_party/WebKit/Source/platform/Decimal.cpp
@@ -1028,4 +1028,14 @@ Decimal Decimal::zero(Sign sign)
return Decimal(EncodedData(sign, EncodedData::ClassZero));
}
+std::ostream& operator<<(std::ostream& ostream, const Decimal& decimal)
+{
+ Decimal::EncodedData data = decimal.value();
+ return ostream
+ << "encode(" << String::number(data.coefficient()).ascii().data()
+ << ", " << String::number(data.exponent()).ascii().data()
+ << ", " << (data.getSign() == Decimal::Negative ? "Negative" : "Positive")
+ << ")=" << decimal.toString().ascii().data();
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/Decimal.h ('k') | third_party/WebKit/Source/platform/DecimalTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698