Commit 5925793d authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[inspector] enabled presubmit for inspector sub folder

BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2343733002
Cr-Commit-Position: refs/heads/master@{#39727}
parent 8edf2905
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
#ifndef V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_ #ifndef V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_
#define V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_ #define V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_
#include <vector>
#include "src/inspector/protocol/Protocol.h" #include "src/inspector/protocol/Protocol.h"
#include "include/v8.h" #include "include/v8.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
class InjectedScriptNative final { class InjectedScriptNative final {
......
...@@ -52,8 +52,6 @@ using protocol::ErrorString; ...@@ -52,8 +52,6 @@ using protocol::ErrorString;
using protocol::Maybe; using protocol::Maybe;
class InjectedScript final { class InjectedScript final {
DISALLOW_COPY_AND_ASSIGN(InjectedScript);
public: public:
static std::unique_ptr<InjectedScript> create(InspectedContext*); static std::unique_ptr<InjectedScript> create(InspectedContext*);
~InjectedScript(); ~InjectedScript();
...@@ -141,8 +139,6 @@ class InjectedScript final { ...@@ -141,8 +139,6 @@ class InjectedScript final {
}; };
class ContextScope : public Scope { class ContextScope : public Scope {
DISALLOW_COPY_AND_ASSIGN(ContextScope);
public: public:
ContextScope(ErrorString*, V8InspectorImpl*, int contextGroupId, ContextScope(ErrorString*, V8InspectorImpl*, int contextGroupId,
int executionContextId); int executionContextId);
...@@ -151,11 +147,11 @@ class InjectedScript final { ...@@ -151,11 +147,11 @@ class InjectedScript final {
private: private:
void findInjectedScript(V8InspectorSessionImpl*) override; void findInjectedScript(V8InspectorSessionImpl*) override;
int m_executionContextId; int m_executionContextId;
DISALLOW_COPY_AND_ASSIGN(ContextScope);
}; };
class ObjectScope : public Scope { class ObjectScope : public Scope {
DISALLOW_COPY_AND_ASSIGN(ObjectScope);
public: public:
ObjectScope(ErrorString*, V8InspectorImpl*, int contextGroupId, ObjectScope(ErrorString*, V8InspectorImpl*, int contextGroupId,
const String16& remoteObjectId); const String16& remoteObjectId);
...@@ -168,11 +164,11 @@ class InjectedScript final { ...@@ -168,11 +164,11 @@ class InjectedScript final {
String16 m_remoteObjectId; String16 m_remoteObjectId;
String16 m_objectGroupName; String16 m_objectGroupName;
v8::Local<v8::Value> m_object; v8::Local<v8::Value> m_object;
DISALLOW_COPY_AND_ASSIGN(ObjectScope);
}; };
class CallFrameScope : public Scope { class CallFrameScope : public Scope {
DISALLOW_COPY_AND_ASSIGN(CallFrameScope);
public: public:
CallFrameScope(ErrorString*, V8InspectorImpl*, int contextGroupId, CallFrameScope(ErrorString*, V8InspectorImpl*, int contextGroupId,
const String16& remoteCallFrameId); const String16& remoteCallFrameId);
...@@ -183,6 +179,8 @@ class InjectedScript final { ...@@ -183,6 +179,8 @@ class InjectedScript final {
void findInjectedScript(V8InspectorSessionImpl*) override; void findInjectedScript(V8InspectorSessionImpl*) override;
String16 m_remoteCallFrameId; String16 m_remoteCallFrameId;
size_t m_frameOrdinal; size_t m_frameOrdinal;
DISALLOW_COPY_AND_ASSIGN(CallFrameScope);
}; };
private: private:
...@@ -200,6 +198,8 @@ class InjectedScript final { ...@@ -200,6 +198,8 @@ class InjectedScript final {
v8::Global<v8::Value> m_lastEvaluationResult; v8::Global<v8::Value> m_lastEvaluationResult;
std::unique_ptr<InjectedScriptNative> m_native; std::unique_ptr<InjectedScriptNative> m_native;
v8::Global<v8::Object> m_commandLineAPI; v8::Global<v8::Object> m_commandLineAPI;
DISALLOW_COPY_AND_ASSIGN(InjectedScript);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -18,8 +18,6 @@ class V8ContextInfo; ...@@ -18,8 +18,6 @@ class V8ContextInfo;
class V8InspectorImpl; class V8InspectorImpl;
class InspectedContext { class InspectedContext {
DISALLOW_COPY_AND_ASSIGN(InspectedContext);
public: public:
~InspectedContext(); ~InspectedContext();
...@@ -57,6 +55,8 @@ class InspectedContext { ...@@ -57,6 +55,8 @@ class InspectedContext {
bool m_reported; bool m_reported;
std::unique_ptr<InjectedScript> m_injectedScript; std::unique_ptr<InjectedScript> m_injectedScript;
v8::Global<v8::Object> m_console; v8::Global<v8::Object> m_console;
DISALLOW_COPY_AND_ASSIGN(InspectedContext);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -31,18 +31,16 @@ ...@@ -31,18 +31,16 @@
#ifndef V8_INSPECTOR_JAVASCRIPTCALLFRAME_H_ #ifndef V8_INSPECTOR_JAVASCRIPTCALLFRAME_H_
#define V8_INSPECTOR_JAVASCRIPTCALLFRAME_H_ #define V8_INSPECTOR_JAVASCRIPTCALLFRAME_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/protocol-platform.h" #include "src/inspector/protocol-platform.h"
#include "include/v8.h" #include "include/v8.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
class JavaScriptCallFrame { class JavaScriptCallFrame {
DISALLOW_COPY_AND_ASSIGN(JavaScriptCallFrame);
public: public:
static std::unique_ptr<JavaScriptCallFrame> create( static std::unique_ptr<JavaScriptCallFrame> create(
v8::Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame) { v8::Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame) {
...@@ -73,6 +71,8 @@ class JavaScriptCallFrame { ...@@ -73,6 +71,8 @@ class JavaScriptCallFrame {
v8::Isolate* m_isolate; v8::Isolate* m_isolate;
v8::Global<v8::Context> m_debuggerContext; v8::Global<v8::Context> m_debuggerContext;
v8::Global<v8::Object> m_callFrame; v8::Global<v8::Object> m_callFrame;
DISALLOW_COPY_AND_ASSIGN(JavaScriptCallFrame);
}; };
using JavaScriptCallFrames = std::vector<std::unique_ptr<JavaScriptCallFrame>>; using JavaScriptCallFrames = std::vector<std::unique_ptr<JavaScriptCallFrame>>;
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "src/inspector/string-16.h" #include "src/inspector/string-16.h"
#include "src/base/platform/platform.h"
#include "src/inspector/protocol-platform.h"
#include <algorithm> #include <algorithm>
#include <cctype> #include <cctype>
...@@ -14,6 +12,9 @@ ...@@ -14,6 +12,9 @@
#include <locale> #include <locale>
#include <string> #include <string>
#include "src/base/platform/platform.h"
#include "src/inspector/protocol-platform.h"
namespace v8_inspector { namespace v8_inspector {
namespace { namespace {
...@@ -38,7 +39,8 @@ int charactersToInteger(const UChar* characters, size_t length, ...@@ -38,7 +39,8 @@ int charactersToInteger(const UChar* characters, size_t length,
buffer.push_back('\0'); buffer.push_back('\0');
char* endptr; char* endptr;
long result = std::strtol(buffer.data(), &endptr, 10); int64_t result =
static_cast<int64_t>(std::strtol(buffer.data(), &endptr, 10));
if (ok) { if (ok) {
*ok = !(*endptr) && result <= std::numeric_limits<int>::max() && *ok = !(*endptr) && result <= std::numeric_limits<int>::max() &&
result >= std::numeric_limits<int>::min(); result >= std::numeric_limits<int>::min();
...@@ -84,17 +86,17 @@ ConversionResult convertUTF16ToUTF8(const UChar** sourceStart, ...@@ -84,17 +86,17 @@ ConversionResult convertUTF16ToUTF8(const UChar** sourceStart,
char* target = *targetStart; char* target = *targetStart;
while (source < sourceEnd) { while (source < sourceEnd) {
UChar32 ch; UChar32 ch;
unsigned short bytesToWrite = 0; uint32_t bytesToWrite = 0;
const UChar32 byteMask = 0xBF; const UChar32 byteMask = 0xBF;
const UChar32 byteMark = 0x80; const UChar32 byteMark = 0x80;
const UChar* oldSource = const UChar* oldSource =
source; // In case we have to back up because of target overflow. source; // In case we have to back up because of target overflow.
ch = static_cast<unsigned short>(*source++); ch = static_cast<uint16_t>(*source++);
// If we have a surrogate pair, convert to UChar32 first. // If we have a surrogate pair, convert to UChar32 first.
if (ch >= 0xD800 && ch <= 0xDBFF) { if (ch >= 0xD800 && ch <= 0xDBFF) {
// If the 16 bits following the high surrogate are in the source buffer... // If the 16 bits following the high surrogate are in the source buffer...
if (source < sourceEnd) { if (source < sourceEnd) {
UChar32 ch2 = static_cast<unsigned short>(*source); UChar32 ch2 = static_cast<uint16_t>(*source);
// If it's a low surrogate, convert to UChar32. // If it's a low surrogate, convert to UChar32.
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) { if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
ch = ((ch - 0xD800) << 10) + (ch2 - 0xDC00) + 0x0010000; ch = ((ch - 0xD800) << 10) + (ch2 - 0xDC00) + 0x0010000;
...@@ -140,16 +142,16 @@ ConversionResult convertUTF16ToUTF8(const UChar** sourceStart, ...@@ -140,16 +142,16 @@ ConversionResult convertUTF16ToUTF8(const UChar** sourceStart,
} }
switch (bytesToWrite) { // note: everything falls through. switch (bytesToWrite) { // note: everything falls through.
case 4: case 4:
*--target = (char)((ch | byteMark) & byteMask); *--target = static_cast<char>((ch | byteMark) & byteMask);
ch >>= 6; ch >>= 6;
case 3: case 3:
*--target = (char)((ch | byteMark) & byteMask); *--target = static_cast<char>((ch | byteMark) & byteMask);
ch >>= 6; ch >>= 6;
case 2: case 2:
*--target = (char)((ch | byteMark) & byteMask); *--target = static_cast<char>((ch | byteMark) & byteMask);
ch >>= 6; ch >>= 6;
case 1: case 1:
*--target = (char)(ch | firstByteMark[bytesToWrite]); *--target = static_cast<char>(ch | firstByteMark[bytesToWrite]);
} }
target += bytesToWrite; target += bytesToWrite;
} }
......
...@@ -23,8 +23,9 @@ class String16 { ...@@ -23,8 +23,9 @@ class String16 {
String16() {} String16() {}
String16(const String16& other) : m_impl(other.m_impl) {} String16(const String16& other) : m_impl(other.m_impl) {}
String16(const UChar* characters, size_t size) : m_impl(characters, size) {} String16(const UChar* characters, size_t size) : m_impl(characters, size) {}
String16(const UChar* characters) : m_impl(characters) {} String16(const UChar* characters) // NOLINT(runtime/explicit)
String16(const char* characters) : m_impl(characters) {}
String16(const char* characters) // NOLINT(runtime/explicit)
: String16(characters, std::strlen(characters)) {} : String16(characters, std::strlen(characters)) {}
String16(const char* characters, size_t size) { String16(const char* characters, size_t size) {
m_impl.resize(size); m_impl.resize(size);
......
...@@ -57,8 +57,6 @@ StringView toStringView(const String16&); ...@@ -57,8 +57,6 @@ StringView toStringView(const String16&);
bool stringViewStartsWith(const StringView&, const char*); bool stringViewStartsWith(const StringView&, const char*);
class StringBufferImpl : public StringBuffer { class StringBufferImpl : public StringBuffer {
DISALLOW_COPY_AND_ASSIGN(StringBufferImpl);
public: public:
// Destroys string's content. // Destroys string's content.
static std::unique_ptr<StringBufferImpl> adopt(String16&); static std::unique_ptr<StringBufferImpl> adopt(String16&);
...@@ -68,6 +66,8 @@ class StringBufferImpl : public StringBuffer { ...@@ -68,6 +66,8 @@ class StringBufferImpl : public StringBuffer {
explicit StringBufferImpl(String16&); explicit StringBufferImpl(String16&);
String16 m_owner; String16 m_owner;
StringView m_string; StringView m_string;
DISALLOW_COPY_AND_ASSIGN(StringBufferImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -17,8 +17,6 @@ class V8InspectorSessionImpl; ...@@ -17,8 +17,6 @@ class V8InspectorSessionImpl;
using protocol::ErrorString; using protocol::ErrorString;
class V8ConsoleAgentImpl : public protocol::Console::Backend { class V8ConsoleAgentImpl : public protocol::Console::Backend {
DISALLOW_COPY_AND_ASSIGN(V8ConsoleAgentImpl);
public: public:
V8ConsoleAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, V8ConsoleAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); protocol::DictionaryValue* state);
...@@ -41,6 +39,8 @@ class V8ConsoleAgentImpl : public protocol::Console::Backend { ...@@ -41,6 +39,8 @@ class V8ConsoleAgentImpl : public protocol::Console::Backend {
protocol::DictionaryValue* m_state; protocol::DictionaryValue* m_state;
protocol::Console::Frontend m_frontend; protocol::Console::Frontend m_frontend;
bool m_enabled; bool m_enabled;
DISALLOW_COPY_AND_ASSIGN(V8ConsoleAgentImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -76,7 +76,7 @@ class V8ValueStringBuilder { ...@@ -76,7 +76,7 @@ class V8ValueStringBuilder {
IgnoreUndefined = 1 << 1, IgnoreUndefined = 1 << 1,
}; };
V8ValueStringBuilder(v8::Local<v8::Context> context) explicit V8ValueStringBuilder(v8::Local<v8::Context> context)
: m_arrayLimit(maxArrayItemsLimit), : m_arrayLimit(maxArrayItemsLimit),
m_isolate(context->GetIsolate()), m_isolate(context->GetIsolate()),
m_tryCatch(context->GetIsolate()), m_tryCatch(context->GetIsolate()),
......
...@@ -29,10 +29,8 @@ v8::Local<v8::Private> inspectedContextPrivateKey(v8::Isolate* isolate) { ...@@ -29,10 +29,8 @@ v8::Local<v8::Private> inspectedContextPrivateKey(v8::Isolate* isolate) {
} }
class ConsoleHelper { class ConsoleHelper {
DISALLOW_COPY_AND_ASSIGN(ConsoleHelper);
public: public:
ConsoleHelper(const v8::FunctionCallbackInfo<v8::Value>& info) explicit ConsoleHelper(const v8::FunctionCallbackInfo<v8::Value>& info)
: m_info(info), : m_info(info),
m_isolate(info.GetIsolate()), m_isolate(info.GetIsolate()),
m_context(info.GetIsolate()->GetCurrentContext()), m_context(info.GetIsolate()->GetCurrentContext()),
...@@ -241,6 +239,8 @@ class ConsoleHelper { ...@@ -241,6 +239,8 @@ class ConsoleHelper {
return defaultValue; return defaultValue;
return false; return false;
} }
DISALLOW_COPY_AND_ASSIGN(ConsoleHelper);
}; };
void returnDataCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { void returnDataCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
......
...@@ -24,8 +24,6 @@ class V8Console { ...@@ -24,8 +24,6 @@ class V8Console {
static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*);
class CommandLineAPIScope { class CommandLineAPIScope {
DISALLOW_COPY_AND_ASSIGN(CommandLineAPIScope);
public: public:
CommandLineAPIScope(v8::Local<v8::Context>, CommandLineAPIScope(v8::Local<v8::Context>,
v8::Local<v8::Object> commandLineAPI, v8::Local<v8::Object> commandLineAPI,
...@@ -44,6 +42,8 @@ class V8Console { ...@@ -44,6 +42,8 @@ class V8Console {
v8::Local<v8::Object> m_global; v8::Local<v8::Object> m_global;
v8::Local<v8::Set> m_installedMethods; v8::Local<v8::Set> m_installedMethods;
bool m_cleanup; bool m_cleanup;
DISALLOW_COPY_AND_ASSIGN(CommandLineAPIScope);
}; };
private: private:
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "src/inspector/v8-debugger-agent-impl.h" #include "src/inspector/v8-debugger-agent-impl.h"
#include <algorithm>
#include "src/inspector/injected-script.h" #include "src/inspector/injected-script.h"
#include "src/inspector/inspected-context.h" #include "src/inspector/inspected-context.h"
#include "src/inspector/java-script-call-frame.h" #include "src/inspector/java-script-call-frame.h"
...@@ -22,8 +24,6 @@ ...@@ -22,8 +24,6 @@
#include "include/v8-inspector.h" #include "include/v8-inspector.h"
#include <algorithm>
namespace v8_inspector { namespace v8_inspector {
using protocol::Array; using protocol::Array;
...@@ -50,7 +50,7 @@ static const char columnNumber[] = "columnNumber"; ...@@ -50,7 +50,7 @@ static const char columnNumber[] = "columnNumber";
static const char condition[] = "condition"; static const char condition[] = "condition";
static const char skipAllPauses[] = "skipAllPauses"; static const char skipAllPauses[] = "skipAllPauses";
} // namespace DebuggerAgentState; } // namespace DebuggerAgentState
static const int maxSkipStepFrameCount = 128; static const int maxSkipStepFrameCount = 128;
static const char backtraceObjectGroup[] = "backtrace"; static const char backtraceObjectGroup[] = "backtrace";
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#ifndef V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_ #ifndef V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_
#define V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_ #define V8_INSPECTOR_V8DEBUGGERAGENTIMPL_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/java-script-call-frame.h" #include "src/inspector/java-script-call-frame.h"
#include "src/inspector/protocol/Debugger.h" #include "src/inspector/protocol/Debugger.h"
#include "src/inspector/protocol/Forward.h" #include "src/inspector/protocol/Forward.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
struct ScriptBreakpoint; struct ScriptBreakpoint;
...@@ -28,8 +28,6 @@ using protocol::ErrorString; ...@@ -28,8 +28,6 @@ using protocol::ErrorString;
using protocol::Maybe; using protocol::Maybe;
class V8DebuggerAgentImpl : public protocol::Debugger::Backend { class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl);
public: public:
enum SkipPauseRequest { enum SkipPauseRequest {
RequestNoSkip, RequestNoSkip,
...@@ -217,6 +215,8 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend { ...@@ -217,6 +215,8 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
std::unique_ptr<V8Regex> m_blackboxPattern; std::unique_ptr<V8Regex> m_blackboxPattern;
protocol::HashMap<String16, std::vector<std::pair<int, int>>> protocol::HashMap<String16, std::vector<std::pair<int, int>>>
m_blackboxedPositions; m_blackboxedPositions;
DISALLOW_COPY_AND_ASSIGN(V8DebuggerAgentImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
namespace v8_inspector { namespace v8_inspector {
class V8DebuggerScript { class V8DebuggerScript {
DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript);
public: public:
V8DebuggerScript(v8::Local<v8::Context>, v8::Local<v8::Object>, V8DebuggerScript(v8::Local<v8::Context>, v8::Local<v8::Object>,
bool isLiveEdit); bool isLiveEdit);
...@@ -80,6 +78,8 @@ class V8DebuggerScript { ...@@ -80,6 +78,8 @@ class V8DebuggerScript {
int m_executionContextId; int m_executionContextId;
String16 m_executionContextAuxData; String16 m_executionContextAuxData;
bool m_isLiveEdit; bool m_isLiveEdit;
DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_V8DEBUGGER_H_ #ifndef V8_INSPECTOR_V8DEBUGGER_H_
#define V8_INSPECTOR_V8DEBUGGER_H_ #define V8_INSPECTOR_V8DEBUGGER_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/java-script-call-frame.h" #include "src/inspector/java-script-call-frame.h"
#include "src/inspector/protocol/Forward.h" #include "src/inspector/protocol/Forward.h"
...@@ -14,8 +16,6 @@ ...@@ -14,8 +16,6 @@
#include "include/v8-debug.h" #include "include/v8-debug.h"
#include "include/v8-inspector.h" #include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
struct ScriptBreakpoint; struct ScriptBreakpoint;
...@@ -26,8 +26,6 @@ class V8StackTraceImpl; ...@@ -26,8 +26,6 @@ class V8StackTraceImpl;
using protocol::ErrorString; using protocol::ErrorString;
class V8Debugger { class V8Debugger {
DISALLOW_COPY_AND_ASSIGN(V8Debugger);
public: public:
V8Debugger(v8::Isolate*, V8InspectorImpl*); V8Debugger(v8::Isolate*, V8InspectorImpl*);
~V8Debugger(); ~V8Debugger();
...@@ -153,6 +151,8 @@ class V8Debugger { ...@@ -153,6 +151,8 @@ class V8Debugger {
std::vector<void*> m_currentTasks; std::vector<void*> m_currentTasks;
std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks;
protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap;
DISALLOW_COPY_AND_ASSIGN(V8Debugger);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -30,7 +30,7 @@ static const char samplingHeapProfilerInterval[] = ...@@ -30,7 +30,7 @@ static const char samplingHeapProfilerInterval[] =
class HeapSnapshotProgress final : public v8::ActivityControl { class HeapSnapshotProgress final : public v8::ActivityControl {
public: public:
HeapSnapshotProgress(protocol::HeapProfiler::Frontend* frontend) explicit HeapSnapshotProgress(protocol::HeapProfiler::Frontend* frontend)
: m_frontend(frontend) {} : m_frontend(frontend) {}
ControlOption ReportProgressValue(int done, int total) override { ControlOption ReportProgressValue(int done, int total) override {
m_frontend->reportHeapSnapshotProgress(done, total, m_frontend->reportHeapSnapshotProgress(done, total,
...@@ -78,7 +78,7 @@ class GlobalObjectNameResolver final ...@@ -78,7 +78,7 @@ class GlobalObjectNameResolver final
class HeapSnapshotOutputStream final : public v8::OutputStream { class HeapSnapshotOutputStream final : public v8::OutputStream {
public: public:
HeapSnapshotOutputStream(protocol::HeapProfiler::Frontend* frontend) explicit HeapSnapshotOutputStream(protocol::HeapProfiler::Frontend* frontend)
: m_frontend(frontend) {} : m_frontend(frontend) {}
void EndOfStream() override {} void EndOfStream() override {}
int GetChunkSize() override { return 102400; } int GetChunkSize() override { return 102400; }
...@@ -113,7 +113,7 @@ class InspectableHeapObject final : public V8InspectorSession::Inspectable { ...@@ -113,7 +113,7 @@ class InspectableHeapObject final : public V8InspectorSession::Inspectable {
class HeapStatsStream final : public v8::OutputStream { class HeapStatsStream final : public v8::OutputStream {
public: public:
HeapStatsStream(protocol::HeapProfiler::Frontend* frontend) explicit HeapStatsStream(protocol::HeapProfiler::Frontend* frontend)
: m_frontend(frontend) {} : m_frontend(frontend) {}
void EndOfStream() override {} void EndOfStream() override {}
......
...@@ -19,8 +19,6 @@ using protocol::ErrorString; ...@@ -19,8 +19,6 @@ using protocol::ErrorString;
using protocol::Maybe; using protocol::Maybe;
class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend { class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend {
DISALLOW_COPY_AND_ASSIGN(V8HeapProfilerAgentImpl);
public: public:
V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); protocol::DictionaryValue* state);
...@@ -66,6 +64,8 @@ class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend { ...@@ -66,6 +64,8 @@ class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend {
protocol::HeapProfiler::Frontend m_frontend; protocol::HeapProfiler::Frontend m_frontend;
protocol::DictionaryValue* m_state; protocol::DictionaryValue* m_state;
bool m_hasTimer; bool m_hasTimer;
DISALLOW_COPY_AND_ASSIGN(V8HeapProfilerAgentImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -31,14 +31,14 @@ ...@@ -31,14 +31,14 @@
#ifndef V8_INSPECTOR_V8INSPECTORIMPL_H_ #ifndef V8_INSPECTOR_V8INSPECTORIMPL_H_
#define V8_INSPECTOR_V8INSPECTORIMPL_H_ #define V8_INSPECTOR_V8INSPECTORIMPL_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/protocol/Protocol.h" #include "src/inspector/protocol/Protocol.h"
#include "include/v8-debug.h" #include "include/v8-debug.h"
#include "include/v8-inspector.h" #include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
class InspectedContext; class InspectedContext;
...@@ -51,8 +51,6 @@ class V8RuntimeAgentImpl; ...@@ -51,8 +51,6 @@ class V8RuntimeAgentImpl;
class V8StackTraceImpl; class V8StackTraceImpl;
class V8InspectorImpl : public V8Inspector { class V8InspectorImpl : public V8Inspector {
DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl);
public: public:
V8InspectorImpl(v8::Isolate*, V8InspectorClient*); V8InspectorImpl(v8::Isolate*, V8InspectorClient*);
~V8InspectorImpl() override; ~V8InspectorImpl() override;
...@@ -143,6 +141,8 @@ class V8InspectorImpl : public V8Inspector { ...@@ -143,6 +141,8 @@ class V8InspectorImpl : public V8Inspector {
using ConsoleStorageMap = using ConsoleStorageMap =
protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>; protocol::HashMap<int, std::unique_ptr<V8ConsoleMessageStorage>>;
ConsoleStorageMap m_consoleStorageMap; ConsoleStorageMap m_consoleStorageMap;
DISALLOW_COPY_AND_ASSIGN(V8InspectorImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_ #ifndef V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_
#define V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_ #define V8_INSPECTOR_V8INSPECTORSESSIONIMPL_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h" #include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h" #include "src/inspector/protocol/Runtime.h"
...@@ -12,8 +14,6 @@ ...@@ -12,8 +14,6 @@
#include "include/v8-inspector.h" #include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
class InjectedScript; class InjectedScript;
...@@ -30,8 +30,6 @@ using protocol::ErrorString; ...@@ -30,8 +30,6 @@ using protocol::ErrorString;
class V8InspectorSessionImpl : public V8InspectorSession, class V8InspectorSessionImpl : public V8InspectorSession,
public protocol::FrontendChannel { public protocol::FrontendChannel {
DISALLOW_COPY_AND_ASSIGN(V8InspectorSessionImpl);
public: public:
static std::unique_ptr<V8InspectorSessionImpl> create( static std::unique_ptr<V8InspectorSessionImpl> create(
V8InspectorImpl*, int contextGroupId, V8Inspector::Channel*, V8InspectorImpl*, int contextGroupId, V8Inspector::Channel*,
...@@ -119,6 +117,8 @@ class V8InspectorSessionImpl : public V8InspectorSession, ...@@ -119,6 +117,8 @@ class V8InspectorSessionImpl : public V8InspectorSession,
std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent; std::unique_ptr<V8SchemaAgentImpl> m_schemaAgent;
std::vector<std::unique_ptr<V8InspectorSession::Inspectable>> std::vector<std::unique_ptr<V8InspectorSession::Inspectable>>
m_inspectedObjects; m_inspectedObjects;
DISALLOW_COPY_AND_ASSIGN(V8InspectorSessionImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "src/inspector/v8-profiler-agent-impl.h" #include "src/inspector/v8-profiler-agent-impl.h"
#include <vector>
#include "src/base/atomicops.h" #include "src/base/atomicops.h"
#include "src/inspector/protocol/Protocol.h" #include "src/inspector/protocol/Protocol.h"
#include "src/inspector/string-util.h" #include "src/inspector/string-util.h"
...@@ -14,8 +16,6 @@ ...@@ -14,8 +16,6 @@
#include "include/v8-profiler.h" #include "include/v8-profiler.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
namespace ProfilerAgentState { namespace ProfilerAgentState {
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
#ifndef V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ #ifndef V8_INSPECTOR_V8PROFILERAGENTIMPL_H_
#define V8_INSPECTOR_V8PROFILERAGENTIMPL_H_ #define V8_INSPECTOR_V8PROFILERAGENTIMPL_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h" #include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Profiler.h" #include "src/inspector/protocol/Profiler.h"
#include <vector>
namespace v8 { namespace v8 {
class CpuProfiler; class CpuProfiler;
class Isolate; class Isolate;
...@@ -23,8 +23,6 @@ class V8InspectorSessionImpl; ...@@ -23,8 +23,6 @@ class V8InspectorSessionImpl;
using protocol::ErrorString; using protocol::ErrorString;
class V8ProfilerAgentImpl : public protocol::Profiler::Backend { class V8ProfilerAgentImpl : public protocol::Profiler::Backend {
DISALLOW_COPY_AND_ASSIGN(V8ProfilerAgentImpl);
public: public:
V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, V8ProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); protocol::DictionaryValue* state);
...@@ -67,6 +65,8 @@ class V8ProfilerAgentImpl : public protocol::Profiler::Backend { ...@@ -67,6 +65,8 @@ class V8ProfilerAgentImpl : public protocol::Profiler::Backend {
class ProfileDescriptor; class ProfileDescriptor;
std::vector<ProfileDescriptor> m_startedProfiles; std::vector<ProfileDescriptor> m_startedProfiles;
String16 m_frontendInitiatedProfileId; String16 m_frontendInitiatedProfileId;
DISALLOW_COPY_AND_ASSIGN(V8ProfilerAgentImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
#include "src/inspector/v8-regex.h" #include "src/inspector/v8-regex.h"
#include <limits.h>
#include "src/inspector/string-util.h" #include "src/inspector/string-util.h"
#include "src/inspector/v8-inspector-impl.h" #include "src/inspector/v8-inspector-impl.h"
#include "include/v8-inspector.h" #include "include/v8-inspector.h"
#include <limits.h>
namespace v8_inspector { namespace v8_inspector {
V8Regex::V8Regex(V8InspectorImpl* inspector, const String16& pattern, V8Regex::V8Regex(V8InspectorImpl* inspector, const String16& pattern,
......
...@@ -17,8 +17,6 @@ class V8InspectorImpl; ...@@ -17,8 +17,6 @@ class V8InspectorImpl;
enum MultilineMode { MultilineDisabled, MultilineEnabled }; enum MultilineMode { MultilineDisabled, MultilineEnabled };
class V8Regex { class V8Regex {
DISALLOW_COPY_AND_ASSIGN(V8Regex);
public: public:
V8Regex(V8InspectorImpl*, const String16&, bool caseSensitive, V8Regex(V8InspectorImpl*, const String16&, bool caseSensitive,
bool multiline = false); bool multiline = false);
...@@ -30,6 +28,8 @@ class V8Regex { ...@@ -30,6 +28,8 @@ class V8Regex {
V8InspectorImpl* m_inspector; V8InspectorImpl* m_inspector;
v8::Global<v8::RegExp> m_regex; v8::Global<v8::RegExp> m_regex;
String16 m_errorMessage; String16 m_errorMessage;
DISALLOW_COPY_AND_ASSIGN(V8Regex);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -50,8 +50,6 @@ using protocol::ErrorString; ...@@ -50,8 +50,6 @@ using protocol::ErrorString;
using protocol::Maybe; using protocol::Maybe;
class V8RuntimeAgentImpl : public protocol::Runtime::Backend { class V8RuntimeAgentImpl : public protocol::Runtime::Backend {
DISALLOW_COPY_AND_ASSIGN(V8RuntimeAgentImpl);
public: public:
V8RuntimeAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, V8RuntimeAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); protocol::DictionaryValue* state);
...@@ -124,6 +122,8 @@ class V8RuntimeAgentImpl : public protocol::Runtime::Backend { ...@@ -124,6 +122,8 @@ class V8RuntimeAgentImpl : public protocol::Runtime::Backend {
bool m_enabled; bool m_enabled;
protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>> protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>>
m_compiledScripts; m_compiledScripts;
DISALLOW_COPY_AND_ASSIGN(V8RuntimeAgentImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -16,8 +16,6 @@ class V8InspectorSessionImpl; ...@@ -16,8 +16,6 @@ class V8InspectorSessionImpl;
using protocol::ErrorString; using protocol::ErrorString;
class V8SchemaAgentImpl : public protocol::Schema::Backend { class V8SchemaAgentImpl : public protocol::Schema::Backend {
DISALLOW_COPY_AND_ASSIGN(V8SchemaAgentImpl);
public: public:
V8SchemaAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, V8SchemaAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*,
protocol::DictionaryValue* state); protocol::DictionaryValue* state);
...@@ -30,6 +28,8 @@ class V8SchemaAgentImpl : public protocol::Schema::Backend { ...@@ -30,6 +28,8 @@ class V8SchemaAgentImpl : public protocol::Schema::Backend {
private: private:
V8InspectorSessionImpl* m_session; V8InspectorSessionImpl* m_session;
protocol::Schema::Frontend m_frontend; protocol::Schema::Frontend m_frontend;
DISALLOW_COPY_AND_ASSIGN(V8SchemaAgentImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
#ifndef V8_INSPECTOR_V8STACKTRACEIMPL_H_ #ifndef V8_INSPECTOR_V8STACKTRACEIMPL_H_
#define V8_INSPECTOR_V8STACKTRACEIMPL_H_ #define V8_INSPECTOR_V8STACKTRACEIMPL_H_
#include <vector>
#include "src/base/macros.h" #include "src/base/macros.h"
#include "src/inspector/protocol/Forward.h" #include "src/inspector/protocol/Forward.h"
#include "src/inspector/protocol/Runtime.h" #include "src/inspector/protocol/Runtime.h"
#include "include/v8-inspector.h" #include "include/v8-inspector.h"
#include <vector>
namespace v8_inspector { namespace v8_inspector {
class TracedValue; class TracedValue;
...@@ -23,8 +23,6 @@ class V8Debugger; ...@@ -23,8 +23,6 @@ class V8Debugger;
// that current native-only state had some async story. // that current native-only state had some async story.
// On the other hand, any non-top async stack is guaranteed to be non-empty. // On the other hand, any non-top async stack is guaranteed to be non-empty.
class V8StackTraceImpl final : public V8StackTrace { class V8StackTraceImpl final : public V8StackTrace {
DISALLOW_COPY_AND_ASSIGN(V8StackTraceImpl);
public: public:
static const size_t maxCallStackSizeToCapture = 200; static const size_t maxCallStackSizeToCapture = 200;
...@@ -92,6 +90,8 @@ class V8StackTraceImpl final : public V8StackTrace { ...@@ -92,6 +90,8 @@ class V8StackTraceImpl final : public V8StackTrace {
String16 m_description; String16 m_description;
std::vector<Frame> m_frames; std::vector<Frame> m_frames;
std::unique_ptr<V8StackTraceImpl> m_parent; std::unique_ptr<V8StackTraceImpl> m_parent;
DISALLOW_COPY_AND_ASSIGN(V8StackTraceImpl);
}; };
} // namespace v8_inspector } // namespace v8_inspector
......
...@@ -192,9 +192,8 @@ class CppLintProcessor(SourceFileProcessor): ...@@ -192,9 +192,8 @@ class CppLintProcessor(SourceFileProcessor):
return name.endswith('.cc') or name.endswith('.h') return name.endswith('.cc') or name.endswith('.h')
def IgnoreDir(self, name): def IgnoreDir(self, name):
# TODO(dgozman): remove inspector after fixing the issues.
return (super(CppLintProcessor, self).IgnoreDir(name) return (super(CppLintProcessor, self).IgnoreDir(name)
or (name == 'third_party') or (name == 'inspector')) or (name == 'third_party'))
IGNORE_LINT = ['flag-definitions.h'] IGNORE_LINT = ['flag-definitions.h']
......
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