[tracing] Fix builds with perfetto and v8-gn.h

Adds v8config.h include before using V8_USE_PERFETTO to fix build errors
when v8_generate_external_defines_header and v8_use_perfetto are both
enabled.

Bug: v8:11292
Change-Id: I4ea5fd39ca7eaaa5ad64b532d26df7933da41659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640480
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72214}
This commit is contained in:
Dan Elphick 2021-01-20 18:31:57 +00:00 committed by Commit Bot
parent e5ea57a5a7
commit dceceac1ba

View File

@ -8,6 +8,9 @@
#include <stddef.h>
#include <memory>
// Include first to ensure that V8_USE_PERFETTO can be defined before use.
#include "v8config.h" // NOLINT(build/include_directory)
#if defined(V8_USE_PERFETTO)
#include "protos/perfetto/trace/track_event/debug_annotation.pbzero.h"
#include "src/tracing/trace-categories.h"