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

Unified Diff: test/cctest/cctest.h

Issue 1414483004: Add the rate of js invocations from the api as a signal of idleness (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments from Hannes Created 5 years, 2 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 | « src/isolate.cc ('k') | test/cctest/heap-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index a0bc09d95062cbbc9a8b12799b4fb37a2106acf5..9798dfbc3c14612d05b30cb2276903bebb3b285b 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -530,6 +530,13 @@ static inline void DisableInlineAllocationSteps(v8::internal::NewSpace* space) {
}
+static inline void CheckDoubleEquals(double expected, double actual) {
+ const double kEpsilon = 1e-10;
+ CHECK_LE(expected, actual + kEpsilon);
+ CHECK_GE(expected, actual - kEpsilon);
+}
+
+
static int LenFromSize(int size) {
return (size - i::FixedArray::kHeaderSize) / i::kPointerSize;
}
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/heap-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698