Bug 1477599 - Move StyloParsingBench helper functions into #if as well. r=emilio

MozReview-Commit-ID: GhcdIdX6IBk

--HG--
extra : rebase_source : a6a8870f2605f2fa87a37d775f1250a71797e769
This commit is contained in:
Xidorn Quan 2018-07-23 09:51:41 +10:00
Родитель 77274c3ef2
Коммит 04cfb39e53
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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