Update from https://crrev.com/311076

Includes updating DCHECK_IS_ON to a function-style macro and removing
various dead skia-overriding code from Sky.

Review URL: https://codereview.chromium.org/851503003
diff --git a/gin/BUILD.gn b/gin/BUILD.gn
index b352c3a..d389b84 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,40 @@
   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" ]
+    defines += [ "V8_VERIFY_EXTERNAL_STARTUP_DATA" ]
+  }
+}
+
+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") {