提交 41796985 编写于 作者: E Eric Seidel

Move many of v8_inspector dependencies out of core/

This doesn't fully separate v8_inspector from
core, but it does lay the path.

The next steps to removing v8_inspector is to
remove all the # FIXME: Remove lines in the
deps section of v8_inspector/BUILD.gn.

gn check out/Debug v8_inspector
will tell us if we've successfully removed
all the dependencies.

It's unclear if we want to remove the wtf
dependency, but definitely all of the engine/core
dependencies should be removed and presumably
replaced with abstract interfaces which can be provided
to v8_inspector by its host.

Given the size of this patch (and that it's largely
mechanical) I plan to TBR it.

Most of this was done with tools/git/move_source_file.py

TBR=yurys@chromium.org

Review URL: https://codereview.chromium.org/772563003
上级 061c71d8
......@@ -58,13 +58,13 @@
#include "sky/engine/core/html/imports/HTMLImportLoader.h"
#include "sky/engine/core/html/parser/HTMLDocumentParser.h"
#include "sky/engine/core/inspector/InspectorTraceEvents.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/loader/FrameLoaderClient.h"
#include "sky/engine/platform/NotImplemented.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/platform/UserGestureIndicator.h"
#include "sky/engine/platform/Widget.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/CurrentTime.h"
#include "sky/engine/wtf/StdLibExtras.h"
#include "sky/engine/wtf/StringExtras.h"
......
......@@ -38,7 +38,6 @@
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/bindings/core/v8/WrapperTypeInfo.h"
#include "sky/engine/core/dom/Document.h"
#include "sky/engine/core/inspector/BindingVisitors.h"
#include "sky/engine/wtf/ThreadSpecific.h"
#include "v8/include/v8-profiler.h"
#include "v8/include/v8.h"
......@@ -258,41 +257,6 @@ void ScriptProfiler::initialize()
profiler->SetWrapperClassInfoProvider(WrapperTypeInfo::NodeClassId, &retainedDOMInfo);
}
void ScriptProfiler::visitNodeWrappers(WrappedNodeVisitor* visitor)
{
// visitNodeWrappers() should receive a ScriptState and retrieve an Isolate
// from the ScriptState.
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handleScope(isolate);
class DOMNodeWrapperVisitor : public v8::PersistentHandleVisitor {
public:
DOMNodeWrapperVisitor(WrappedNodeVisitor* visitor, v8::Isolate* isolate)
: m_visitor(visitor)
, m_isolate(isolate)
{
}
virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) override
{
if (classId != WrapperTypeInfo::NodeClassId)
return;
// Casting to Handle is safe here, since the Persistent cannot get
// GCd during visiting.
v8::Handle<v8::Object>* wrapper = reinterpret_cast<v8::Handle<v8::Object>*>(value);
ASSERT_UNUSED(m_isolate, V8Node::hasInstance(*wrapper, m_isolate));
ASSERT((*wrapper)->IsObject());
m_visitor->visitNode(V8Node::toNative(*wrapper));
}
private:
WrappedNodeVisitor* m_visitor;
v8::Isolate* m_isolate;
} wrapperVisitor(visitor, isolate);
v8::V8::VisitHandlesWithClassIds(&wrapperVisitor);
}
ProfileNameIdleTimeMap* ScriptProfiler::currentProfileNameIdleTimeMap()
{
AtomicallyInitializedStatic(WTF::ThreadSpecific<ProfileNameIdleTimeMap>*, map = new WTF::ThreadSpecific<ProfileNameIdleTimeMap>);
......
......@@ -40,8 +40,6 @@
namespace blink {
class ExternalStringVisitor;
class WrappedNodeVisitor;
class Page;
class ScriptValue;
......@@ -75,7 +73,6 @@ public:
static void stopTrackingHeapObjects();
static unsigned requestHeapStatsUpdate(OutputStream*);
static void initialize();
static void visitNodeWrappers(WrappedNodeVisitor*);
static HashMap<String, double>* currentProfileNameIdleTimeMap();
static void setIdle(bool isIdle);
};
......
......@@ -43,7 +43,6 @@
#include "sky/engine/core/dom/QualifiedName.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/Settings.h"
#include "sky/engine/core/inspector/BindingVisitors.h"
#include "sky/engine/core/inspector/InspectorTraceEvents.h"
#include "sky/engine/core/loader/FrameLoaderClient.h"
#include "sky/engine/platform/EventTracer.h"
......
......@@ -44,10 +44,10 @@
#include "sky/engine/core/frame/ConsoleTypes.h"
#include "sky/engine/core/frame/LocalDOMWindow.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/platform/EventDispatchForbiddenScope.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/RefPtr.h"
#include "sky/engine/wtf/text/WTFString.h"
#include "v8/include/v8-debug.h"
......
......@@ -27,7 +27,6 @@
#include "sky/engine/bindings/core/v8/V8StringResource.h"
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/core/inspector/BindingVisitors.h"
#include "sky/engine/wtf/MainThread.h"
namespace blink {
......
......@@ -37,7 +37,6 @@
#include "bindings/core/v8/V8NodeList.h"
#include "sky/engine/bindings/core/v8/BindingSecurity.h"
#include "sky/engine/bindings/core/v8/ExceptionState.h"
#include "sky/engine/bindings/core/v8/ScriptDebugServer.h"
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/bindings/core/v8/V8AbstractEventListener.h"
#include "sky/engine/bindings/core/v8/V8Binding.h"
......@@ -53,10 +52,11 @@
#include "sky/engine/bindings/core/v8/custom/V8Uint8ClampedArrayCustom.h"
#include "sky/engine/core/events/EventTarget.h"
#include "sky/engine/core/frame/LocalDOMWindow.h"
#include "sky/engine/core/inspector/InjectedScript.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
#include "sky/engine/core/inspector/JavaScriptCallFrame.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/v8_inspector/InjectedScript.h"
#include "sky/engine/v8_inspector/ScriptDebugServer.h"
namespace blink {
......
......@@ -29,19 +29,19 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InjectedScriptManager.h"
#include "sky/engine/v8_inspector/InjectedScriptManager.h"
#include "bindings/core/v8/V8InjectedScriptHost.h"
#include "bindings/core/v8/V8Window.h"
#include "sky/engine/bindings/core/v8/BindingSecurity.h"
#include "sky/engine/bindings/core/v8/ScopedPersistent.h"
#include "sky/engine/bindings/core/v8/ScriptDebugServer.h"
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/bindings/core/v8/V8ObjectConstructor.h"
#include "sky/engine/bindings/core/v8/V8ScriptRunner.h"
#include "sky/engine/core/frame/LocalDOMWindow.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
#include "sky/engine/v8_inspector/ScriptDebugServer.h"
#include "sky/engine/wtf/RefPtr.h"
namespace blink {
......
......@@ -54,8 +54,8 @@
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/Settings.h"
#include "sky/engine/core/html/HTMLDocument.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/platform/PlatformScreen.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/ArrayBuffer.h"
#include "sky/engine/wtf/Assertions.h"
#include "sky/engine/wtf/OwnPtr.h"
......
......@@ -23,15 +23,15 @@
'CustomElementConstructorBuilder.h',
'CustomElementWrapper.cpp',
'CustomElementWrapper.h',
'Dictionary.cpp',
'Dictionary.h',
'DictionaryHelperForBindings.h',
'DictionaryHelperForCore.cpp',
'DOMDataStore.cpp',
'DOMDataStore.h',
'DOMWrapperMap.h',
'DOMWrapperWorld.cpp',
'DOMWrapperWorld.h',
'Dictionary.cpp',
'Dictionary.h',
'DictionaryHelperForBindings.h',
'DictionaryHelperForCore.cpp',
'ExceptionMessages.cpp',
'ExceptionMessages.h',
'ExceptionState.cpp',
......@@ -55,22 +55,16 @@
'ScriptGCEvent.h',
'ScriptHeapSnapshot.cpp',
'ScriptHeapSnapshot.h',
'ScriptPreprocessor.cpp',
'ScriptPreprocessor.h',
'ScriptProfiler.cpp',
'ScriptProfiler.h',
'ScriptPromise.cpp',
'ScriptPromise.h',
'ScriptDebugServer.cpp',
'ScriptDebugServer.h',
'ScriptPromiseResolver.cpp',
'ScriptPromiseResolver.h',
'ScriptPromiseProperties.h',
'ScriptPromiseProperty.h',
'ScriptPromisePropertyBase.cpp',
'ScriptPromisePropertyBase.h',
'ScriptRegexp.cpp',
'ScriptRegexp.h',
'ScriptPromiseResolver.cpp',
'ScriptPromiseResolver.h',
'ScriptSourceCode.h',
'ScriptState.cpp',
'ScriptState.h',
......
......@@ -46,10 +46,10 @@ template("compute_interfaces_info_individual") {
inputs = [
"$bindings_scripts_dir/utilities.py",
file_list,
] + invoker.sources_static + invoker.sources_generated
outputs = [
file_list,
invoker.output_file
]
......
......@@ -43,7 +43,6 @@ source_set("prerequisites") {
":make_core_generated",
"//sky/engine/bindings/core/v8:bindings_core_v8_generated",
"//sky/engine/platform",
"inspector:protocol_sources",
]
forward_dependent_configs_from = [
......@@ -111,11 +110,6 @@ source_set("core_generated") {
# Additional .cpp files from the make_core_generated rules.
"$sky_core_output_dir/CSSGrammar.cpp",
# Additional .cpp files from the inspector_protocol_sources list.
"$sky_core_output_dir/InspectorFrontend.cpp",
"$sky_core_output_dir/InspectorBackendDispatcher.cpp",
"$sky_core_output_dir/InspectorTypeBuilder.cpp",
]
configs += [
......
......@@ -1024,45 +1024,23 @@ sky_core_files = [
"html/VoidCallback.h",
"Init.cpp",
"Init.h",
"inspector/AsyncCallStackTracker.cpp",
"inspector/AsyncCallStackTracker.h",
"inspector/BindingVisitors.h",
"inspector/ConsoleAPITypes.h",
"inspector/ConsoleMessage.cpp",
"inspector/ConsoleMessage.h",
"inspector/ConsoleMessageStorage.cpp",
"inspector/ConsoleMessageStorage.h",
"inspector/ContentSearchUtils.cpp",
"inspector/ContentSearchUtils.h",
"inspector/IdentifiersFactory.cpp",
"inspector/IdentifiersFactory.h",
"inspector/InjectedScript.cpp",
"inspector/InjectedScript.h",
"inspector/InjectedScriptBase.cpp",
"inspector/InjectedScriptBase.h",
"inspector/InjectedScriptHost.cpp",
"inspector/InjectedScriptHost.h",
"inspector/InjectedScriptManager.cpp",
"inspector/InjectedScriptManager.h",
"inspector/InspectorBaseAgent.cpp",
"inspector/InspectorBaseAgent.h",
"inspector/InspectorCounters.cpp",
"inspector/InspectorCounters.h",
"inspector/InspectorDebuggerAgent.cpp",
"inspector/InspectorDebuggerAgent.h",
"inspector/InspectorFrontendChannel.h",
"inspector/InspectorNodeIds.cpp",
"inspector/InspectorNodeIds.h",
"inspector/InspectorState.cpp",
"inspector/InspectorState.h",
"inspector/InspectorTraceEvents.cpp",
"inspector/InspectorTraceEvents.h",
"inspector/JavaScriptCallFrame.cpp",
"inspector/JavaScriptCallFrame.h",
"inspector/JSONParser.cpp",
"inspector/JSONParser.h",
"inspector/PromiseTracker.cpp",
"inspector/PromiseTracker.h",
"inspector/ScriptArguments.cpp",
"inspector/ScriptArguments.h",
"inspector/ScriptAsyncCallStack.cpp",
......@@ -1072,8 +1050,6 @@ sky_core_files = [
"inspector/ScriptCallStack.cpp",
"inspector/ScriptCallStack.h",
"inspector/ScriptGCEventListener.h",
"inspector/ScriptProfile.cpp",
"inspector/ScriptProfile.h",
"loader/DocumentLoadTiming.cpp",
"loader/DocumentLoadTiming.h",
"loader/EmptyClients.cpp",
......
......@@ -115,7 +115,6 @@
#include "sky/engine/core/inspector/ConsoleMessage.h"
#include "sky/engine/core/inspector/InspectorCounters.h"
#include "sky/engine/core/inspector/InspectorTraceEvents.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/loader/FrameLoaderClient.h"
#include "sky/engine/core/loader/ImageLoader.h"
#include "sky/engine/core/page/Chrome.h"
......@@ -137,6 +136,7 @@
#include "sky/engine/platform/text/SegmentedString.h"
#include "sky/engine/platform/weborigin/SchemeRegistry.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/CurrentTime.h"
#include "sky/engine/wtf/DateMath.h"
#include "sky/engine/wtf/HashFunctions.h"
......
......@@ -36,10 +36,10 @@
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/inspector/ConsoleAPITypes.h"
#include "sky/engine/core/inspector/ScriptArguments.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/page/Chrome.h"
#include "sky/engine/core/page/ChromeClient.h"
#include "sky/engine/platform/TraceEvent.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/text/CString.h"
#include "sky/engine/wtf/text/WTFString.h"
......
......@@ -35,11 +35,11 @@
#include "sky/engine/core/inspector/ConsoleMessage.h"
#include "sky/engine/core/inspector/ConsoleMessageStorage.h"
#include "sky/engine/core/inspector/ScriptArguments.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/page/Chrome.h"
#include "sky/engine/core/page/ChromeClient.h"
#include "sky/engine/core/page/Page.h"
#include "sky/engine/platform/network/ResourceResponse.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/text/StringBuilder.h"
namespace blink {
......
......@@ -69,7 +69,6 @@
#include "sky/engine/core/inspector/ConsoleMessage.h"
#include "sky/engine/core/inspector/ConsoleMessageStorage.h"
#include "sky/engine/core/inspector/InspectorTraceEvents.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/loader/FrameLoaderClient.h"
#include "sky/engine/core/page/Chrome.h"
#include "sky/engine/core/page/ChromeClient.h"
......@@ -84,6 +83,7 @@
#include "sky/engine/platform/weborigin/KURL.h"
#include "sky/engine/platform/weborigin/SecurityPolicy.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/MainThread.h"
#include "sky/engine/wtf/MathExtras.h"
#include "sky/engine/wtf/text/WTFString.h"
......
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//sky/engine/bindings/bindings.gni")
import("//sky/engine/core/core.gni")
protocol_file = "protocol.json"
action("protocol_sources") {
script = "CodeGeneratorInspector.py"
inputs = [
# The helper script imported by CodeGeneratorInspector.py.
"CodeGeneratorInspectorStrings.py",
protocol_file,
]
outputs = [
"$sky_core_output_dir/InspectorBackendDispatcher.cpp",
"$sky_core_output_dir/InspectorBackendDispatcher.h",
"$sky_core_output_dir/InspectorFrontend.cpp",
"$sky_core_output_dir/InspectorFrontend.h",
"$sky_core_output_dir/InspectorTypeBuilder.cpp",
"$sky_core_output_dir/InspectorTypeBuilder.h",
]
args = [
rebase_path(protocol_file, root_build_dir),
"--output_dir", rebase_path(sky_core_output_dir, root_build_dir),
]
deps = [
":protocol_version",
]
}
action("protocol_version") {
script = "generate-inspector-protocol-version"
inputs = [ protocol_file ]
output_file = "$sky_core_output_dir/InspectorProtocolVersion.h"
outputs = [ output_file ]
args = [
"-o", rebase_path(output_file, root_build_dir),
rebase_path(protocol_file, root_build_dir),
]
}
\ No newline at end of file
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_BINDINGVISITORS_H_
#define SKY_ENGINE_CORE_INSPECTOR_BINDINGVISITORS_H_
namespace WTF {
class ArrayBufferView;
class StringImpl;
}
namespace blink {
class Node;
class WrappedNodeVisitor {
public:
virtual void visitNode(Node*) = 0;
protected:
virtual ~WrappedNodeVisitor() { }
};
class ExternalStringVisitor {
public:
virtual void visitJSExternalString(WTF::StringImpl*) = 0;
protected:
virtual ~ExternalStringVisitor() { }
};
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_BINDINGVISITORS_H_
......@@ -31,9 +31,9 @@
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
#include "sky/engine/core/inspector/InspectorDebuggerAgent.h"
#include "sky/engine/core/inspector/InstrumentingAgents.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/v8_inspector/InspectorDebuggerAgent.h"
#include "sky/engine/v8_inspector/InstrumentingAgents.h"
#include "sky/engine/wtf/RefPtr.h"
#include "sky/engine/wtf/text/StringBuilder.h"
......
......@@ -5,11 +5,7 @@
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InspectorNodeIds.h"
#if ENABLE(OILPAN)
#include "sky/engine/core/dom/Node.h"
#else
#include "sky/engine/core/dom/WeakNodeMap.h"
#endif
#include "sky/engine/platform/heap/Handle.h"
namespace blink {
......
......@@ -15,7 +15,6 @@
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/inspector/IdentifiersFactory.h"
#include "sky/engine/core/inspector/InspectorNodeIds.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/page/Page.h"
#include "sky/engine/core/rendering/RenderImage.h"
#include "sky/engine/core/rendering/RenderObject.h"
......@@ -24,6 +23,7 @@
#include "sky/engine/platform/network/ResourceRequest.h"
#include "sky/engine/platform/network/ResourceResponse.h"
#include "sky/engine/platform/weborigin/KURL.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/wtf/Vector.h"
namespace blink {
......
......@@ -55,15 +55,4 @@ ScriptCallFrame::~ScriptCallFrame()
{
}
PassRefPtr<TypeBuilder::Console::CallFrame> ScriptCallFrame::buildInspectorObject() const
{
return TypeBuilder::Console::CallFrame::create()
.setFunctionName(m_functionName)
.setScriptId(m_scriptId)
.setUrl(m_scriptName)
.setLineNumber(m_lineNumber)
.setColumnNumber(m_column)
.release();
}
} // namespace blink
......@@ -31,13 +31,12 @@
#ifndef SKY_ENGINE_CORE_INSPECTOR_SCRIPTCALLFRAME_H_
#define SKY_ENGINE_CORE_INSPECTOR_SCRIPTCALLFRAME_H_
#include "gen/sky/core/InspectorTypeBuilder.h"
#include "sky/engine/wtf/Forward.h"
#include "sky/engine/wtf/text/WTFString.h"
namespace blink {
class ScriptCallFrame {
class ScriptCallFrame {
public:
ScriptCallFrame();
ScriptCallFrame(const String& functionName, const String& scriptId, const String& scriptName, unsigned lineNumber, unsigned column = 0);
......@@ -49,8 +48,6 @@ public:
unsigned lineNumber() const { return m_lineNumber; }
unsigned columnNumber() const { return m_column; }
PassRefPtr<TypeBuilder::Console::CallFrame> buildInspectorObject() const;
private:
String m_functionName;
String m_scriptId;
......
......@@ -68,12 +68,4 @@ void ScriptCallStack::setAsyncCallStack(PassRefPtr<ScriptAsyncCallStack> asyncCa
m_asyncCallStack = asyncCallStack;
}
PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > ScriptCallStack::buildInspectorArray() const
{
RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > frames = TypeBuilder::Array<TypeBuilder::Console::CallFrame>::create();
for (size_t i = 0; i < m_frames.size(); i++)
frames->addItem(m_frames.at(i).buildInspectorObject());
return frames;
}
} // namespace blink
......@@ -31,7 +31,6 @@
#ifndef SKY_ENGINE_CORE_INSPECTOR_SCRIPTCALLSTACK_H_
#define SKY_ENGINE_CORE_INSPECTOR_SCRIPTCALLSTACK_H_
#include "gen/sky/core/InspectorTypeBuilder.h"
#include "sky/engine/core/inspector/ScriptCallFrame.h"
#include "sky/engine/platform/heap/Handle.h"
#include "sky/engine/wtf/Forward.h"
......@@ -55,8 +54,6 @@ public:
PassRefPtr<ScriptAsyncCallStack> asyncCallStack() const;
void setAsyncCallStack(PassRefPtr<ScriptAsyncCallStack>);
PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > buildInspectorArray() const;
private:
explicit ScriptCallStack(Vector<ScriptCallFrame>&);
......
......@@ -29,7 +29,7 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/AsyncCallStackTracker.h"
#include "sky/engine/v8_inspector/AsyncCallStackTracker.h"
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/bindings/core/v8/V8RecursionScope.h"
......
......@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_ASYNCCALLSTACKTRACKER_H_
#define SKY_ENGINE_CORE_INSPECTOR_ASYNCCALLSTACKTRACKER_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_ASYNCCALLSTACKTRACKER_H_
#define SKY_ENGINE_V8_INSPECTOR_ASYNCCALLSTACKTRACKER_H_
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/core/dom/ContextLifecycleObserver.h"
......@@ -158,4 +158,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_ASYNCCALLSTACKTRACKER_H_
#endif // SKY_ENGINE_V8_INSPECTOR_ASYNCCALLSTACKTRACKER_H_
......@@ -7,10 +7,13 @@ import("//sky/engine/config.gni")
visibility = ["//sky/*"]
gen_dir = "$root_gen_dir/v8_inspector"
component("v8_inspector") {
output_name = "v8_inspector"
deps = [
":protocol_sources",
"//base",
"//mojo/public/cpp/application",
"//mojo/public/interfaces/application",
......@@ -18,6 +21,7 @@ component("v8_inspector") {
"//sky/engine/platform", # FIXME: Remove.
"//sky/services/inspector:bindings",
"//sky/engine/core:core_generated", # FIXME: Remove.
"//sky/engine/wtf",
]
configs += [
......@@ -27,11 +31,91 @@ component("v8_inspector") {
]
sources = [
"AsyncCallStackTracker.cpp",
"AsyncCallStackTracker.h",
"ContentSearchUtils.cpp",
"ContentSearchUtils.h",
"InjectedScript.cpp",
"InjectedScript.h",
"InjectedScriptBase.cpp",
"InjectedScriptBase.h",
"InjectedScriptManager.cpp",
"InjectedScriptManager.h",
"inspector_backend_mojo.cc",
"inspector_backend_mojo.h",
"inspector_host.h",
"InspectorBaseAgent.cpp",
"InspectorBaseAgent.h",
"InspectorDebuggerAgent.cpp",
"InspectorDebuggerAgent.h",
"InspectorFrontendChannel.h",
"InspectorState.cpp",
"InspectorState.h",
"InstrumentingAgents.h",
"JSONParser.cpp",
"JSONParser.h",
"PageDebuggerAgent.cpp",
"PageDebuggerAgent.h",
"PageScriptDebugServer.cpp",
"PageScriptDebugServer.h",
"PromiseTracker.cpp",
"PromiseTracker.h",
"ScriptBreakpoint.h",
"ScriptDebugListener.h",
"ScriptDebugServer.cpp",
"ScriptDebugServer.h",
"ScriptPreprocessor.cpp",
"ScriptPreprocessor.h",
"ScriptRegexp.cpp",
"ScriptRegexp.h",
]
# TODO(eseidel): These should be compiled in a separate _generated target.
sources += [
"$gen_dir/InspectorFrontend.cpp",
"$gen_dir/InspectorBackendDispatcher.cpp",
"$gen_dir/InspectorTypeBuilder.cpp",
]
}
protocol_file = "protocol.json"
action("protocol_sources") {
script = "CodeGeneratorInspector.py"
inputs = [
# The helper script imported by CodeGeneratorInspector.py.
"CodeGeneratorInspectorStrings.py",
protocol_file,
]
outputs = [
"$gen_dir/InspectorBackendDispatcher.cpp",
"$gen_dir/InspectorBackendDispatcher.h",
"$gen_dir/InspectorFrontend.cpp",
"$gen_dir/InspectorFrontend.h",
"$gen_dir/InspectorTypeBuilder.cpp",
"$gen_dir/InspectorTypeBuilder.h",
]
args = [
rebase_path(protocol_file, root_build_dir),
"--output_dir", rebase_path(gen_dir, root_build_dir),
]
deps = [
":protocol_version",
]
}
action("protocol_version") {
script = "generate-inspector-protocol-version"
inputs = [ protocol_file ]
output_file = "$gen_dir/InspectorProtocolVersion.h"
outputs = [ output_file ]
args = [
"-o", rebase_path(output_file, root_build_dir),
rebase_path(protocol_file, root_build_dir),
]
}
......@@ -96,11 +96,11 @@ frontend_h = (
"""#ifndef InspectorFrontend_h
#define InspectorFrontend_h
#include "InspectorTypeBuilder.h"
#include "core/inspector/InspectorFrontendChannel.h"
#include "platform/JSONValues.h"
#include "wtf/PassRefPtr.h"
#include "wtf/text/WTFString.h"
#include "gen/v8_inspector/InspectorTypeBuilder.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/text/WTFString.h"
#include "sky/engine/v8_inspector/InspectorFrontendChannel.h"
namespace blink {
......@@ -124,12 +124,11 @@ backend_h = (
"""#ifndef InspectorBackendDispatcher_h
#define InspectorBackendDispatcher_h
#include "InspectorTypeBuilder.h"
#include "gen/v8_inspector/InspectorTypeBuilder.h"
#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/text/WTFString.h"
namespace blink {
......@@ -208,14 +207,14 @@ private:
backend_cpp = (
"""
#include "config.h"
#include "InspectorBackendDispatcher.h"
#include "sky/engine/config.h"
#include "gen/v8_inspector/InspectorBackendDispatcher.h"
#include "core/inspector/InspectorFrontendChannel.h"
#include "core/inspector/JSONParser.h"
#include "platform/JSONValues.h"
#include "wtf/text/CString.h"
#include "wtf/text/WTFString.h"
#include "sky/engine/v8_inspector/InspectorFrontendChannel.h"
#include "sky/engine/v8_inspector/JSONParser.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/wtf/text/CString.h"
#include "sky/engine/wtf/text/WTFString.h"
namespace blink {
......@@ -516,13 +515,13 @@ void InspectorBackendDispatcher::CallbackBase::sendIfActive(PassRefPtr<JSONObjec
frontend_cpp = (
"""
#include "config.h"
#include "InspectorFrontend.h"
#include "sky/engine/config.h"
#include "gen/v8_inspector/InspectorFrontend.h"
#include "core/inspector/InspectorFrontendChannel.h"
#include "platform/JSONValues.h"
#include "wtf/text/CString.h"
#include "wtf/text/WTFString.h"
#include "sky/engine/v8_inspector/InspectorFrontendChannel.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/wtf/text/CString.h"
#include "sky/engine/wtf/text/WTFString.h"
namespace blink {
......@@ -543,9 +542,9 @@ typebuilder_h = (
#ifndef InspectorTypeBuilder_h
#define InspectorTypeBuilder_h
#include "platform/JSONValues.h"
#include "wtf/Assertions.h"
#include "wtf/PassRefPtr.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/wtf/Assertions.h"
#include "sky/engine/wtf/PassRefPtr.h"
namespace blink {
......@@ -851,10 +850,10 @@ ${typeBuilders}
typebuilder_cpp = (
"""
#include "config.h"
#include "sky/engine/config.h"
#include "InspectorTypeBuilder.h"
#include "wtf/text/CString.h"
#include "gen/v8_inspector/InspectorTypeBuilder.h"
#include "sky/engine/wtf/text/CString.h"
namespace blink {
......
......@@ -28,9 +28,9 @@
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/ContentSearchUtils.h"
#include "sky/engine/v8_inspector/ContentSearchUtils.h"
#include "sky/engine/bindings/core/v8/ScriptRegexp.h"
#include "sky/engine/v8_inspector/ScriptRegexp.h"
#include "sky/engine/wtf/Vector.h"
#include "sky/engine/wtf/text/StringBuilder.h"
......
......@@ -26,10 +26,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_CONTENTSEARCHUTILS_H_
#define SKY_ENGINE_CORE_INSPECTOR_CONTENTSEARCHUTILS_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_CONTENTSEARCHUTILS_H_
#define SKY_ENGINE_V8_INSPECTOR_CONTENTSEARCHUTILS_H_
#include "gen/sky/core/InspectorTypeBuilder.h"
#include "gen/v8_inspector/InspectorTypeBuilder.h"
#include "sky/engine/wtf/PassOwnPtr.h"
#include "sky/engine/wtf/text/TextPosition.h"
#include "sky/engine/wtf/text/WTFString.h"
......@@ -55,4 +55,4 @@ String findSourceMapURL(const String& content, MagicCommentType, bool* deprecate
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_CONTENTSEARCHUTILS_H_
#endif // SKY_ENGINE_V8_INSPECTOR_CONTENTSEARCHUTILS_H_
......@@ -31,7 +31,7 @@
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InjectedScript.h"
#include "sky/engine/v8_inspector/InjectedScript.h"
#include "sky/engine/bindings/core/v8/ScriptFunctionCall.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
......
......@@ -28,14 +28,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPT_H_
#define SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPT_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPT_H_
#define SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPT_H_
#include "gen/sky/core/InspectorTypeBuilder.h"
#include "gen/v8_inspector/InspectorTypeBuilder.h"
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/core/inspector/InjectedScriptBase.h"
#include "sky/engine/core/inspector/InjectedScriptManager.h"
#include "sky/engine/core/inspector/ScriptArguments.h"
#include "sky/engine/v8_inspector/InjectedScriptBase.h"
#include "sky/engine/v8_inspector/InjectedScriptManager.h"
#include "sky/engine/wtf/Forward.h"
#include "sky/engine/wtf/Vector.h"
......@@ -113,4 +113,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPT_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPT_H_
......@@ -31,7 +31,7 @@
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InjectedScriptBase.h"
#include "sky/engine/v8_inspector/InjectedScriptBase.h"
#include "sky/engine/bindings/core/v8/ScriptFunctionCall.h"
#include "sky/engine/core/inspector/InspectorTraceEvents.h"
......
......@@ -28,10 +28,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPTBASE_H_
#define SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPTBASE_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPTBASE_H_
#define SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPTBASE_H_
#include "gen/sky/core/InspectorTypeBuilder.h"
#include "gen/v8_inspector/InspectorTypeBuilder.h"
#include "sky/engine/bindings/core/v8/ScriptState.h"
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/wtf/Forward.h"
......@@ -74,4 +74,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPTBASE_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPTBASE_H_
......@@ -29,15 +29,15 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InjectedScriptManager.h"
#include "sky/engine/v8_inspector/InjectedScriptManager.h"
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/core/inspector/InjectedScript.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
#include "sky/engine/core/inspector/JSONParser.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/public/platform/WebData.h"
#include "sky/engine/v8_inspector/InjectedScript.h"
#include "sky/engine/v8_inspector/JSONParser.h"
#include "sky/engine/wtf/PassOwnPtr.h"
namespace blink {
......
......@@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPTMANAGER_H_
#define SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPTMANAGER_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPTMANAGER_H_
#define SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPTMANAGER_H_
#include "sky/engine/bindings/core/v8/ScriptState.h"
#include "sky/engine/wtf/Forward.h"
......@@ -90,4 +90,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INJECTEDSCRIPTMANAGER_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INJECTEDSCRIPTMANAGER_H_
......@@ -29,9 +29,9 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InspectorBaseAgent.h"
#include "sky/engine/v8_inspector/InspectorBaseAgent.h"
#include "sky/engine/core/inspector/InspectorState.h"
#include "sky/engine/v8_inspector/InspectorState.h"
#include "sky/engine/wtf/PassOwnPtr.h"
namespace blink {
......
......@@ -28,10 +28,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INSPECTORBASEAGENT_H_
#define SKY_ENGINE_CORE_INSPECTOR_INSPECTORBASEAGENT_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INSPECTORBASEAGENT_H_
#define SKY_ENGINE_V8_INSPECTOR_INSPECTORBASEAGENT_H_
#include "gen/sky/core/InspectorBackendDispatcher.h"
#include "gen/v8_inspector/InspectorBackendDispatcher.h"
#include "sky/engine/platform/heap/Handle.h"
#include "sky/engine/wtf/Forward.h"
#include "sky/engine/wtf/Vector.h"
......@@ -89,4 +89,4 @@ inline bool asBool(const bool* const b)
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INSPECTORBASEAGENT_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INSPECTORBASEAGENT_H_
......@@ -28,24 +28,23 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InspectorDebuggerAgent.h"
#include "sky/engine/v8_inspector/InspectorDebuggerAgent.h"
#include "sky/engine/bindings/core/v8/ScriptDebugServer.h"
#include "sky/engine/bindings/core/v8/ScriptRegexp.h"
#include "sky/engine/bindings/core/v8/ScriptSourceCode.h"
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/core/dom/Document.h"
#include "sky/engine/core/fetch/Resource.h"
#include "sky/engine/core/inspector/ConsoleMessage.h"
#include "sky/engine/core/inspector/ContentSearchUtils.h"
#include "sky/engine/core/inspector/InjectedScriptManager.h"
#include "sky/engine/core/inspector/InspectorState.h"
#include "sky/engine/core/inspector/JavaScriptCallFrame.h"
#include "sky/engine/core/inspector/ScriptArguments.h"
#include "sky/engine/core/inspector/ScriptAsyncCallStack.h"
#include "sky/engine/core/inspector/ScriptCallFrame.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/v8_inspector/ContentSearchUtils.h"
#include "sky/engine/v8_inspector/InjectedScriptManager.h"
#include "sky/engine/v8_inspector/InspectorState.h"
#include "sky/engine/v8_inspector/ScriptDebugServer.h"
#include "sky/engine/v8_inspector/ScriptRegexp.h"
#include "sky/engine/wtf/text/StringBuilder.h"
#include "sky/engine/wtf/text/WTFString.h"
......@@ -1004,6 +1003,29 @@ void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const
}
}
namespace {
PassRefPtr<TypeBuilder::Console::CallFrame> buildInspectorObject(const ScriptCallFrame& frame)
{
return TypeBuilder::Console::CallFrame::create()
.setFunctionName(frame.functionName())
.setScriptId(frame.scriptId())
.setUrl(frame.sourceURL())
.setLineNumber(frame.lineNumber())
.setColumnNumber(frame.columnNumber())
.release();
}
PassRefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > buildInspectorArray(const RefPtr<ScriptCallStack>& stack)
{
RefPtr<TypeBuilder::Array<TypeBuilder::Console::CallFrame> > frames = TypeBuilder::Array<TypeBuilder::Console::CallFrame>::create();
for (size_t i = 0; i < stack->size(); i++)
frames->addItem(buildInspectorObject(stack->at(i)));
return frames;
}
} // namespace
void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, const int* executionContextId, TypeBuilder::OptOutput<ScriptId>* scriptId, RefPtr<ExceptionDetails>& exceptionDetails)
{
InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);
......@@ -1030,7 +1052,7 @@ void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const Strin
exceptionDetails->setLine(lineNumberValue);
exceptionDetails->setColumn(columnNumberValue);
if (stackTraceValue && stackTraceValue->size() > 0)
exceptionDetails->setStackTrace(stackTraceValue->buildInspectorArray());
exceptionDetails->setStackTrace(buildInspectorArray(stackTraceValue));
}
void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptId, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<RemoteObject>& result, RefPtr<ExceptionDetails>& exceptionDetails)
......@@ -1065,7 +1087,7 @@ void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId&
exceptionDetails->setLine(lineNumberValue);
exceptionDetails->setColumn(columnNumberValue);
if (stackTraceValue && stackTraceValue->size() > 0)
exceptionDetails->setStackTrace(stackTraceValue->buildInspectorArray());
exceptionDetails->setStackTrace(buildInspectorArray(stackTraceValue));
}
if (asBool(doNotPauseOnExceptionsAndMuteConsole)) {
......@@ -1180,41 +1202,6 @@ PassRefPtr<StackTrace> InspectorDebuggerAgent::currentAsyncStackTrace()
return result.release();
}
static PassRefPtr<ScriptCallStack> toScriptCallStack(JavaScriptCallFrame* callFrame)
{
Vector<ScriptCallFrame> frames;
for (; callFrame; callFrame = callFrame->caller()) {
StringBuilder stringBuilder;
stringBuilder.appendNumber(callFrame->sourceID());
String scriptId = stringBuilder.toString();
// FIXME(WK62725): Debugger line/column are 0-based, while console ones are 1-based.
int line = callFrame->line() + 1;
int column = callFrame->column() + 1;
frames.append(ScriptCallFrame(callFrame->functionName(), scriptId, callFrame->scriptName(), line, column));
}
return ScriptCallStack::create(frames);
}
PassRefPtr<ScriptAsyncCallStack> InspectorDebuggerAgent::currentAsyncStackTraceForConsole()
{
if (!asyncCallStackTracker().isEnabled())
return nullptr;
const AsyncCallStackTracker::AsyncCallChain* chain = asyncCallStackTracker().currentAsyncCallChain();
if (!chain)
return nullptr;
const AsyncCallStackTracker::AsyncCallStackVector& callStacks = chain->callStacks();
if (callStacks.isEmpty())
return nullptr;
RefPtr<ScriptAsyncCallStack> result = nullptr;
for (AsyncCallStackTracker::AsyncCallStackVector::const_reverse_iterator it = callStacks.rbegin(); it != callStacks.rend(); ++it) {
RefPtr<JavaScriptCallFrame> callFrame = ScriptDebugServer::toJavaScriptCallFrameUnsafe((*it)->callFrames());
if (!callFrame)
break;
result = ScriptAsyncCallStack::create((*it)->description(), toScriptCallStack(callFrame.get()), result.release());
}
return result.release();
}
String InspectorDebuggerAgent::sourceMapURLForScript(const Script& script, CompileResult compileResult)
{
bool hasSyntaxError = compileResult != CompileSuccess;
......
......@@ -27,19 +27,19 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INSPECTORDEBUGGERAGENT_H_
#define SKY_ENGINE_CORE_INSPECTOR_INSPECTORDEBUGGERAGENT_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INSPECTORDEBUGGERAGENT_H_
#define SKY_ENGINE_V8_INSPECTOR_INSPECTORDEBUGGERAGENT_H_
#include "gen/sky/core/InspectorFrontend.h"
#include "gen/v8_inspector/InspectorFrontend.h"
#include "sky/engine/bindings/core/v8/ScriptState.h"
#include "sky/engine/core/frame/ConsoleTypes.h"
#include "sky/engine/core/inspector/AsyncCallStackTracker.h"
#include "sky/engine/core/inspector/ConsoleAPITypes.h"
#include "sky/engine/core/inspector/InjectedScript.h"
#include "sky/engine/core/inspector/InspectorBaseAgent.h"
#include "sky/engine/core/inspector/PromiseTracker.h"
#include "sky/engine/core/inspector/ScriptBreakpoint.h"
#include "sky/engine/core/inspector/ScriptDebugListener.h"
#include "sky/engine/v8_inspector/AsyncCallStackTracker.h"
#include "sky/engine/v8_inspector/InjectedScript.h"
#include "sky/engine/v8_inspector/InspectorBaseAgent.h"
#include "sky/engine/v8_inspector/PromiseTracker.h"
#include "sky/engine/v8_inspector/ScriptBreakpoint.h"
#include "sky/engine/v8_inspector/ScriptDebugListener.h"
#include "sky/engine/wtf/Forward.h"
#include "sky/engine/wtf/HashMap.h"
#include "sky/engine/wtf/PassRefPtr.h"
......@@ -192,8 +192,6 @@ public:
void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber, BreakpointSource, const String& condition = String());
void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumber, BreakpointSource);
PassRefPtr<ScriptAsyncCallStack> currentAsyncStackTraceForConsole();
protected:
explicit InspectorDebuggerAgent(InjectedScriptManager*);
......@@ -272,4 +270,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INSPECTORDEBUGGERAGENT_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INSPECTORDEBUGGERAGENT_H_
......@@ -23,8 +23,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INSPECTORFRONTENDCHANNEL_H_
#define SKY_ENGINE_CORE_INSPECTOR_INSPECTORFRONTENDCHANNEL_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INSPECTORFRONTENDCHANNEL_H_
#define SKY_ENGINE_V8_INSPECTOR_INSPECTORFRONTENDCHANNEL_H_
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/wtf/Forward.h"
......@@ -40,4 +40,4 @@ public:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INSPECTORFRONTENDCHANNEL_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INSPECTORFRONTENDCHANNEL_H_
......@@ -27,10 +27,9 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/InspectorState.h"
#include "sky/engine/v8_inspector/InspectorState.h"
// #include "core/inspector/InspectorStateClient.h"
#include "sky/engine/core/inspector/JSONParser.h"
#include "sky/engine/v8_inspector/JSONParser.h"
#include "sky/engine/wtf/PassOwnPtr.h"
namespace blink {
......
......@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_INSPECTORSTATE_H_
#define SKY_ENGINE_CORE_INSPECTOR_INSPECTORSTATE_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INSPECTORSTATE_H_
#define SKY_ENGINE_V8_INSPECTOR_INSPECTORSTATE_H_
#include "sky/engine/platform/JSONValues.h"
......@@ -114,4 +114,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INSPECTORSTATE_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INSPECTORSTATE_H_
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_CORE_INSPECTOR_INSTRUMENTINGAGENTS_H_
#define SKY_ENGINE_CORE_INSPECTOR_INSTRUMENTINGAGENTS_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_INSTRUMENTINGAGENTS_H_
#define SKY_ENGINE_V8_INSPECTOR_INSTRUMENTINGAGENTS_H_
#include "sky/engine/wtf/Noncopyable.h"
......@@ -30,4 +30,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_INSTRUMENTINGAGENTS_H_
#endif // SKY_ENGINE_V8_INSPECTOR_INSTRUMENTINGAGENTS_H_
......@@ -29,7 +29,7 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/JSONParser.h"
#include "sky/engine/v8_inspector/JSONParser.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/wtf/text/StringBuilder.h"
......
......@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_JSONPARSER_H_
#define SKY_ENGINE_CORE_INSPECTOR_JSONPARSER_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_JSONPARSER_H_
#define SKY_ENGINE_V8_INSPECTOR_JSONPARSER_H_
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/text/WTFString.h"
......@@ -42,4 +42,4 @@ PassRefPtr<JSONValue> parseJSON(const String& json);
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_JSONPARSER_H_
#endif // SKY_ENGINE_V8_INSPECTOR_JSONPARSER_H_
......@@ -35,8 +35,6 @@
#include "sky/engine/bindings/core/v8/ScriptController.h"
#include "sky/engine/bindings/core/v8/ScriptSourceCode.h"
#include "sky/engine/core/frame/FrameConsole.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/page/Page.h"
#include "sky/engine/v8_inspector/inspector_host.h"
namespace blink {
......
......@@ -31,7 +31,7 @@
#ifndef SKY_ENGINE_V8_INSPECTOR_PAGEDEBUGGERAGENT_H_
#define SKY_ENGINE_V8_INSPECTOR_PAGEDEBUGGERAGENT_H_
#include "sky/engine/core/inspector/InspectorDebuggerAgent.h"
#include "sky/engine/v8_inspector/InspectorDebuggerAgent.h"
#include "sky/engine/v8_inspector/PageScriptDebugServer.h"
// This whole file will move to namespace inspector.
......
......@@ -41,16 +41,13 @@
#include "sky/engine/core/dom/ExecutionContext.h"
#include "sky/engine/core/frame/FrameConsole.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/UseCounter.h"
#include "sky/engine/core/inspector/InspectorTraceEvents.h"
#include "sky/engine/core/inspector/ScriptDebugListener.h"
#include "sky/engine/core/page/Page.h"
#include "sky/engine/v8_inspector/inspector_host.h"
#include "sky/engine/v8_inspector/ScriptDebugListener.h"
#include "sky/engine/wtf/OwnPtr.h"
#include "sky/engine/wtf/PassOwnPtr.h"
#include "sky/engine/wtf/StdLibExtras.h"
#include "sky/engine/wtf/TemporaryChange.h"
#include "sky/engine/wtf/text/StringBuilder.h"
namespace blink {
......@@ -261,7 +258,7 @@ bool PageScriptDebugServer::canPreprocess(LocalFrame* frame)
{
ASSERT(frame);
if (!m_preprocessorSourceCode || !frame->page() || isCreatingPreprocessor)
if (!m_preprocessorSourceCode || isCreatingPreprocessor)
return false;
// We delay the creation of the preprocessor until just before the first JS from the
......@@ -306,13 +303,13 @@ void PageScriptDebugServer::clearPreprocessor()
void PageScriptDebugServer::muteWarningsAndDeprecations()
{
FrameConsole::mute();
UseCounter::muteForInspector();
// Used to mute UseCounter too.
}
void PageScriptDebugServer::unmuteWarningsAndDeprecations()
{
FrameConsole::unmute();
UseCounter::unmuteForInspector();
// Used to unmute UseCounter too.
}
} // namespace blink
......@@ -31,8 +31,8 @@
#ifndef SKY_ENGINE_V8_INSPECTOR_PAGESCRIPTDEBUGSERVER_H_
#define SKY_ENGINE_V8_INSPECTOR_PAGESCRIPTDEBUGSERVER_H_
#include "sky/engine/bindings/core/v8/ScriptDebugServer.h"
#include "sky/engine/bindings/core/v8/ScriptPreprocessor.h"
#include "sky/engine/v8_inspector/ScriptDebugServer.h"
#include "sky/engine/v8_inspector/ScriptPreprocessor.h"
#include "sky/engine/wtf/Forward.h"
#include "sky/engine/wtf/RefCounted.h"
#include "v8/include/v8.h"
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "sky/engine/config.h"
#include "sky/engine/core/inspector/PromiseTracker.h"
#include "sky/engine/v8_inspector/PromiseTracker.h"
#include "sky/engine/bindings/core/v8/ScopedPersistent.h"
#include "sky/engine/bindings/core/v8/ScriptCallStackFactory.h"
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_CORE_INSPECTOR_PROMISETRACKER_H_
#define SKY_ENGINE_CORE_INSPECTOR_PROMISETRACKER_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_PROMISETRACKER_H_
#define SKY_ENGINE_V8_INSPECTOR_PROMISETRACKER_H_
#include "sky/engine/wtf/HashMap.h"
#include "sky/engine/wtf/Noncopyable.h"
......@@ -41,4 +41,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_PROMISETRACKER_H_
#endif // SKY_ENGINE_V8_INSPECTOR_PROMISETRACKER_H_
......@@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_SCRIPTBREAKPOINT_H_
#define SKY_ENGINE_CORE_INSPECTOR_SCRIPTBREAKPOINT_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_SCRIPTBREAKPOINT_H_
#define SKY_ENGINE_V8_INSPECTOR_SCRIPTBREAKPOINT_H_
#include "sky/engine/wtf/text/WTFString.h"
......@@ -53,4 +53,4 @@ struct ScriptBreakpoint {
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_SCRIPTBREAKPOINT_H_
#endif // SKY_ENGINE_V8_INSPECTOR_SCRIPTBREAKPOINT_H_
......@@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_CORE_INSPECTOR_SCRIPTDEBUGLISTENER_H_
#define SKY_ENGINE_CORE_INSPECTOR_SCRIPTDEBUGLISTENER_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_SCRIPTDEBUGLISTENER_H_
#define SKY_ENGINE_V8_INSPECTOR_SCRIPTDEBUGLISTENER_H_
#include "sky/engine/bindings/core/v8/ScriptState.h"
......@@ -86,4 +86,4 @@ public:
} // namespace blink
#endif // SKY_ENGINE_CORE_INSPECTOR_SCRIPTDEBUGLISTENER_H_
#endif // SKY_ENGINE_V8_INSPECTOR_SCRIPTDEBUGLISTENER_H_
......@@ -29,7 +29,7 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/bindings/core/v8/ScriptDebugServer.h"
#include "sky/engine/v8_inspector/ScriptDebugServer.h"
#include "bindings/core/v8/V8JavaScriptCallFrame.h"
#include "sky/engine/bindings/core/v8/ScopedPersistent.h"
......@@ -40,10 +40,10 @@
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/bindings/core/v8/V8ScriptRunner.h"
#include "sky/engine/core/inspector/JavaScriptCallFrame.h"
#include "sky/engine/core/inspector/ScriptDebugListener.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/public/platform/WebData.h"
#include "sky/engine/v8_inspector/ScriptDebugListener.h"
#include "sky/engine/wtf/StdLibExtras.h"
#include "sky/engine/wtf/Vector.h"
#include "sky/engine/wtf/dtoa/utils.h"
......
......@@ -28,14 +28,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTDEBUGSERVER_H_
#define SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTDEBUGSERVER_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_SCRIPTDEBUGSERVER_H_
#define SKY_ENGINE_V8_INSPECTOR_SCRIPTDEBUGSERVER_H_
#include "gen/sky/core/InspectorBackendDispatcher.h"
#include "gen/v8_inspector/InspectorBackendDispatcher.h"
#include "sky/engine/bindings/core/v8/ScopedPersistent.h"
#include "sky/engine/core/inspector/ScriptBreakpoint.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/inspector/ScriptDebugListener.h"
#include "sky/engine/v8_inspector/ScriptBreakpoint.h"
#include "sky/engine/v8_inspector/ScriptDebugListener.h"
#include "sky/engine/wtf/HashMap.h"
#include "sky/engine/wtf/Noncopyable.h"
#include "sky/engine/wtf/PassOwnPtr.h"
......@@ -164,4 +164,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTDEBUGSERVER_H_
#endif // SKY_ENGINE_V8_INSPECTOR_SCRIPTDEBUGSERVER_H_
......@@ -29,7 +29,7 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/bindings/core/v8/ScriptPreprocessor.h"
#include "sky/engine/v8_inspector/ScriptPreprocessor.h"
#include "sky/engine/bindings/core/v8/ScriptController.h"
#include "sky/engine/bindings/core/v8/ScriptSourceCode.h"
......
......@@ -27,8 +27,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTPREPROCESSOR_H_
#define SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTPREPROCESSOR_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_SCRIPTPREPROCESSOR_H_
#define SKY_ENGINE_V8_INSPECTOR_SCRIPTPREPROCESSOR_H_
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/wtf/RefCounted.h"
......@@ -59,4 +59,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTPREPROCESSOR_H_
#endif // SKY_ENGINE_V8_INSPECTOR_SCRIPTPREPROCESSOR_H_
......@@ -27,7 +27,7 @@
*/
#include "sky/engine/config.h"
#include "sky/engine/bindings/core/v8/ScriptRegexp.h"
#include "sky/engine/v8_inspector/ScriptRegexp.h"
#include "sky/engine/bindings/core/v8/V8Binding.h"
#include "sky/engine/bindings/core/v8/V8PerIsolateData.h"
......
......@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTREGEXP_H_
#define SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTREGEXP_H_
#ifndef SKY_ENGINE_V8_INSPECTOR_SCRIPTREGEXP_H_
#define SKY_ENGINE_V8_INSPECTOR_SCRIPTREGEXP_H_
#include "sky/engine/bindings/core/v8/ScopedPersistent.h"
#include "sky/engine/wtf/Noncopyable.h"
......@@ -54,4 +54,4 @@ private:
} // namespace blink
#endif // SKY_ENGINE_BINDINGS_CORE_V8_SCRIPTREGEXP_H_
#endif // SKY_ENGINE_V8_INSPECTOR_SCRIPTREGEXP_H_
......@@ -7,18 +7,18 @@
#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "gen/sky/core/InspectorBackendDispatcher.h"
#include "gen/v8_inspector/InspectorBackendDispatcher.h"
#include "mojo/public/cpp/application/connect.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/public/interfaces/application/shell.mojom.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
#include "sky/engine/core/inspector/InspectorFrontendChannel.h"
#include "sky/engine/core/inspector/InspectorState.h"
#include "sky/engine/core/inspector/InstrumentingAgents.h"
#include "sky/engine/platform/JSONValues.h"
#include "sky/engine/v8_inspector/inspector_host.h"
#include "sky/engine/v8_inspector/InspectorFrontendChannel.h"
#include "sky/engine/v8_inspector/InspectorState.h"
#include "sky/engine/v8_inspector/InstrumentingAgents.h"
#include "sky/engine/v8_inspector/PageDebuggerAgent.h"
#include "sky/engine/v8_inspector/PageScriptDebugServer.h"
#include "sky/engine/v8_inspector/inspector_host.h"
namespace blink {
......
......@@ -101,7 +101,6 @@
#include "sky/engine/core/frame/Settings.h"
#include "sky/engine/core/html/HTMLAnchorElement.h"
#include "sky/engine/core/inspector/ConsoleMessage.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/core/loader/MojoLoader.h"
#include "sky/engine/core/page/Chrome.h"
#include "sky/engine/core/page/EventHandler.h"
......@@ -143,6 +142,7 @@
#include "sky/engine/public/web/WebNode.h"
#include "sky/engine/public/web/WebRange.h"
#include "sky/engine/public/web/WebScriptSource.h"
#include "sky/engine/core/inspector/ScriptCallStack.h"
#include "sky/engine/web/CompositionUnderlineVectorBuilder.h"
#include "sky/engine/web/WebViewImpl.h"
#include "sky/engine/wtf/CurrentTime.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册