From 0f57ce8f1a3d6b4f3a4b65739d719b8467ff5d9c Mon Sep 17 00:00:00 2001 From: bulach Date: Tue, 18 Nov 2014 12:29:23 -0800 Subject: [PATCH] Forward declaration for Isolate / Platform in libplatform.h. Reduces dependencies on #include files, making it easier for other build systems to include this library. BUG= Review URL: https://codereview.chromium.org/740493002 Cr-Commit-Position: refs/heads/master@{#25408} --- include/libplatform/libplatform.h | 6 ++++-- samples/lineprocessor.cc | 1 + samples/shell.cc | 1 + test/unittests/run-all-unittests.cc | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/libplatform/libplatform.h b/include/libplatform/libplatform.h index 2125e97..c818fec 100644 --- a/include/libplatform/libplatform.h +++ b/include/libplatform/libplatform.h @@ -5,9 +5,11 @@ #ifndef V8_LIBPLATFORM_LIBPLATFORM_H_ #define V8_LIBPLATFORM_LIBPLATFORM_H_ -#include "include/v8-platform.h" - namespace v8 { + +class Isolate; +class Platform; + namespace platform { /** diff --git a/samples/lineprocessor.cc b/samples/lineprocessor.cc index 69bfab4..ce502f0 100644 --- a/samples/lineprocessor.cc +++ b/samples/lineprocessor.cc @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/samples/shell.cc b/samples/shell.cc index b66e8f7..f84838f 100644 --- a/samples/shell.cc +++ b/samples/shell.cc @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/test/unittests/run-all-unittests.cc b/test/unittests/run-all-unittests.cc index 8c361dd..7c3a7ab 100644 --- a/test/unittests/run-all-unittests.cc +++ b/test/unittests/run-all-unittests.cc @@ -4,6 +4,7 @@ #include "include/libplatform/libplatform.h" #include "include/v8.h" +#include "include/v8-platform.h" #include "src/base/compiler-specific.h" #include "testing/gmock/include/gmock/gmock.h" -- 2.7.4