Build and expose inspector agent
(cherry picked from commit 88bd5a7b59c9366fcdc8dc49ec07e15f18e334db)
This commit is contained in:
Родитель
f61bae3440
Коммит
7db6ec3e74
4
node.gyp
4
node.gyp
|
@ -471,8 +471,8 @@
|
|||
'v8_inspector_compress_protocol_json#host',
|
||||
],
|
||||
'include_dirs': [
|
||||
'<(SHARED_INTERMEDIATE_DIR)/include', # for inspector
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
# '<(SHARED_INTERMEDIATE_DIR)/include', # for inspector
|
||||
# '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)/src', # for inspector
|
||||
],
|
||||
}, {
|
||||
|
|
|
@ -332,7 +332,7 @@ class NodeInspectorClient : public V8InspectorClient {
|
|||
: env_(env), platform_(platform) {
|
||||
client_ = V8Inspector::create(env->isolate(), this);
|
||||
// TODO(bnoordhuis) Make name configurable from src/node.cc.
|
||||
ContextInfo info(GetHumanReadableProcessName());
|
||||
ContextInfo info("Electron Main Context");
|
||||
info.is_default = true;
|
||||
contextCreated(env->context(), info);
|
||||
}
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
#error("This header can only be used when inspector is enabled")
|
||||
#endif
|
||||
|
||||
#include "node.h"
|
||||
#include "node_debug_options.h"
|
||||
#include "node_persistent.h"
|
||||
#include "node_platform.h"
|
||||
#include "v8.h"
|
||||
|
||||
namespace v8_inspector {
|
||||
|
@ -20,7 +22,6 @@ class StringView;
|
|||
namespace node {
|
||||
// Forward declaration to break recursive dependency chain with src/env.h.
|
||||
class Environment;
|
||||
class NodePlatform;
|
||||
struct ContextInfo;
|
||||
|
||||
namespace inspector {
|
||||
|
@ -44,7 +45,7 @@ class InspectorSessionDelegate {
|
|||
= 0;
|
||||
};
|
||||
|
||||
class Agent {
|
||||
class NODE_EXTERN Agent {
|
||||
public:
|
||||
explicit Agent(node::Environment* env);
|
||||
~Agent();
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#include "util.h"
|
||||
#include "zlib.h"
|
||||
|
||||
#include "libplatform/libplatform.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <unicode/unistr.h>
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#ifndef SRC_NODE_DEBUG_OPTIONS_H_
|
||||
#define SRC_NODE_DEBUG_OPTIONS_H_
|
||||
|
||||
#include "node.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
// Forward declaration to break recursive dependency chain with src/env.h.
|
||||
namespace node {
|
||||
|
||||
class DebugOptions {
|
||||
class NODE_EXTERN DebugOptions {
|
||||
public:
|
||||
DebugOptions();
|
||||
bool ParseOption(const char* argv0, const std::string& option);
|
||||
|
|
|
@ -215,10 +215,12 @@ extern bool config_pending_deprecation;
|
|||
// Tells whether it is safe to call v8::Isolate::GetCurrent().
|
||||
extern bool v8_initialized;
|
||||
|
||||
class DebugOptions;
|
||||
|
||||
// Contains initial debug options.
|
||||
// Set in node.cc.
|
||||
// Used in node_config.cc.
|
||||
extern node::DebugOptions debug_options;
|
||||
extern DebugOptions debug_options;
|
||||
|
||||
// Forward declaration
|
||||
class Environment;
|
||||
|
|
Загрузка…
Ссылка в новой задаче