Commit 81b7e77f authored by dgozman's avatar dgozman Committed by Commit bot

[inspector] Build inspector under v8_enable_inspector build flag.

- inspector becomes a dependency of v8_base;
- generated public protocol files are placed to gen/v8/include/inspector/<Domain.h>;
- added v8_enable_inspector_override to be used in embedders (gn only);
- combined public headers into v8-inspector.h and v8-inspector-protocol.h.

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2292053003
Cr-Commit-Position: refs/heads/master@{#39226}
parent a3db819c
......@@ -140,6 +140,9 @@ config("external_config") {
]
}
include_dirs = [ "include" ]
if (v8_enable_inspector_override) {
include_dirs += [ "$target_gen_dir/include" ]
}
libs = []
if (is_android && current_toolchain != host_toolchain) {
libs += [ "log" ]
......@@ -2023,6 +2026,10 @@ v8_source_set("v8_base") {
sources += [ "$target_gen_dir/debug-support.cc" ]
deps += [ ":postmortem-metadata" ]
}
if (v8_enable_inspector_override) {
deps += [ "src/inspector:inspector" ]
}
}
v8_source_set("v8_libbase") {
......
......@@ -11,10 +11,8 @@ if (is_android) {
import("//build/config/android/config.gni")
}
if (((v8_current_cpu == "x86" ||
v8_current_cpu == "x64" ||
v8_current_cpu=="x87") &&
(is_linux || is_mac)) ||
if (((v8_current_cpu == "x86" || v8_current_cpu == "x64" ||
v8_current_cpu == "x87") && (is_linux || is_mac)) ||
(v8_current_cpu == "ppc64" && is_linux)) {
v8_enable_gdbjit_default = true
}
......@@ -23,4 +21,12 @@ v8_imminent_deprecation_warnings_default = true
# Add simple extras solely for the purpose of the cctests.
v8_extra_library_files = [ "//test/cctest/test-extra.js" ]
v8_experimental_extra_library_files = [ "//test/cctest/test-experimental-extra.js" ]
v8_experimental_extra_library_files =
[ "//test/cctest/test-experimental-extra.js" ]
declare_args() {
# Enable inspector. See include/v8-inspector.h.
v8_enable_inspector = false
}
v8_enable_inspector_override = v8_enable_inspector
......@@ -46,6 +46,7 @@
'msvs_multi_core_compile%': '1',
'mac_deployment_target%': '10.7',
'release_extra_cflags%': '',
'v8_enable_inspector%': 0,
'variables': {
'variables': {
'variables': {
......
include_rules = [
# v8-inspector-protocol.h depends on generated files under include/inspector.
"+inspector",
]
danno@chromium.org
jochen@chromium.org
per-file v8-inspector.h=dgozman@chromium.org
per-file v8-inspector.h=pfeldman@chromium.org
per-file v8-inspector-protocol.h=dgozman@chromium.org
per-file v8-inspector-protocol.h=pfeldman@chromium.org
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_V8_INSPECTOR_PROTOCOL_H_
#define V8_V8_INSPECTOR_PROTOCOL_H_
#include "inspector/Debugger.h" // NOLINT(build/include)
#include "inspector/Runtime.h" // NOLINT(build/include)
#include "inspector/Schema.h" // NOLINT(build/include)
#include "v8-inspector.h" // NOLINT(build/include)
#endif // V8_V8_INSPECTOR_PROTOCOL_H_
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_V8_INSPECTOR_H_
#define V8_V8_INSPECTOR_H_
#include <stdint.h>
#include <cctype>
#include <memory>
#include "v8.h" // NOLINT(build/include)
namespace v8_inspector {
namespace protocol {
namespace Debugger {
namespace API {
class SearchMatch;
}
}
namespace Runtime {
namespace API {
class RemoteObject;
class StackTrace;
}
}
namespace Schema {
namespace API {
class Domain;
}
}
} // namespace protocol
class V8_EXPORT StringView {
public:
StringView() : m_is8Bit(true), m_length(0), m_characters8(nullptr) {}
StringView(const uint8_t* characters, unsigned length)
: m_is8Bit(true), m_length(length), m_characters8(characters) {}
StringView(const uint16_t* characters, unsigned length)
: m_is8Bit(false), m_length(length), m_characters16(characters) {}
bool is8Bit() const { return m_is8Bit; }
unsigned length() const { return m_length; }
// TODO(dgozman): add DCHECK(m_is8Bit) to accessors once platform can be used
// here.
const uint8_t* characters8() const { return m_characters8; }
const uint16_t* characters16() const { return m_characters16; }
private:
bool m_is8Bit;
unsigned m_length;
union {
const uint8_t* m_characters8;
const uint16_t* m_characters16;
};
};
class V8_EXPORT StringBuffer {
public:
virtual ~StringBuffer() {}
virtual const StringView& string() = 0;
// This method copies contents.
static std::unique_ptr<StringBuffer> create(const StringView&);
};
class V8_EXPORT V8ContextInfo {
public:
V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId,
const StringView& humanReadableName)
: context(context),
contextGroupId(contextGroupId),
humanReadableName(humanReadableName),
hasMemoryOnConsole(false) {}
v8::Local<v8::Context> context;
// Each v8::Context is a part of a group. The group id must be non-zero.
int contextGroupId;
StringView humanReadableName;
StringView origin;
StringView auxData;
bool hasMemoryOnConsole;
private:
// Disallow copying and allocating this one.
enum NotNullTagEnum { NotNullLiteral };
void* operator new(size_t) = delete;
void* operator new(size_t, NotNullTagEnum, void*) = delete;
void* operator new(size_t, void*) = delete;
V8ContextInfo(const V8ContextInfo&) = delete;
V8ContextInfo& operator=(const V8ContextInfo&) = delete;
};
class V8_EXPORT V8StackTrace {
public:
virtual bool isEmpty() const = 0;
virtual StringView topSourceURL() const = 0;
virtual int topLineNumber() const = 0;
virtual int topColumnNumber() const = 0;
virtual StringView topScriptId() const = 0;
virtual StringView topFunctionName() const = 0;
virtual ~V8StackTrace() {}
virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
buildInspectorObject() const = 0;
virtual std::unique_ptr<StringBuffer> toString() const = 0;
// Safe to pass between threads, drops async chain.
virtual std::unique_ptr<V8StackTrace> clone() = 0;
};
class V8_EXPORT V8InspectorSession {
public:
virtual ~V8InspectorSession() {}
// Cross-context inspectable values (DOM nodes in different worlds, etc.).
class V8_EXPORT Inspectable {
public:
virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0;
virtual ~Inspectable() {}
};
virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0;
// Dispatching protocol messages.
static bool canDispatchMethod(const StringView& method);
virtual void dispatchProtocolMessage(const StringView& message) = 0;
virtual std::unique_ptr<StringBuffer> stateJSON() = 0;
virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
supportedDomains() = 0;
// Debugger actions.
virtual void schedulePauseOnNextStatement(const StringView& breakReason,
const StringView& breakDetails) = 0;
virtual void cancelPauseOnNextStatement() = 0;
virtual void breakProgram(const StringView& breakReason,
const StringView& breakDetails) = 0;
virtual void setSkipAllPauses(bool) = 0;
virtual void resume() = 0;
virtual void stepOver() = 0;
virtual std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
searchInTextByLines(const StringView& text, const StringView& query,
bool caseSensitive, bool isRegex) = 0;
// Remote objects.
virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
v8::Local<v8::Context>, v8::Local<v8::Value>,
const StringView& groupName) = 0;
virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error,
const StringView& objectId, v8::Local<v8::Value>*,
v8::Local<v8::Context>*,
std::unique_ptr<StringBuffer>* objectGroup) = 0;
virtual void releaseObjectGroup(const StringView&) = 0;
};
enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError };
class V8_EXPORT V8InspectorClient {
public:
virtual ~V8InspectorClient() {}
virtual void runMessageLoopOnPause(int contextGroupId) {}
virtual void quitMessageLoopOnPause() {}
virtual void runIfWaitingForDebugger(int contextGroupId) {}
virtual void muteMetrics(int contextGroupId) {}
virtual void unmuteMetrics(int contextGroupId) {}
virtual void beginUserGesture() {}
virtual void endUserGesture() {}
virtual std::unique_ptr<StringBuffer> valueSubtype(v8::Local<v8::Value>) {
return nullptr;
}
virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) {
return false;
}
virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; }
virtual v8::Local<v8::Context> ensureDefaultContextInGroup(
int contextGroupId) {
return v8::Local<v8::Context>();
}
virtual void beginEnsureAllContextsInGroup(int contextGroupId) {}
virtual void endEnsureAllContextsInGroup(int contextGroupId) {}
virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>,
v8::Local<v8::Object>) {}
virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType,
const StringView& message,
const StringView& url, unsigned lineNumber,
unsigned columnNumber, V8StackTrace*) {}
virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*,
v8::Local<v8::Context>) {
return v8::MaybeLocal<v8::Value>();
}
virtual void consoleTime(const StringView& title) {}
virtual void consoleTimeEnd(const StringView& title) {}
virtual void consoleTimeStamp(const StringView& title) {}
virtual double currentTimeMS() { return 0; }
typedef void (*TimerCallback)(void*);
virtual void startRepeatingTimer(double, TimerCallback, void* data) {}
virtual void cancelTimer(void* data) {}
// TODO(dgozman): this was added to support service worker shadow page. We
// should not connect at all.
virtual bool canExecuteScripts(int contextGroupId) { return true; }
};
class V8_EXPORT V8Inspector {
public:
static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*);
virtual ~V8Inspector() {}
// Contexts instrumentation.
virtual void contextCreated(const V8ContextInfo&) = 0;
virtual void contextDestroyed(v8::Local<v8::Context>) = 0;
virtual void resetContextGroup(int contextGroupId) = 0;
// Various instrumentation.
virtual void willExecuteScript(v8::Local<v8::Context>, int scriptId) = 0;
virtual void didExecuteScript(v8::Local<v8::Context>) = 0;
virtual void idleStarted() = 0;
virtual void idleFinished() = 0;
// Async stack traces instrumentation.
virtual void asyncTaskScheduled(const StringView& taskName, void* task,
bool recurring) = 0;
virtual void asyncTaskCanceled(void* task) = 0;
virtual void asyncTaskStarted(void* task) = 0;
virtual void asyncTaskFinished(void* task) = 0;
virtual void allAsyncTasksCanceled() = 0;
// Exceptions instrumentation.
virtual unsigned exceptionThrown(
v8::Local<v8::Context>, const StringView& message,
v8::Local<v8::Value> exception, const StringView& detailedMessage,
const StringView& url, unsigned lineNumber, unsigned columnNumber,
std::unique_ptr<V8StackTrace>, int scriptId) = 0;
virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId,
const StringView& message) = 0;
// Connection.
class V8_EXPORT Channel {
public:
virtual ~Channel() {}
virtual void sendProtocolResponse(int callId,
const StringView& message) = 0;
virtual void sendProtocolNotification(const StringView& message) = 0;
virtual void flushProtocolNotifications() = 0;
};
virtual std::unique_ptr<V8InspectorSession> connect(
int contextGroupId, Channel*, const StringView& state) = 0;
// API methods.
virtual std::unique_ptr<V8StackTrace> createStackTrace(
v8::Local<v8::StackTrace>) = 0;
virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
};
} // namespace v8_inspector
#endif // V8_V8_INSPECTOR_H_
......@@ -2,57 +2,98 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
protocol_path = "//third_party/WebKit/Source/platform/inspector_protocol"
protocol_sources = [
"$target_gen_dir/Console.cpp",
"$target_gen_dir/Console.h",
"$target_gen_dir/Debugger.cpp",
"$target_gen_dir/Debugger.h",
"$target_gen_dir/HeapProfiler.cpp",
"$target_gen_dir/HeapProfiler.h",
"$target_gen_dir/Profiler.cpp",
"$target_gen_dir/Profiler.h",
"$target_gen_dir/public/Debugger.h",
"$target_gen_dir/public/Runtime.h",
"$target_gen_dir/Runtime.cpp",
"$target_gen_dir/Runtime.h",
import("../../gni/v8.gni")
_inspector_protocol = "//third_party/WebKit/Source/platform/inspector_protocol"
import("$_inspector_protocol/inspector_protocol.gni")
_protocol_generated = [
"protocol/Forward.h",
"protocol/Protocol.cpp",
"protocol/Protocol.h",
"protocol/Console.cpp",
"protocol/Console.h",
"protocol/Debugger.cpp",
"protocol/Debugger.h",
"protocol/HeapProfiler.cpp",
"protocol/HeapProfiler.h",
"protocol/Profiler.cpp",
"protocol/Profiler.h",
"protocol/Runtime.cpp",
"protocol/Runtime.h",
"protocol/Schema.cpp",
"protocol/Schema.h",
"../../include/inspector/Debugger.h",
"../../include/inspector/Runtime.h",
"../../include/inspector/Schema.h",
]
action("inspector_protocol_sources") {
action("protocol_compatibility") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
script = "$protocol_path/CodeGenerator.py"
sources = [
"$protocol_path/CodeGenerator.py",
"$protocol_path/Exported_h.template",
"$protocol_path/Imported_h.template",
"$protocol_path/TypeBuilder_cpp.template",
"$protocol_path/TypeBuilder_h.template",
]
script = "$_inspector_protocol/CheckProtocolCompatibility.py"
inputs = [
"js_protocol.json",
]
outputs = protocol_sources
_stamp = "$target_gen_dir/js_protocol.stamp"
outputs = [
_stamp,
]
args = [
"--protocol",
"--stamp",
rebase_path(_stamp, root_build_dir),
rebase_path("js_protocol.json", root_build_dir),
"--string_type",
"String16",
"--export_macro",
"PLATFORM_EXPORT",
"--output_dir",
rebase_path(target_gen_dir, root_build_dir),
"--output_package",
"inspector",
"--exported_dir",
rebase_path("$target_gen_dir/public", root_build_dir),
"--exported_package",
"inspector/public",
]
}
config("inspector_protocol_config") {
include_dirs = [ "$protocol_path/../.." ]
defines = [ "V8_INSPECTOR_USE_STL" ]
inspector_protocol_generate("protocol_generated_sources") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
deps = [
":protocol_compatibility",
]
out_dir = target_gen_dir
config_file = "inspector_protocol_config.json"
inputs = [
"js_protocol.json",
"inspector_protocol_config.json",
]
outputs = _protocol_generated
}
action("inspector_injected_script") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
script = "build/xxd.py"
inputs = [
"InjectedScriptSource.js",
]
outputs = [
"$target_gen_dir/InjectedScriptSource.h",
]
args = [
"InjectedScriptSource_js",
rebase_path("InjectedScriptSource.js", root_build_dir),
rebase_path("$target_gen_dir/InjectedScriptSource.h", root_build_dir),
]
}
action("inspector_debugger_script") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
script = "build/xxd.py"
inputs = [
"DebuggerScript.js",
]
outputs = [
"$target_gen_dir/DebuggerScript.h",
]
args = [
"DebuggerScript_js",
rebase_path("DebuggerScript.js", root_build_dir),
rebase_path("$target_gen_dir/DebuggerScript.h", root_build_dir),
]
}
config("inspector_config") {
visibility = [ ":*" ] # Only targets in this file can depend on this.
cflags = []
if (is_win) {
cflags += [
......@@ -64,38 +105,90 @@ config("inspector_protocol_config") {
"/wd4996", # Deprecated function call.
]
}
if (is_component_build) {
defines = [
"V8_SHARED",
"BUILDING_V8_SHARED",
]
}
}
source_set("inspector_protocol") {
v8_source_set("inspector") {
deps = [
":inspector_protocol_sources",
":inspector_debugger_script",
":inspector_injected_script",
":protocol_generated_sources",
]
configs = [ ":inspector_config" ]
include_dirs = [
"../..",
"../../include",
"$target_gen_dir/../..",
"$target_gen_dir/../../include",
]
sources = rebase_path(_protocol_generated, ".", target_gen_dir)
sources += [
"../../include/v8-inspector-protocol.h",
"../../include/v8-inspector.h",
]
sources += get_target_outputs(":inspector_injected_script")
sources += get_target_outputs(":inspector_debugger_script")
sources += [
"Allocator.h",
"Atomics.h",
"InjectedScript.cpp",
"InjectedScript.h",
"InjectedScriptNative.cpp",
"InjectedScriptNative.h",
"InspectedContext.cpp",
"InspectedContext.h",
"JavaScriptCallFrame.cpp",
"JavaScriptCallFrame.h",
"ProtocolPlatform.h",
"RemoteObjectId.cpp",
"RemoteObjectId.h",
"ScriptBreakpoint.h",
"SearchUtil.cpp",
"SearchUtil.h",
"String16.cpp",
"String16.h",
"StringUtil.cpp",
"StringUtil.h",
"V8Console.cpp",
"V8Console.h",
"V8ConsoleAgentImpl.cpp",
"V8ConsoleAgentImpl.h",
"V8ConsoleMessage.cpp",
"V8ConsoleMessage.h",
"V8Debugger.cpp",
"V8Debugger.h",
"V8DebuggerAgentImpl.cpp",
"V8DebuggerAgentImpl.h",
"V8DebuggerScript.cpp",
"V8DebuggerScript.h",
"V8FunctionCall.cpp",
"V8FunctionCall.h",
"V8HeapProfilerAgentImpl.cpp",
"V8HeapProfilerAgentImpl.h",
"V8InjectedScriptHost.cpp",
"V8InjectedScriptHost.h",
"V8InspectorImpl.cpp",
"V8InspectorImpl.h",
"V8InspectorSessionImpl.cpp",
"V8InspectorSessionImpl.h",
"V8InternalValueType.cpp",
"V8InternalValueType.h",
"V8ProfilerAgentImpl.cpp",
"V8ProfilerAgentImpl.h",
"V8Regex.cpp",
"V8Regex.h",
"V8RuntimeAgentImpl.cpp",
"V8RuntimeAgentImpl.h",
"V8SchemaAgentImpl.cpp",
"V8SchemaAgentImpl.h",
"V8StackTraceImpl.cpp",
"V8StackTraceImpl.h",
"V8ValueCopier.cpp",
"V8ValueCopier.h",
]
configs += [ ":inspector_protocol_config" ]
include_dirs = [ "$target_gen_dir/.." ]
sources = protocol_sources + [
"$protocol_path/Allocator.h",
"$protocol_path/Array.h",
"$protocol_path/BackendCallback.h",
"$protocol_path/CodeGenerator.py",
"$protocol_path/Collections.h",
"$protocol_path/DispatcherBase.cpp",
"$protocol_path/DispatcherBase.h",
"$protocol_path/ErrorSupport.cpp",
"$protocol_path/ErrorSupport.h",
"$protocol_path/FrontendChannel.h",
"$protocol_path/Maybe.h",
"$protocol_path/Object.cpp",
"$protocol_path/Object.h",
"$protocol_path/Parser.cpp",
"$protocol_path/Parser.h",
"$protocol_path/Platform.h",
"$protocol_path/PlatformSTL.h",
"$protocol_path/String16.cpp",
"$protocol_path/String16.h",
"$protocol_path/String16STL.cpp",
"$protocol_path/String16STL.h",
"$protocol_path/ValueConversions.h",
"$protocol_path/Values.cpp",
"$protocol_path/Values.h",
]
}
......@@ -35,7 +35,6 @@
#include "src/inspector/InspectedContext.h"
#include "src/inspector/RemoteObjectId.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8Console.h"
#include "src/inspector/V8FunctionCall.h"
#include "src/inspector/V8InjectedScriptHost.h"
......@@ -44,7 +43,8 @@
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/V8ValueCopier.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
namespace v8_inspector {
......
......@@ -39,7 +39,7 @@
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......@@ -118,7 +118,7 @@ class InjectedScript final {
protected:
Scope(ErrorString*, V8InspectorImpl*, int contextGroupId);
~Scope();
virtual ~Scope();
virtual void findInjectedScript(V8InspectorSessionImpl*) = 0;
ErrorString* m_errorString;
......
......@@ -7,7 +7,8 @@
#include "src/inspector/protocol/Protocol.h"
#include <v8.h>
#include "include/v8.h"
#include <vector>
namespace v8_inspector {
......
......@@ -9,8 +9,8 @@
#include "src/inspector/V8Console.h"
#include "src/inspector/V8InspectorImpl.h"
#include "src/inspector/V8ValueCopier.h"
#include "src/inspector/public/V8ContextInfo.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
namespace v8_inspector {
......
......@@ -8,7 +8,7 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/String16.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -31,9 +31,8 @@
#include "src/inspector/JavaScriptCallFrame.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include <v8-debug.h>
#include "include/v8-debug.h"
namespace v8_inspector {
......
......@@ -34,7 +34,8 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/ProtocolPlatform.h"
#include <v8.h>
#include "include/v8.h"
#include <vector>
namespace v8_inspector {
......
set noparent
alph@chromium.org
caseq@chromium.org
dgozman@chromium.org
jochen@chromium.org
kozyatinskiy@chromium.org
pfeldman@chromium.org
yangguo@chromium.org
# Changes to remote debugging protocol require devtools review to
# ensure backwards compatibility and committment to maintain.
per-file js_protocol.json=set noparent
per-file js_protocol.json=dgozman@chromium.org
per-file js_protocol.json=pfeldman@chromium.org
......@@ -5,11 +5,17 @@
#ifndef V8_INSPECTOR_PROTOCOLPLATFORM_H_
#define V8_INSPECTOR_PROTOCOLPLATFORM_H_
// TODO(dgozman): this file should be removed from v8_inspector.
#include <memory>
//#include "wtf/Assertions.h"
//#include "wtf/PtrUtil.h"
#include "src/base/logging.h"
#include <memory>
namespace v8_inspector {
template <typename T>
std::unique_ptr<T> wrapUnique(T* ptr) {
return std::unique_ptr<T>(ptr);
}
} // namespace v8_inspector
#endif // V8_INSPECTOR_PROTOCOLPLATFORM_H_
......@@ -107,7 +107,7 @@ std::unique_ptr<protocol::Value> toProtocolValue(v8::Local<v8::Context> context,
v8::Local<v8::Value> value,
int maxDepth) {
if (value.IsEmpty()) {
NOTREACHED();
UNREACHABLE();
return nullptr;
}
......@@ -172,7 +172,7 @@ std::unique_ptr<protocol::Value> toProtocolValue(v8::Local<v8::Context> context,
}
return std::move(jsonObject);
}
NOTREACHED();
UNREACHABLE();
return nullptr;
}
......
......@@ -7,10 +7,8 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/String16.h"
#include "src/inspector/public/StringBuffer.h"
#include "src/inspector/public/StringView.h"
#include <v8.h>
#include "include/v8-inspector.h"
namespace v8_inspector {
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_V8COMPAT_H_
#define V8_INSPECTOR_V8COMPAT_H_
#include <v8.h>
#if V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION < 1)
namespace v8 {
// In standalone V8 inspector this is expected to be noop anyways...
class V8_EXPORT MicrotasksScope {
public:
enum Type { kRunMicrotasks, kDoNotRunMicrotasks };
MicrotasksScope(Isolate* isolate, Type type) {
// No-op
}
};
} // namespace v8
#define V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, data, length) \
v8::Function::New((context), (callback), (data), (length))
#else
#define V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, data, length) \
v8::Function::New((context), (callback), (data), (length), \
v8::ConstructorBehavior::kThrow)
#endif // V8_MAJOR_VERSION < 5 || (V8_MAJOR_VERSION == 5 && V8_MINOR_VERSION <
// 1)
#endif // V8_INSPECTOR_V8COMPAT_H_
......@@ -4,10 +4,10 @@
#include "src/inspector/V8Console.h"
#include "src/base/macros.h"
#include "src/inspector/InjectedScript.h"
#include "src/inspector/InspectedContext.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8ConsoleMessage.h"
#include "src/inspector/V8DebuggerAgentImpl.h"
#include "src/inspector/V8InspectorImpl.h"
......@@ -16,7 +16,8 @@
#include "src/inspector/V8RuntimeAgentImpl.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/V8ValueCopier.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
namespace v8_inspector {
......@@ -254,7 +255,8 @@ void createBoundFunctionProperty(v8::Local<v8::Context> context,
v8::Local<v8::String> funcName =
toV8StringInternalized(context->GetIsolate(), name);
v8::Local<v8::Function> func;
if (!V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, console, 0)
if (!v8::Function::New(context, callback, console, 0,
v8::ConstructorBehavior::kThrow)
.ToLocal(&func))
return;
func->SetName(funcName);
......@@ -262,8 +264,8 @@ void createBoundFunctionProperty(v8::Local<v8::Context> context,
v8::Local<v8::String> returnValue =
toV8String(context->GetIsolate(), description);
v8::Local<v8::Function> toStringFunction;
if (V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, returnDataCallback,
returnValue, 0)
if (v8::Function::New(context, returnDataCallback, returnValue, 0,
v8::ConstructorBehavior::kThrow)
.ToLocal(&toStringFunction))
createDataProperty(context, func, toV8StringInternalized(
context->GetIsolate(), "toString"),
......@@ -661,6 +663,7 @@ v8::Local<v8::Object> V8Console::createConsole(
bool success =
console->SetPrototype(context, v8::Object::New(isolate)).FromMaybe(false);
DCHECK(success);
USE(success);
createBoundFunctionProperty(context, console, "debug",
V8Console::debugCallback);
......@@ -710,11 +713,12 @@ v8::Local<v8::Object> V8Console::createConsole(
if (hasMemoryAttribute)
console->SetAccessorProperty(
toV8StringInternalized(isolate, "memory"),
V8_FUNCTION_NEW_REMOVE_PROTOTYPE(
context, V8Console::memoryGetterCallback, console, 0)
v8::Function::New(context, V8Console::memoryGetterCallback, console, 0,
v8::ConstructorBehavior::kThrow)
.ToLocalChecked(),
V8_FUNCTION_NEW_REMOVE_PROTOTYPE(
context, V8Console::memorySetterCallback, v8::Local<v8::Value>(), 0)
v8::Function::New(context, V8Console::memorySetterCallback,
v8::Local<v8::Value>(), 0,
v8::ConstructorBehavior::kThrow)
.ToLocalChecked(),
static_cast<v8::PropertyAttribute>(v8::None), v8::DEFAULT);
......@@ -741,6 +745,7 @@ v8::Local<v8::Object> V8Console::createCommandLineAPI(
bool success =
commandLineAPI->SetPrototype(context, v8::Null(isolate)).FromMaybe(false);
DCHECK(success);
USE(success);
createBoundFunctionProperty(context, commandLineAPI, "dir",
V8Console::dirCallback,
......@@ -824,6 +829,7 @@ void V8Console::CommandLineAPIScope::accessorGetterCallback(
if (scope->m_cleanup) {
bool removed = info.Holder()->Delete(context, name).FromMaybe(false);
DCHECK(removed);
USE(removed);
return;
}
v8::Local<v8::Object> commandLineAPI = scope->m_commandLineAPI;
......@@ -855,6 +861,7 @@ void V8Console::CommandLineAPIScope::accessorSetterCallback(
bool removed =
scope->m_installedMethods->Delete(context, name).FromMaybe(false);
DCHECK(removed);
USE(removed);
}
V8Console::CommandLineAPIScope::CommandLineAPIScope(
......@@ -883,6 +890,7 @@ V8Console::CommandLineAPIScope::CommandLineAPIScope(
.FromMaybe(false)) {
bool removed = m_installedMethods->Delete(context, name).FromMaybe(false);
DCHECK(removed);
USE(removed);
continue;
}
}
......@@ -901,6 +909,7 @@ V8Console::CommandLineAPIScope::~CommandLineAPIScope() {
m_context, v8::Local<v8::String>::Cast(name))
.ToLocal(&descriptor);
DCHECK(success);
USE(success);
}
}
}
......
......@@ -7,7 +7,7 @@
#include "src/inspector/Allocator.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -12,7 +12,8 @@
#include "src/inspector/V8RuntimeAgentImpl.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
namespace v8_inspector {
......@@ -307,7 +308,7 @@ void V8ConsoleMessage::reportToFrontend(protocol::Runtime::Frontend* frontend,
m_stackTrace ? m_stackTrace->buildInspectorObjectImpl() : nullptr);
return;
}
NOTREACHED();
UNREACHABLE();
}
std::unique_ptr<protocol::Runtime::RemoteObject>
......
......@@ -5,8 +5,8 @@
#ifndef V8_INSPECTOR_V8CONSOLEMESSAGE_H_
#define V8_INSPECTOR_V8CONSOLEMESSAGE_H_
#include <v8.h>
#include <deque>
#include "include/v8.h"
#include "src/inspector/protocol/Console.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
......
......@@ -7,14 +7,12 @@
#include "src/inspector/DebuggerScript.h"
#include "src/inspector/ScriptBreakpoint.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8DebuggerAgentImpl.h"
#include "src/inspector/V8InspectorImpl.h"
#include "src/inspector/V8InternalValueType.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/V8ValueCopier.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
namespace v8_inspector {
......@@ -193,7 +191,7 @@ void V8Debugger::clearBreakpoints() {
void V8Debugger::setBreakpointsActivated(bool activated) {
if (!enabled()) {
NOTREACHED();
UNREACHABLE();
return;
}
v8::HandleScope scope(m_isolate);
......@@ -260,9 +258,10 @@ void V8Debugger::breakProgram() {
v8::HandleScope scope(m_isolate);
v8::Local<v8::Function> breakFunction;
if (!V8_FUNCTION_NEW_REMOVE_PROTOTYPE(m_isolate->GetCurrentContext(),
&V8Debugger::breakProgramCallback,
v8::External::New(m_isolate, this), 0)
if (!v8::Function::New(m_isolate->GetCurrentContext(),
&V8Debugger::breakProgramCallback,
v8::External::New(m_isolate, this), 0,
v8::ConstructorBehavior::kThrow)
.ToLocal(&breakFunction))
return;
v8::Debug::Call(debuggerContext(), breakFunction).ToLocalChecked();
......@@ -593,7 +592,7 @@ void V8Debugger::handleV8AsyncTaskEvent(v8::Local<v8::Context> context,
else if (type == v8AsyncTaskEventDidHandle)
asyncTaskFinished(ptr);
else
NOTREACHED();
UNREACHABLE();
}
V8StackTraceImpl* V8Debugger::currentAsyncCallChain() {
......@@ -603,7 +602,7 @@ V8StackTraceImpl* V8Debugger::currentAsyncCallChain() {
void V8Debugger::compileDebuggerScript() {
if (!m_debuggerScript.IsEmpty()) {
NOTREACHED();
UNREACHABLE();
return;
}
......@@ -618,7 +617,7 @@ void V8Debugger::compileDebuggerScript() {
v8::Local<v8::Value> value;
if (!m_inspector->compileAndRunInternalScript(debuggerContext(), scriptValue)
.ToLocal(&value)) {
NOTREACHED();
UNREACHABLE();
return;
}
DCHECK(value->IsObject());
......@@ -633,7 +632,7 @@ v8::Local<v8::Context> V8Debugger::debuggerContext() const {
v8::MaybeLocal<v8::Value> V8Debugger::functionScopes(
v8::Local<v8::Context> context, v8::Local<v8::Function> function) {
if (!enabled()) {
NOTREACHED();
UNREACHABLE();
return v8::Local<v8::Value>::New(m_isolate, v8::Undefined(m_isolate));
}
v8::Local<v8::Value> argv[] = {function};
......@@ -714,7 +713,7 @@ v8::MaybeLocal<v8::Array> V8Debugger::internalProperties(
v8::Local<v8::Value> V8Debugger::collectionEntries(
v8::Local<v8::Context> context, v8::Local<v8::Object> object) {
if (!enabled()) {
NOTREACHED();
UNREACHABLE();
return v8::Undefined(m_isolate);
}
v8::Local<v8::Value> argv[] = {object};
......@@ -735,7 +734,7 @@ v8::Local<v8::Value> V8Debugger::collectionEntries(
v8::Local<v8::Value> V8Debugger::generatorObjectLocation(
v8::Local<v8::Context> context, v8::Local<v8::Object> object) {
if (!enabled()) {
NOTREACHED();
UNREACHABLE();
return v8::Null(m_isolate);
}
v8::Local<v8::Value> argv[] = {object};
......
......@@ -10,11 +10,10 @@
#include "src/inspector/V8DebuggerScript.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
#include "src/inspector/public/StringView.h"
#include "src/inspector/public/V8ContextInfo.h"
#include <v8-debug.h>
#include <v8.h>
#include "include/v8-debug.h"
#include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector {
......
......@@ -19,7 +19,8 @@
#include "src/inspector/V8RuntimeAgentImpl.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
#include <algorithm>
......@@ -215,7 +216,7 @@ void V8DebuggerAgentImpl::restore() {
String16 blackboxPattern;
if (m_state->getString(DebuggerAgentState::blackboxPattern,
&blackboxPattern)) {
if (!setBlackboxPattern(&error, blackboxPattern)) NOTREACHED();
if (!setBlackboxPattern(&error, blackboxPattern)) UNREACHABLE();
}
}
......
......@@ -33,7 +33,7 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/String16.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -31,12 +31,10 @@
#include "src/inspector/V8FunctionCall.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8Debugger.h"
#include "src/inspector/V8InspectorImpl.h"
#include "src/inspector/public/V8InspectorClient.h"
#include <v8.h>
#include "include/v8-inspector.h"
namespace v8_inspector {
......
......@@ -33,7 +33,7 @@
#include "src/inspector/String16.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -10,10 +10,10 @@
#include "src/inspector/V8InspectorImpl.h"
#include "src/inspector/V8InspectorSessionImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
#include <v8-profiler.h>
#include <v8-version.h>
#include "include/v8-inspector.h"
#include "include/v8-profiler.h"
#include "include/v8-version.h"
namespace v8_inspector {
......
......@@ -9,7 +9,7 @@
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/HeapProfiler.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -4,14 +4,15 @@
#include "src/inspector/V8InjectedScriptHost.h"
#include "src/base/macros.h"
#include "src/inspector/InjectedScriptNative.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8Debugger.h"
#include "src/inspector/V8InspectorImpl.h"
#include "src/inspector/V8InternalValueType.h"
#include "src/inspector/V8ValueCopier.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
namespace v8_inspector {
......@@ -24,7 +25,8 @@ void setFunctionProperty(v8::Local<v8::Context> context,
v8::Local<v8::String> funcName =
toV8StringInternalized(context->GetIsolate(), name);
v8::Local<v8::Function> func;
if (!V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, callback, external, 0)
if (!v8::Function::New(context, callback, external, 0,
v8::ConstructorBehavior::kThrow)
.ToLocal(&func))
return;
func->SetName(funcName);
......@@ -50,6 +52,7 @@ v8::Local<v8::Object> V8InjectedScriptHost::create(
bool success = injectedScriptHost->SetPrototype(context, v8::Null(isolate))
.FromMaybe(false);
DCHECK(success);
USE(success);
v8::Local<v8::External> debuggerExternal =
v8::External::New(isolate, inspector);
setFunctionProperty(context, injectedScriptHost, "internalConstructorName",
......@@ -198,7 +201,7 @@ void V8InjectedScriptHost::bindCallback(
void V8InjectedScriptHost::proxyTargetValueCallback(
const v8::FunctionCallbackInfo<v8::Value>& info) {
if (info.Length() != 1 || !info[0]->IsProxy()) {
NOTREACHED();
UNREACHABLE();
return;
}
v8::Local<v8::Object> target = info[0].As<v8::Proxy>();
......
......@@ -5,7 +5,7 @@
#ifndef V8_INSPECTOR_V8INJECTEDSCRIPTHOST_H_
#define V8_INSPECTOR_V8INJECTEDSCRIPTHOST_H_
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -30,10 +30,8 @@
#include "src/inspector/V8InspectorImpl.h"
#include <v8-profiler.h>
#include "src/inspector/InspectedContext.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8ConsoleAgentImpl.h"
#include "src/inspector/V8ConsoleMessage.h"
#include "src/inspector/V8Debugger.h"
......@@ -42,7 +40,8 @@
#include "src/inspector/V8RuntimeAgentImpl.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-profiler.h"
namespace v8_inspector {
......
......@@ -33,10 +33,10 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8Inspector.h"
#include <v8-debug.h>
#include <v8.h>
#include "include/v8-debug.h"
#include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector {
......
......@@ -18,8 +18,6 @@
#include "src/inspector/V8RuntimeAgentImpl.h"
#include "src/inspector/V8SchemaAgentImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8ContextInfo.h"
#include "src/inspector/public/V8InspectorClient.h"
namespace v8_inspector {
......
......@@ -9,10 +9,9 @@
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
#include "src/inspector/protocol/Schema.h"
#include "src/inspector/public/V8Inspector.h"
#include "src/inspector/public/V8InspectorSession.h"
#include <v8.h>
#include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector {
......
......@@ -29,7 +29,7 @@ v8::Local<v8::String> subtypeForInternalType(v8::Isolate* isolate,
case V8InternalValueType::kScopeList:
return toV8StringInternalized(isolate, "internal#scopeList");
}
NOTREACHED();
UNREACHABLE();
return v8::Local<v8::String>();
}
......
......@@ -5,7 +5,7 @@
#ifndef V8_INSPECTOR_V8INTERNALVALUETYPE_H_
#define V8_INSPECTOR_V8INTERNALVALUETYPE_H_
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -4,7 +4,6 @@
#include "src/inspector/V8ProfilerAgentImpl.h"
#include <v8-profiler.h>
#include "src/inspector/Atomics.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Debugger.h"
......@@ -13,6 +12,8 @@
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "include/v8-profiler.h"
#include <vector>
#define ENSURE_V8_VERSION(major, minor) \
......
......@@ -5,9 +5,9 @@
#include "src/inspector/V8Regex.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8InspectorImpl.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
#include <limits.h>
......
......@@ -8,7 +8,7 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/String16.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -34,7 +34,6 @@
#include "src/inspector/InspectedContext.h"
#include "src/inspector/RemoteObjectId.h"
#include "src/inspector/StringUtil.h"
#include "src/inspector/V8Compat.h"
#include "src/inspector/V8ConsoleMessage.h"
#include "src/inspector/V8Debugger.h"
#include "src/inspector/V8DebuggerAgentImpl.h"
......@@ -42,7 +41,8 @@
#include "src/inspector/V8InspectorSessionImpl.h"
#include "src/inspector/V8StackTraceImpl.h"
#include "src/inspector/protocol/Protocol.h"
#include "src/inspector/public/V8InspectorClient.h"
#include "include/v8-inspector.h"
namespace v8_inspector {
......@@ -87,14 +87,16 @@ class ProtocolPromiseHandler {
v8::Local<v8::Value> wrapper = handler->m_wrapper.Get(inspector->isolate());
v8::Local<v8::Function> thenCallbackFunction =
V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, thenCallback, wrapper, 0)
v8::Function::New(context, thenCallback, wrapper, 0,
v8::ConstructorBehavior::kThrow)
.ToLocalChecked();
if (promise->Then(context, thenCallbackFunction).IsEmpty()) {
rawCallback->sendFailure("Internal error");
return;
}
v8::Local<v8::Function> catchCallbackFunction =
V8_FUNCTION_NEW_REMOVE_PROTOTYPE(context, catchCallback, wrapper, 0)
v8::Function::New(context, catchCallback, wrapper, 0,
v8::ConstructorBehavior::kThrow)
.ToLocalChecked();
if (promise->Catch(context, catchCallbackFunction).IsEmpty()) {
rawCallback->sendFailure("Internal error");
......
......@@ -35,7 +35,7 @@
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -8,9 +8,9 @@
#include "src/inspector/V8Debugger.h"
#include "src/inspector/protocol/Protocol.h"
#include <v8-debug.h>
#include <v8-profiler.h>
#include <v8-version.h>
#include "include/v8-debug.h"
#include "include/v8-profiler.h"
#include "include/v8-version.h"
namespace v8_inspector {
......
......@@ -8,7 +8,8 @@
#include "src/inspector/Allocator.h"
#include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h"
#include "src/inspector/public/V8StackTrace.h"
#include "include/v8-inspector.h"
#include <vector>
......
......@@ -5,7 +5,7 @@
#ifndef V8_INSPECTOR_V8VALUECOPIER_H_
#define V8_INSPECTOR_V8VALUECOPIER_H_
#include <v8.h>
#include "include/v8.h"
namespace v8_inspector {
......
......@@ -2,111 +2,107 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{ 'variables': {
'protocol_path': '../../third_party/WebKit/Source/platform/inspector_protocol',
'protocol_sources': [
'<(SHARED_INTERMEDIATE_DIR)/inspector/Console.cpp',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Console.h',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Debugger.cpp',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Debugger.h',
'<(SHARED_INTERMEDIATE_DIR)/inspector/HeapProfiler.cpp',
'<(SHARED_INTERMEDIATE_DIR)/inspector/HeapProfiler.h',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Profiler.cpp',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Profiler.h',
'<(SHARED_INTERMEDIATE_DIR)/inspector/public/Debugger.h',
'<(SHARED_INTERMEDIATE_DIR)/inspector/public/Runtime.h',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Runtime.cpp',
'<(SHARED_INTERMEDIATE_DIR)/inspector/Runtime.h',
]
{
'variables': {
'protocol_path': '<(PRODUCT_DIR)/../../third_party/WebKit/Source/platform/inspector_protocol',
},
'includes': [
'inspector.gypi',
'<(PRODUCT_DIR)/../../../third_party/WebKit/Source/platform/inspector_protocol/inspector_protocol.gypi',
],
'targets': [
{ 'target_name': 'inspector_protocol_sources',
{ 'target_name': 'inspector_injected_script',
'type': 'none',
'variables': {
'jinja_module_files': [
# jinja2/__init__.py contains version string, so sufficient for package
'../third_party/jinja2/__init__.py',
'../third_party/markupsafe/__init__.py', # jinja2 dep
]
},
'actions': [
{
'action_name': 'generate_inspector_protocol_sources',
'action_name': 'convert_js_to_cpp_char_array',
'inputs': [
'build/xxd.py',
'<(inspector_injected_script_source)',
],
'outputs': [
'<(inspector_generated_injected_script)',
],
'action': [
'python',
'build/xxd.py',
'InjectedScriptSource_js',
'InjectedScriptSource.js',
'<@(_outputs)'
],
},
],
# Since this target generates header files, it needs to be a hard dependency.
'hard_dependency': 1,
},
{ 'target_name': 'inspector_debugger_script',
'type': 'none',
'actions': [
{
'action_name': 'convert_js_to_cpp_char_array',
'inputs': [
'build/xxd.py',
'<(inspector_debugger_script_source)',
],
'outputs': [
'<(inspector_generated_debugger_script)',
],
'action': [
'python',
'build/xxd.py',
'DebuggerScript_js',
'DebuggerScript.js',
'<@(_outputs)'
],
},
],
# Since this target generates header files, it needs to be a hard dependency.
'hard_dependency': 1,
},
{ 'target_name': 'protocol_compatibility',
'type': 'none',
'actions': [
{
'action_name': 'protocol_compatibility',
'inputs': [
# Source generator script.
'<(protocol_path)/CodeGenerator.py',
# Source code templates.
'<(protocol_path)/Exported_h.template',
'<(protocol_path)/Imported_h.template',
'<(protocol_path)/TypeBuilder_h.template',
'<(protocol_path)/TypeBuilder_cpp.template',
# Protocol definition.
'js_protocol.json',
],
'outputs': [
'<@(protocol_sources)',
'<@(SHARED_INTERMEDIATE_DIR)/src/js_protocol.stamp',
],
'action': [
'python',
'<(protocol_path)/CodeGenerator.py',
'--protocol', 'js_protocol.json',
'--string_type', 'String16',
'--export_macro', 'PLATFORM_EXPORT',
'--output_dir', '<(SHARED_INTERMEDIATE_DIR)/inspector',
'--output_package', 'inspector',
'--exported_dir', '<(SHARED_INTERMEDIATE_DIR)/inspector/public',
'--exported_package', 'inspector/public',
'<(protocol_path)/CheckProtocolCompatibility.py',
'--stamp', '<@(_outputs)',
'js_protocol.json',
],
'message': 'Generating Inspector protocol backend sources from json definitions',
'message': 'Generating inspector protocol sources from protocol json definition',
},
]
},
{ 'target_name': 'inspector_protocol',
'type': 'static_library',
'dependencies': [
'inspector_protocol_sources',
],
'include_dirs+': [
'<(protocol_path)/../..',
'<(SHARED_INTERMEDIATE_DIR)',
],
'defines': [
'V8_INSPECTOR_USE_STL',
],
'msvs_disabled_warnings': [
4267, # Truncation from size_t to int.
4305, # Truncation from 'type1' to 'type2'.
4324, # Struct padded due to declspec(align).
4714, # Function marked forceinline not inlined.
4800, # Value forced to bool.
4996, # Deprecated function call.
],
'sources': [
'<@(protocol_sources)',
'<(protocol_path)/Allocator.h',
'<(protocol_path)/Array.h',
'<(protocol_path)/BackendCallback.h',
'<(protocol_path)/CodeGenerator.py',
'<(protocol_path)/Collections.h',
'<(protocol_path)/DispatcherBase.cpp',
'<(protocol_path)/DispatcherBase.h',
'<(protocol_path)/ErrorSupport.cpp',
'<(protocol_path)/ErrorSupport.h',
'<(protocol_path)/FrontendChannel.h',
'<(protocol_path)/Maybe.h',
'<(protocol_path)/Object.cpp',
'<(protocol_path)/Object.h',
'<(protocol_path)/Parser.cpp',
'<(protocol_path)/Parser.h',
'<(protocol_path)/Platform.h',
'<(protocol_path)/PlatformSTL.h',
'<(protocol_path)/String16.cpp',
'<(protocol_path)/String16.h',
'<(protocol_path)/String16STL.cpp',
'<(protocol_path)/String16STL.h',
'<(protocol_path)/ValueConversions.h',
'<(protocol_path)/Values.cpp',
'<(protocol_path)/Values.h',
{ 'target_name': 'protocol_generated_sources',
'type': 'none',
'dependencies': [ 'protocol_compatibility' ],
'actions': [
{
'action_name': 'protocol_generated_sources',
'inputs': [
'js_protocol.json',
'inspector_protocol_config.json',
'<@(inspector_protocol_files)',
],
'outputs': [
'<@(inspector_generated_sources)',
],
'action': [
'python',
'<(protocol_path)/CodeGenerator.py',
'--jinja_dir', '<(PRODUCT_DIR)/../../third_party',
'--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/inspector',
'--config', 'inspector_protocol_config.json',
],
'message': 'Generating inspector protocol sources from protocol json',
},
]
},
],
......
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'inspector_generated_sources': [
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Forward.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/HeapProfiler.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Profiler.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.h',
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Debugger.h',
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Runtime.h',
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Schema.h',
],
'inspector_injected_script_source': 'InjectedScriptSource.js',
'inspector_generated_injected_script': '<(SHARED_INTERMEDIATE_DIR)/src/inspector/InjectedScriptSource.h',
'inspector_debugger_script_source': 'DebuggerScript.js',
'inspector_generated_debugger_script': '<(SHARED_INTERMEDIATE_DIR)/src/inspector/DebuggerScript.h',
'inspector_all_sources': [
'<@(inspector_generated_sources)',
'<(inspector_generated_injected_script)',
'<(inspector_generated_debugger_script)',
'../../include/v8-inspector.h',
'../../include/v8-inspector-protocol.h',
'inspector/Allocator.h',
'inspector/Atomics.h',
'inspector/InjectedScript.cpp',
'inspector/InjectedScript.h',
'inspector/InjectedScriptNative.cpp',
'inspector/InjectedScriptNative.h',
'inspector/InspectedContext.cpp',
'inspector/InspectedContext.h',
'inspector/JavaScriptCallFrame.cpp',
'inspector/JavaScriptCallFrame.h',
'inspector/ProtocolPlatform.h',
'inspector/RemoteObjectId.cpp',
'inspector/RemoteObjectId.h',
'inspector/ScriptBreakpoint.h',
'inspector/SearchUtil.cpp',
'inspector/SearchUtil.h',
'inspector/String16.cpp',
'inspector/String16.h',
'inspector/StringUtil.cpp',
'inspector/StringUtil.h',
'inspector/V8Console.cpp',
'inspector/V8Console.h',
'inspector/V8ConsoleAgentImpl.cpp',
'inspector/V8ConsoleAgentImpl.h',
'inspector/V8ConsoleMessage.cpp',
'inspector/V8ConsoleMessage.h',
'inspector/V8Debugger.cpp',
'inspector/V8Debugger.h',
'inspector/V8DebuggerAgentImpl.cpp',
'inspector/V8DebuggerAgentImpl.h',
'inspector/V8DebuggerScript.cpp',
'inspector/V8DebuggerScript.h',
'inspector/V8FunctionCall.cpp',
'inspector/V8FunctionCall.h',
'inspector/V8HeapProfilerAgentImpl.cpp',
'inspector/V8HeapProfilerAgentImpl.h',
'inspector/V8InjectedScriptHost.cpp',
'inspector/V8InjectedScriptHost.h',
'inspector/V8InspectorImpl.cpp',
'inspector/V8InspectorImpl.h',
'inspector/V8InspectorSessionImpl.cpp',
'inspector/V8InspectorSessionImpl.h',
'inspector/V8InternalValueType.cpp',
'inspector/V8InternalValueType.h',
'inspector/V8ProfilerAgentImpl.cpp',
'inspector/V8ProfilerAgentImpl.h',
'inspector/V8Regex.cpp',
'inspector/V8Regex.h',
'inspector/V8RuntimeAgentImpl.cpp',
'inspector/V8RuntimeAgentImpl.h',
'inspector/V8SchemaAgentImpl.cpp',
'inspector/V8SchemaAgentImpl.h',
'inspector/V8StackTraceImpl.cpp',
'inspector/V8StackTraceImpl.h',
'inspector/V8ValueCopier.cpp',
'inspector/V8ValueCopier.h',
]
}
}
......@@ -2,28 +2,24 @@
"protocol": {
"path": "js_protocol.json",
"package": "src/inspector/protocol",
"output": "v8_inspector/protocol",
"output": "protocol",
"namespace": ["v8_inspector", "protocol"]
},
"exported": {
"package": "src/inspector/public/protocol",
"output": "v8_inspector/public/protocol",
"string_header": "src/inspector/public/StringBuffer.h",
"package": "include/inspector",
"output": "../../include/inspector",
"string_header": "v8-inspector.h",
"string_in": "StringView",
"string_out": "std::unique_ptr<StringBuffer>",
"to_string_out": "StringBufferImpl::adopt(%s)"
"to_string_out": "StringBufferImpl::adopt(%s)",
"export_macro": "V8_EXPORT"
},
"lib": {
"package": "src/inspector/protocol",
"output": "v8_inspector/protocol",
"output": "protocol",
"string_header": "src/inspector/StringUtil.h",
"platform_header": "src/inspector/ProtocolPlatform.h"
},
"class_export": {
"macro": "PLATFORM_EXPORT",
"header": "platform/PlatformExport.h"
}
}
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_STRINGBUFFER_H_
#define V8_INSPECTOR_PUBLIC_STRINGBUFFER_H_
#include "src/inspector/public/StringView.h"
#include <memory>
namespace v8_inspector {
class PLATFORM_EXPORT StringBuffer {
public:
virtual ~StringBuffer() {}
virtual const StringView& string() = 0;
// This method copies contents.
static std::unique_ptr<StringBuffer> create(const StringView&);
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_STRINGBUFFER_H_
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_STRINGVIEW_H_
#define V8_INSPECTOR_PUBLIC_STRINGVIEW_H_
#include <stdint.h>
#include <cctype>
namespace v8_inspector {
class PLATFORM_EXPORT StringView {
public:
StringView() : m_is8Bit(true), m_length(0), m_characters8(nullptr) {}
StringView(const uint8_t* characters, unsigned length)
: m_is8Bit(true), m_length(length), m_characters8(characters) {}
StringView(const uint16_t* characters, unsigned length)
: m_is8Bit(false), m_length(length), m_characters16(characters) {}
bool is8Bit() const { return m_is8Bit; }
unsigned length() const { return m_length; }
// TODO(dgozman): add DCHECK(m_is8Bit) to accessors once platform can be used
// here.
const uint8_t* characters8() const { return m_characters8; }
const uint16_t* characters16() const { return m_characters16; }
private:
bool m_is8Bit;
unsigned m_length;
union {
const uint8_t* m_characters8;
const uint16_t* m_characters16;
};
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_STRINGVIEW_H_
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_V8CONTEXTINFO_H_
#define V8_INSPECTOR_PUBLIC_V8CONTEXTINFO_H_
#include "src/inspector/public/StringView.h"
#include <v8.h>
namespace v8_inspector {
class V8ContextInfo {
public:
V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId,
const StringView& humanReadableName)
: context(context),
contextGroupId(contextGroupId),
humanReadableName(humanReadableName),
hasMemoryOnConsole(false) {}
v8::Local<v8::Context> context;
// Each v8::Context is a part of a group. The group id is used to find
// appropriate
// V8DebuggerAgent to notify about events in the context.
// |contextGroupId| must be non-0.
int contextGroupId;
StringView humanReadableName;
StringView origin;
StringView auxData;
bool hasMemoryOnConsole;
private:
// Disallow copying and allocating this one.
enum NotNullTagEnum { NotNullLiteral };
void* operator new(size_t) = delete;
void* operator new(size_t, NotNullTagEnum, void*) = delete;
void* operator new(size_t, void*) = delete;
V8ContextInfo(const V8ContextInfo&) = delete;
V8ContextInfo& operator=(const V8ContextInfo&) = delete;
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_V8CONTEXTINFO_H_
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_V8INSPECTOR_H_
#define V8_INSPECTOR_PUBLIC_V8INSPECTOR_H_
#include "src/inspector/public/StringView.h"
#include "src/inspector/public/V8ContextInfo.h"
#include <v8.h>
namespace v8_inspector {
class V8InspectorClient;
class V8InspectorSession;
class V8StackTrace;
class PLATFORM_EXPORT V8Inspector {
public:
static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*);
virtual ~V8Inspector() {}
// Contexts instrumentation.
virtual void contextCreated(const V8ContextInfo&) = 0;
virtual void contextDestroyed(v8::Local<v8::Context>) = 0;
virtual void resetContextGroup(int contextGroupId) = 0;
// Various instrumentation.
virtual void willExecuteScript(v8::Local<v8::Context>, int scriptId) = 0;
virtual void didExecuteScript(v8::Local<v8::Context>) = 0;
virtual void idleStarted() = 0;
virtual void idleFinished() = 0;
// Async stack traces instrumentation.
virtual void asyncTaskScheduled(const StringView& taskName, void* task,
bool recurring) = 0;
virtual void asyncTaskCanceled(void* task) = 0;
virtual void asyncTaskStarted(void* task) = 0;
virtual void asyncTaskFinished(void* task) = 0;
virtual void allAsyncTasksCanceled() = 0;
// Exceptions instrumentation.
virtual unsigned exceptionThrown(
v8::Local<v8::Context>, const StringView& message,
v8::Local<v8::Value> exception, const StringView& detailedMessage,
const StringView& url, unsigned lineNumber, unsigned columnNumber,
std::unique_ptr<V8StackTrace>, int scriptId) = 0;
virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId,
const StringView& message) = 0;
// Connection.
class PLATFORM_EXPORT Channel {
public:
virtual ~Channel() {}
virtual void sendProtocolResponse(int callId,
const StringView& message) = 0;
virtual void sendProtocolNotification(const StringView& message) = 0;
virtual void flushProtocolNotifications() = 0;
};
virtual std::unique_ptr<V8InspectorSession> connect(
int contextGroupId, Channel*, const StringView& state) = 0;
// API methods.
virtual std::unique_ptr<V8StackTrace> createStackTrace(
v8::Local<v8::StackTrace>) = 0;
virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_V8INSPECTOR_H_
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_V8INSPECTORCLIENT_H_
#define V8_INSPECTOR_PUBLIC_V8INSPECTORCLIENT_H_
#include "src/inspector/public/StringBuffer.h"
#include "src/inspector/public/StringView.h"
#include <v8.h>
namespace v8_inspector {
class V8StackTrace;
enum class V8ConsoleAPIType { kClear, kDebug, kLog, kInfo, kWarning, kError };
class PLATFORM_EXPORT V8InspectorClient {
public:
virtual ~V8InspectorClient() {}
virtual void runMessageLoopOnPause(int contextGroupId) {}
virtual void quitMessageLoopOnPause() {}
virtual void runIfWaitingForDebugger(int contextGroupId) {}
virtual void muteMetrics(int contextGroupId) {}
virtual void unmuteMetrics(int contextGroupId) {}
virtual void beginUserGesture() {}
virtual void endUserGesture() {}
virtual std::unique_ptr<StringBuffer> valueSubtype(v8::Local<v8::Value>) {
return nullptr;
}
virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) {
return false;
}
virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; }
virtual v8::Local<v8::Context> ensureDefaultContextInGroup(
int contextGroupId) {
return v8::Local<v8::Context>();
}
virtual void beginEnsureAllContextsInGroup(int contextGroupId) {}
virtual void endEnsureAllContextsInGroup(int contextGroupId) {}
virtual void installAdditionalCommandLineAPI(v8::Local<v8::Context>,
v8::Local<v8::Object>) {}
virtual void consoleAPIMessage(int contextGroupId, V8ConsoleAPIType,
const StringView& message,
const StringView& url, unsigned lineNumber,
unsigned columnNumber, V8StackTrace*) {}
virtual v8::MaybeLocal<v8::Value> memoryInfo(v8::Isolate*,
v8::Local<v8::Context>) {
return v8::MaybeLocal<v8::Value>();
}
virtual void consoleTime(const StringView& title) {}
virtual void consoleTimeEnd(const StringView& title) {}
virtual void consoleTimeStamp(const StringView& title) {}
virtual double currentTimeMS() { return 0; }
typedef void (*TimerCallback)(void*);
virtual void startRepeatingTimer(double, TimerCallback, void* data) {}
virtual void cancelTimer(void* data) {}
// TODO(dgozman): this was added to support service worker shadow page. We
// should not connect at all.
virtual bool canExecuteScripts(int contextGroupId) { return true; }
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_V8INSPECTORCLIENT_H_
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_
#define V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_
#include "src/inspector/public/StringBuffer.h"
#include "src/inspector/public/StringView.h"
#include "src/inspector/public/protocol/Debugger.h"
#include "src/inspector/public/protocol/Runtime.h"
#include "src/inspector/public/protocol/Schema.h"
#include <v8.h>
namespace v8_inspector {
class PLATFORM_EXPORT V8InspectorSession {
public:
virtual ~V8InspectorSession() {}
// Cross-context inspectable values (DOM nodes in different worlds, etc.).
class Inspectable {
public:
virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0;
virtual ~Inspectable() {}
};
virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0;
// Dispatching protocol messages.
static bool canDispatchMethod(const StringView& method);
virtual void dispatchProtocolMessage(const StringView& message) = 0;
virtual std::unique_ptr<StringBuffer> stateJSON() = 0;
virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
supportedDomains() = 0;
// Debugger actions.
virtual void schedulePauseOnNextStatement(const StringView& breakReason,
const StringView& breakDetails) = 0;
virtual void cancelPauseOnNextStatement() = 0;
virtual void breakProgram(const StringView& breakReason,
const StringView& breakDetails) = 0;
virtual void setSkipAllPauses(bool) = 0;
virtual void resume() = 0;
virtual void stepOver() = 0;
virtual std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
searchInTextByLines(const StringView& text, const StringView& query,
bool caseSensitive, bool isRegex) = 0;
// Remote objects.
virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(
v8::Local<v8::Context>, v8::Local<v8::Value>,
const StringView& groupName) = 0;
virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error,
const StringView& objectId, v8::Local<v8::Value>*,
v8::Local<v8::Context>*,
std::unique_ptr<StringBuffer>* objectGroup) = 0;
virtual void releaseObjectGroup(const StringView&) = 0;
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_INSPECTOR_PUBLIC_V8STACKTRACE_H_
#define V8_INSPECTOR_PUBLIC_V8STACKTRACE_H_
#include "src/inspector/public/StringBuffer.h"
#include "src/inspector/public/StringView.h"
#include "src/inspector/public/protocol/Runtime.h"
namespace v8_inspector {
class V8StackTrace {
public:
virtual bool isEmpty() const = 0;
virtual StringView topSourceURL() const = 0;
virtual int topLineNumber() const = 0;
virtual int topColumnNumber() const = 0;
virtual StringView topScriptId() const = 0;
virtual StringView topFunctionName() const = 0;
virtual ~V8StackTrace() {}
virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
buildInspectorObject() const = 0;
virtual std::unique_ptr<StringBuffer> toString() const = 0;
// Safe to pass between threads, drops async chain.
virtual std::unique_ptr<V8StackTrace> clone() = 0;
};
} // namespace v8_inspector
#endif // V8_INSPECTOR_PUBLIC_V8STACKTRACE_H_
......@@ -34,10 +34,11 @@
'warmup_script%': "",
'v8_extra_library_files%': [],
'v8_experimental_extra_library_files%': [],
'v8_enable_inspector%': 0,
'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
'mkpeephole_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkpeephole<(EXECUTABLE_SUFFIX)',
},
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi'],
'includes': ['../gypfiles/toolchain.gypi', '../gypfiles/features.gypi', 'inspector/inspector.gypi'],
'targets': [
{
'target_name': 'v8',
......@@ -1735,6 +1736,30 @@
'i18n.h',
],
}],
['v8_enable_inspector==1', {
'sources': [
'<@(inspector_all_sources)'
],
'dependencies': [
'inspector/inspector.gyp:protocol_generated_sources',
'inspector/inspector.gyp:inspector_injected_script',
'inspector/inspector.gyp:inspector_debugger_script',
],
# TODO(dgozman): fix these warnings and enable them.
'msvs_disabled_warnings': [
4267, # Truncation from size_t to int.
4305, # Truncation from 'type1' to 'type2'.
4324, # Struct padded due to declspec(align).
4714, # Function marked forceinline not inlined.
4800, # Value forced to bool.
4996, # Deprecated function call.
],
'cflags': [
'-Wno-zero-length-array',
'-Wno-shorten-64-to-32',
'-Wno-deprecated-declarations',
],
}],
['OS=="win" and v8_enable_i18n_support==1', {
'dependencies': [
'<(icu_gyp_path):icudata',
......
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