Remove --no-expose-wasm from recommended V8 flags
--jitless already implies --no-expose-wasm, so the latter doesn't need
to be included in the recommended V8 flags.
Bug: pdfium:1721
Change-Id: I85aa3ff6c2d907e432bab06488844baec71b2793
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/85090
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 69cd332..885c2bb 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6,10 +6,6 @@
import("//testing/test.gni")
import("pdfium.gni")
-if (pdf_enable_v8) {
- import("//v8/gni/v8.gni")
-}
-
group("freetype_common") {
public_deps = []
if (pdf_bundle_freetype) {
@@ -102,10 +98,6 @@
defines += [ "PDF_ENABLE_XFA_TIFF" ]
}
}
-
- if (v8_enable_webassembly) {
- defines += [ "PDF_ENABLE_V8_WASM" ]
- }
}
if (pdf_use_win32_gdi) {
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index a528781..0a9311a 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -1063,13 +1063,10 @@
#ifdef PDF_ENABLE_V8
FPDF_EXPORT const char* FPDF_CALLCONV FPDF_GetRecommendedV8Flags() {
- // Use interpreted JS only to avoid RWX pages in our address space.
- // Reduce exposure since no PDF should contain web assembly.
-#if defined(PDF_ENABLE_V8_WASM)
- return "--jitless --no-expose-wasm";
-#else
+ // Use interpreted JS only to avoid RWX pages in our address space. Also,
+ // --jitless implies --no-expose-wasm, which reduce exposure since no PDF
+ // should contain web assembly.
return "--jitless";
-#endif
}
FPDF_EXPORT void* FPDF_CALLCONV FPDF_GetArrayBufferAllocatorSharedInstance() {