Commit 2258521f authored by nbarth@chromium.org's avatar nbarth@chromium.org

Cleanup v8 usage in core

* Explicitly include v8.h where used.
* Do *not* forward declare v8 symbols in headers, per:
http://www.chromium.org/developers/coding-style/cpp-dos-and-donts#TOC-Exceptions

There are 27 files in core (9 .h + 18 .cpp) that use v8.
This corrects usage.

Review URL: https://codereview.chromium.org/318843003

git-svn-id: svn://svn.chromium.org/blink/trunk@175551 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 174ba371
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include "core/animation/AnimationTimeline.h" #include "core/animation/AnimationTimeline.h"
#include "core/animation/KeyframeEffectModel.h" #include "core/animation/KeyframeEffectModel.h"
#include "core/animation/Timing.h" #include "core/animation/Timing.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "core/animation/KeyframeEffectModel.h" #include "core/animation/KeyframeEffectModel.h"
#include "core/dom/Document.h" #include "core/dom/Document.h"
#include "core/dom/Element.h" #include "core/dom/Element.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <v8.h>
using namespace WebCore; using namespace WebCore;
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include "bindings/v8/Dictionary.h" #include "bindings/v8/Dictionary.h"
#include "core/animation/AnimationNodeTiming.h" #include "core/animation/AnimationNodeTiming.h"
#include "core/animation/AnimationTestHelper.h" #include "core/animation/AnimationTestHelper.h"
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "bindings/core/v8/V8MediaQueryList.h" #include "bindings/core/v8/V8MediaQueryList.h"
#include "bindings/v8/V8Callback.h" #include "bindings/v8/V8Callback.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "core/dom/StaticNodeList.h" #include "core/dom/StaticNodeList.h"
#include "core/dom/Element.h" #include "core/dom/Element.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "core/events/ErrorEvent.h" #include "core/events/ErrorEvent.h"
#include "bindings/v8/V8Binding.h" #include "bindings/v8/V8Binding.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "platform/transforms/AffineTransform.h" #include "platform/transforms/AffineTransform.h"
#include "public/platform/Platform.h" #include "public/platform/Platform.h"
#include <math.h> #include <math.h>
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "bindings/v8/SharedPersistent.h" #include "bindings/v8/SharedPersistent.h"
#include "core/html/HTMLFrameOwnerElement.h" #include "core/html/HTMLFrameOwnerElement.h"
#include <v8.h>
struct NPObject; struct NPObject;
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "core/xml/XMLHttpRequestUpload.h" #include "core/xml/XMLHttpRequestUpload.h"
#include "wtf/text/AtomicStringHash.h" #include "wtf/text/AtomicStringHash.h"
#include "wtf/text/StringBuilder.h" #include "wtf/text/StringBuilder.h"
#include <v8.h>
namespace { namespace {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "wtf/Forward.h" #include "wtf/Forward.h"
#include "wtf/HashMap.h" #include "wtf/HashMap.h"
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include "platform/PlatformMouseEvent.h" #include "platform/PlatformMouseEvent.h"
#include "platform/graphics/GraphicsContextStateSaver.h" #include "platform/graphics/GraphicsContextStateSaver.h"
#include "wtf/text/StringBuilder.h" #include "wtf/text/StringBuilder.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "bindings/v8/ScriptValue.h" #include "bindings/v8/ScriptValue.h"
#include "bindings/v8/V8Binding.h" #include "bindings/v8/V8Binding.h"
#include <v8-debug.h>
namespace WebCore { namespace WebCore {
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include "bindings/v8/ScopedPersistent.h" #include "bindings/v8/ScopedPersistent.h"
#include "bindings/v8/ScriptState.h" #include "bindings/v8/ScriptState.h"
#include "bindings/v8/ScriptWrappable.h" #include "bindings/v8/ScriptWrappable.h"
#include <v8-debug.h>
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "bindings/v8/ScriptValue.h" #include "bindings/v8/ScriptValue.h"
#include "bindings/v8/V8Binding.h" #include "bindings/v8/V8Binding.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
#include "core/inspector/ScriptProfile.h" #include "core/inspector/ScriptProfile.h"
#include "bindings/v8/V8Binding.h" #include "bindings/v8/V8Binding.h"
#include <v8-profiler.h>
#include "wtf/PassRefPtr.h" #include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -34,10 +34,7 @@ ...@@ -34,10 +34,7 @@
#include "InspectorTypeBuilder.h" #include "InspectorTypeBuilder.h"
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
#include <v8-profiler.h>
namespace v8 {
class CpuProfile;
}
namespace WebCore { namespace WebCore {
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include "platform/text/TextCheckerClient.h" #include "platform/text/TextCheckerClient.h"
#include "public/platform/WebScreenInfo.h" #include "public/platform/WebScreenInfo.h"
#include "wtf/Forward.h" #include "wtf/Forward.h"
#include <v8.h> #include <v8.h>
/* /*
......
...@@ -38,11 +38,7 @@ ...@@ -38,11 +38,7 @@
#include "platform/weborigin/Referrer.h" #include "platform/weborigin/Referrer.h"
#include "wtf/Forward.h" #include "wtf/Forward.h"
#include "wtf/Vector.h" #include "wtf/Vector.h"
#include <v8.h>
namespace v8 {
class Context;
template<class T> class Handle;
}
namespace blink { namespace blink {
class WebCookieJar; class WebCookieJar;
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "config.h" #include "config.h"
#include "Internals.h" #include "Internals.h"
#include <v8.h>
#include "InternalProfilers.h" #include "InternalProfilers.h"
#include "InternalRuntimeFlags.h" #include "InternalRuntimeFlags.h"
#include "InternalSettings.h" #include "InternalSettings.h"
...@@ -137,6 +136,7 @@ ...@@ -137,6 +136,7 @@
#include "wtf/PassOwnPtr.h" #include "wtf/PassOwnPtr.h"
#include "wtf/dtoa.h" #include "wtf/dtoa.h"
#include "wtf/text/StringBuffer.h" #include "wtf/text/StringBuffer.h"
#include <v8.h>
namespace WebCore { namespace WebCore {
......
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#include "core/dom/ExecutionContext.h" #include "core/dom/ExecutionContext.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include <v8.h>
using namespace WebCore; using namespace WebCore;
namespace WebCoreTestSupport { namespace WebCoreTestSupport {
......
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
#ifndef WebCoreTestSupport_h #ifndef WebCoreTestSupport_h
#define WebCoreTestSupport_h #define WebCoreTestSupport_h
// Normally we'd have:
// #include <v8.h>
// ...but this file is used in cases where we don't have V8 (e.g., Skia)
namespace v8 { namespace v8 {
class Context; class Context;
template <class T> class Local; template <class T> class Local;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment