From 04cfb39e533cdda80ff7369b1b5565b64a307911 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Mon, 23 Jul 2018 09:51:41 +1000 Subject: [PATCH] Bug 1477599 - Move StyloParsingBench helper functions into #if as well. r=emilio MozReview-Commit-ID: GhcdIdX6IBk --HG-- extra : rebase_source : a6a8870f2605f2fa87a37d775f1250a71797e769 --- layout/style/test/gtest/StyloParsingBench.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/layout/style/test/gtest/StyloParsingBench.cpp b/layout/style/test/gtest/StyloParsingBench.cpp index f871ae818e80..cbf8421edb31 100644 --- a/layout/style/test/gtest/StyloParsingBench.cpp +++ b/layout/style/test/gtest/StyloParsingBench.cpp @@ -17,11 +17,13 @@ using namespace mozilla::css; using namespace mozilla::dom; using namespace mozilla::net; +// Bug 1436018 - Disable Stylo microbenchmark on Windows +#if !defined(_WIN32) && !defined(_WIN64) + #define PARSING_REPETITIONS 20 #define SETPROPERTY_REPETITIONS (1000 * 1000) #define GETPROPERTY_REPETITIONS (1000 * 1000) - static void ServoParsingBench() { auto css = AsBytes(MakeStringSpan(EXAMPLE_STYLESHEET)); @@ -98,8 +100,6 @@ static void ServoGetPropertyValueById() { } } -// Bug 1436018 - Disable Stylo microbenchmark on Windows -#if !defined(_WIN32) && !defined(_WIN64) MOZ_GTEST_BENCH(Stylo, Servo_StyleSheet_FromUTF8Bytes_Bench, ServoParsingBench); MOZ_GTEST_BENCH(Stylo, Servo_DeclarationBlock_SetPropertyById_Bench, [] { @@ -111,4 +111,5 @@ MOZ_GTEST_BENCH(Stylo, Servo_DeclarationBlock_SetPropertyById_WithInitialSpace_B }); MOZ_GTEST_BENCH(Stylo, Servo_DeclarationBlock_GetPropertyById_Bench, ServoGetPropertyValueById); + #endif