summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorJochen Eisinger <jochen@chromium.org>2015-05-29 10:22:32 +0200
committerJochen Eisinger <jochen@chromium.org>2015-05-29 10:22:32 +0200
commitcafa3fd96e850acbfa2633009b873b8ecb7aee5f (patch)
tree97502a0558d61513921dd39ff2bc9fe4dbc38cc9 /samples
parent8ba4a3ccfde20a46740c6a658e29afd6d2e1edb4 (diff)
downloadpdfium-cafa3fd96e850acbfa2633009b873b8ecb7aee5f.tar.xz
Run V8 in predictable mode for pdfium_test
This won't post tasks to the background threads BUG=none R=kcc@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1157123003
Diffstat (limited to 'samples')
-rw-r--r--samples/pdfium_test.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index a91e132506..d5bf3c0f16 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -582,6 +582,9 @@ int main(int argc, const char* argv[]) {
v8::Platform* platform = v8::platform::CreateDefaultPlatform();
v8::V8::InitializePlatform(platform);
v8::V8::Initialize();
+ // By enabling predicatble mode, V8 won't post any background tasks.
+ const char predictable_flag[] = "--predictable";
+ v8::V8::SetFlagsFromString(predictable_flag, strlen(predictable_flag));
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
v8::StartupData natives;