diff options
author | tsepez <tsepez@chromium.org> | 2017-01-11 05:53:10 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-11 05:53:10 -0800 |
commit | 98822430907b603d671f8ade5f20723a0f8ecc03 (patch) | |
tree | 156a46ac4e09d48af8ffff3435bf478e68f41f58 | |
parent | 44bc1f818dd791c2a5a81103be3853093fd934b3 (diff) | |
download | pdfium-98822430907b603d671f8ade5f20723a0f8ecc03.tar.xz |
Pass expose-gc flag to pdfium test programs.
I also made the call to set the flags occur before the Initialize()
call, as this appears to be the pattern elsewhere in our codebase.
Review-Url: https://codereview.chromium.org/2627563003
-rw-r--r-- | testing/test_support.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/test_support.cpp b/testing/test_support.cpp index c4d915e900..a530b3ea4c 100644 --- a/testing/test_support.cpp +++ b/testing/test_support.cpp @@ -63,12 +63,12 @@ void InitializeV8Common(const char* exe_path, v8::Platform** platform) { *platform = v8::platform::CreateDefaultPlatform(); v8::V8::InitializePlatform(*platform); - v8::V8::Initialize(); // By enabling predictable mode, V8 won't post any background tasks. - const char predictable_flag[] = "--predictable"; - v8::V8::SetFlagsFromString(predictable_flag, - static_cast<int>(strlen(predictable_flag))); + // By enabling GC, it makes it easier to chase use-after-free. + const char v8_flags[] = "--predictable --expose-gc"; + v8::V8::SetFlagsFromString(v8_flags, static_cast<int>(strlen(v8_flags))); + v8::V8::Initialize(); } #endif // PDF_ENABLE_V8 |