Fix issues with roll into Skia

Specifically there are build failures due to size_t not being defined
in CachedObject.h, as well as unused functions in ShaderModule.cpp

Change-Id: Ie9bd903660e3563fdf797e716bf55f6fa8627e84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35103
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/CachedObject.h b/src/dawn_native/CachedObject.h
index ec73718..abf4525 100644
--- a/src/dawn_native/CachedObject.h
+++ b/src/dawn_native/CachedObject.h
@@ -17,6 +17,8 @@
 
 #include "dawn_native/ObjectBase.h"
 
+#include <cstddef>
+
 namespace dawn_native {
 
     // Some objects are cached so that instead of creating new duplicate objects,
diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp
index dc56d2f..55eeb1e 100644
--- a/src/dawn_native/ShaderModule.cpp
+++ b/src/dawn_native/ShaderModule.cpp
@@ -670,6 +670,7 @@
             return {std::move(metadata)};
         }
 
+#ifdef DAWN_ENABLE_WGSL
         // Currently only partially populated the reflection data, needs to be
         // completed using PopulateMetadataUsingSPIRVCross. In the future, once
         // this function is complete, ReflectShaderUsingSPIRVCross and
@@ -677,7 +678,6 @@
         ResultOrError<EntryPointMetadataTable> ReflectShaderUsingTint(
             DeviceBase* device,
             const tint::ast::Module& module) {
-#ifdef DAWN_ENABLE_WGSL
             ASSERT(module.IsValid());
 
             EntryPointMetadataTable result;
@@ -699,10 +699,8 @@
                 result[entryPoint.name] = std::move(metadata);
             }
             return std::move(result);
-#else
-            return DAWN_VALIDATION_ERROR("Using Tint is not enabled in this build.");
-#endif  // DAWN_ENABLE_WGSL
         }
+#endif  // DAWN_ENABLE_WGSL
 
         // Uses SPIRV-Cross, which is planned for removal, but until
         // ReflectShaderUsingTint is completed, will be kept as a
@@ -727,6 +725,7 @@
             return std::move(result);
         }
 
+#ifdef DAWN_ENABLE_WGSL
         // Temporary utility method that allows for polyfilling like behaviour,
         // specifically data missing from the Tint implementation is filled in
         // using the SPIRV-Cross implementation. Once the Tint implementation is
@@ -766,6 +765,7 @@
             }
             return {};
         }
+#endif  // DAWN_ENABLE_WGSL
 
     }  // anonymous namespace