Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: gin/BUILD.gn

Issue 832393003: [gin] Fingerprint the V8 snapshot files on Windows and verify before loading the snapshot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix 'all' target when v8_use_external_startup_data==0 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gin/BUILD.gn
diff --git a/gin/BUILD.gn b/gin/BUILD.gn
index b352c3ac4f34148605151c8729bebed1523f5432..68ce436c020cf8c55f44d66247b17327c13fc4e6 100644
--- a/gin/BUILD.gn
+++ b/gin/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/module_args/v8.gni")
+
component("gin") {
sources = [
"arguments.cc",
@@ -68,6 +70,39 @@ component("gin") {
deps = [
"//base/third_party/dynamic_annotations",
]
+ if (v8_use_external_startup_data && is_win) {
+ deps += [
+ ":gin_v8_snapshot_fingerprint",
+ "//crypto:crypto",
+ ]
+ sources += [ "$target_gen_dir/v8_snapshot_fingerprint.cc" ]
+ }
+}
+
+if (v8_use_external_startup_data) {
+ action("gin_v8_snapshot_fingerprint") {
+ script = "//gin/fingerprint/fingerprint_v8_snapshot.py"
+
+ snapshot_file = "$root_build_dir/snapshot_blob.bin"
+ natives_file = "$root_build_dir/natives_blob.bin"
+ output_file = "$target_gen_dir/v8_snapshot_fingerprint.cc"
+
+ args = [
+ "--snapshot_file",
+ rebase_path(snapshot_file, root_build_dir),
+ "--natives_file",
+ rebase_path(natives_file, root_build_dir),
+ "--output_file",
+ rebase_path(output_file, root_build_dir),
+ ]
+ inputs = [
+ snapshot_file,
+ natives_file,
+ ]
+ outputs = [
+ output_file,
+ ]
+ }
}
executable("gin_shell") {

Powered by Google App Engine
This is Rietveld 408576698