libv8 5.3.332.38.5-x86-linux → 5.7.492.65.0beta1-x86-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libv8/arch.rb +5 -5
- data/lib/libv8/version.rb +1 -1
- data/vendor/v8/include/libplatform/libplatform-export.h +29 -0
- data/vendor/v8/include/libplatform/libplatform.h +25 -3
- data/vendor/v8/include/libplatform/v8-tracing.h +270 -0
- data/vendor/v8/include/v8-debug.h +43 -51
- data/vendor/v8/include/v8-experimental.h +4 -0
- data/vendor/v8/include/v8-inspector-protocol.h +13 -0
- data/vendor/v8/include/v8-inspector.h +267 -0
- data/vendor/v8/include/v8-platform.h +57 -9
- data/vendor/v8/include/v8-profiler.h +113 -3
- data/vendor/v8/include/v8-version-string.h +33 -0
- data/vendor/v8/include/v8-version.h +3 -3
- data/vendor/v8/include/v8.h +1334 -370
- data/vendor/v8/include/v8config.h +0 -4
- data/vendor/v8/out/ia32.release/libv8_base.a +0 -0
- data/vendor/v8/out/ia32.release/libv8_libbase.a +0 -0
- data/vendor/v8/out/ia32.release/libv8_libplatform.a +0 -0
- data/vendor/v8/out/ia32.release/libv8_libsampler.a +0 -0
- data/vendor/v8/out/ia32.release/libv8_nosnapshot.a +0 -0
- data/vendor/v8/out/ia32.release/libv8_snapshot.a +0 -0
- data/vendor/v8/out/ia32.release/obj.target/src/libv8_base.a +0 -0
- data/vendor/v8/out/ia32.release/obj.target/src/libv8_libbase.a +0 -0
- data/vendor/v8/out/ia32.release/obj.target/src/libv8_libplatform.a +0 -0
- data/vendor/v8/out/ia32.release/obj.target/src/libv8_libsampler.a +0 -0
- data/vendor/v8/out/ia32.release/obj.target/src/libv8_nosnapshot.a +0 -0
- data/vendor/v8/out/ia32.release/obj.target/src/libv8_snapshot.a +0 -0
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2568fb8e1f5eb651664640cceaff1d18342aedc
|
4
|
+
data.tar.gz: 2834bf9c19a94ae76208a578776e6968d756b1b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a75861f31e3e57b8e1e6d766801a9e120c8702abfb1bccb16060d9b1cac2db4c3794ddae0f4dd20c010cfb0452665c0376be82a924ebea485b89d62d196dc0f
|
7
|
+
data.tar.gz: 9c0fb45a3da644964787502d49bb23c061f539ab55771a80255f53254fa530f4c5f89c676e8913539cc45d3559c24a63795c4d6454beb383d241ecbc10a07779
|
data/ext/libv8/arch.rb
CHANGED
@@ -6,11 +6,11 @@ module Libv8
|
|
6
6
|
|
7
7
|
def libv8_arch
|
8
8
|
case Gem::Platform.local.cpu
|
9
|
-
when /^arm(v7.*)*$/
|
10
|
-
when /^a(rm|arch)64$/
|
11
|
-
when /^x86$/
|
12
|
-
when /^(x86_64|amd64)$/
|
13
|
-
when /^universal$/
|
9
|
+
when /^arm(v6.*|v7.*)*$/ then 'arm'
|
10
|
+
when /^a(rm|arch)64$/ then 'arm64'
|
11
|
+
when /^x86$/ then 'ia32'
|
12
|
+
when /^(x86_64|amd64)$/ then 'x64'
|
13
|
+
when /^universal$/ then 'x64' # OS X
|
14
14
|
else
|
15
15
|
warn "Unsupported target: #{Gem::Platform.local.cpu}"
|
16
16
|
Gem::Platform.local.cpu
|
data/lib/libv8/version.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
// Copyright 2016 the V8 project authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
#ifndef V8_LIBPLATFORM_LIBPLATFORM_EXPORT_H_
|
6
|
+
#define V8_LIBPLATFORM_LIBPLATFORM_EXPORT_H_
|
7
|
+
|
8
|
+
#if defined(_WIN32)
|
9
|
+
|
10
|
+
#ifdef BUILDING_V8_PLATFORM_SHARED
|
11
|
+
#define V8_PLATFORM_EXPORT __declspec(dllexport)
|
12
|
+
#elif USING_V8_PLATFORM_SHARED
|
13
|
+
#define V8_PLATFORM_EXPORT __declspec(dllimport)
|
14
|
+
#else
|
15
|
+
#define V8_PLATFORM_EXPORT
|
16
|
+
#endif // BUILDING_V8_PLATFORM_SHARED
|
17
|
+
|
18
|
+
#else // defined(_WIN32)
|
19
|
+
|
20
|
+
// Setup for Linux shared library export.
|
21
|
+
#ifdef BUILDING_V8_PLATFORM_SHARED
|
22
|
+
#define V8_PLATFORM_EXPORT __attribute__((visibility("default")))
|
23
|
+
#else
|
24
|
+
#define V8_PLATFORM_EXPORT
|
25
|
+
#endif
|
26
|
+
|
27
|
+
#endif // defined(_WIN32)
|
28
|
+
|
29
|
+
#endif // V8_LIBPLATFORM_LIBPLATFORM_EXPORT_H_
|
@@ -5,6 +5,8 @@
|
|
5
5
|
#ifndef V8_LIBPLATFORM_LIBPLATFORM_H_
|
6
6
|
#define V8_LIBPLATFORM_LIBPLATFORM_H_
|
7
7
|
|
8
|
+
#include "libplatform/libplatform-export.h"
|
9
|
+
#include "libplatform/v8-tracing.h"
|
8
10
|
#include "v8-platform.h" // NOLINT(build/include)
|
9
11
|
|
10
12
|
namespace v8 {
|
@@ -18,8 +20,8 @@ namespace platform {
|
|
18
20
|
* of zero is passed, a suitable default based on the current number of
|
19
21
|
* processors online will be chosen.
|
20
22
|
*/
|
21
|
-
v8::Platform* CreateDefaultPlatform(
|
22
|
-
|
23
|
+
V8_PLATFORM_EXPORT v8::Platform* CreateDefaultPlatform(
|
24
|
+
int thread_pool_size = 0);
|
23
25
|
|
24
26
|
/**
|
25
27
|
* Pumps the message loop for the given isolate.
|
@@ -29,8 +31,28 @@ v8::Platform* CreateDefaultPlatform(int thread_pool_size = 0);
|
|
29
31
|
* not block if no task is pending. The |platform| has to be created using
|
30
32
|
* |CreateDefaultPlatform|.
|
31
33
|
*/
|
32
|
-
bool PumpMessageLoop(v8::Platform* platform,
|
34
|
+
V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform* platform,
|
35
|
+
v8::Isolate* isolate);
|
33
36
|
|
37
|
+
/**
|
38
|
+
* Runs pending idle tasks for at most |idle_time_in_seconds| seconds.
|
39
|
+
*
|
40
|
+
* The caller has to make sure that this is called from the right thread.
|
41
|
+
* This call does not block if no task is pending. The |platform| has to be
|
42
|
+
* created using |CreateDefaultPlatform|.
|
43
|
+
*/
|
44
|
+
V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform,
|
45
|
+
v8::Isolate* isolate,
|
46
|
+
double idle_time_in_seconds);
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Attempts to set the tracing controller for the given platform.
|
50
|
+
*
|
51
|
+
* The |platform| has to be created using |CreateDefaultPlatform|.
|
52
|
+
*/
|
53
|
+
V8_PLATFORM_EXPORT void SetTracingController(
|
54
|
+
v8::Platform* platform,
|
55
|
+
v8::platform::tracing::TracingController* tracing_controller);
|
34
56
|
|
35
57
|
} // namespace platform
|
36
58
|
} // namespace v8
|
@@ -0,0 +1,270 @@
|
|
1
|
+
// Copyright 2016 the V8 project authors. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
3
|
+
// found in the LICENSE file.
|
4
|
+
|
5
|
+
#ifndef V8_LIBPLATFORM_V8_TRACING_H_
|
6
|
+
#define V8_LIBPLATFORM_V8_TRACING_H_
|
7
|
+
|
8
|
+
#include <fstream>
|
9
|
+
#include <memory>
|
10
|
+
#include <unordered_set>
|
11
|
+
#include <vector>
|
12
|
+
|
13
|
+
#include "libplatform/libplatform-export.h"
|
14
|
+
#include "v8-platform.h" // NOLINT(build/include)
|
15
|
+
|
16
|
+
namespace v8 {
|
17
|
+
|
18
|
+
namespace base {
|
19
|
+
class Mutex;
|
20
|
+
} // namespace base
|
21
|
+
|
22
|
+
namespace platform {
|
23
|
+
namespace tracing {
|
24
|
+
|
25
|
+
const int kTraceMaxNumArgs = 2;
|
26
|
+
|
27
|
+
class V8_PLATFORM_EXPORT TraceObject {
|
28
|
+
public:
|
29
|
+
union ArgValue {
|
30
|
+
bool as_bool;
|
31
|
+
uint64_t as_uint;
|
32
|
+
int64_t as_int;
|
33
|
+
double as_double;
|
34
|
+
const void* as_pointer;
|
35
|
+
const char* as_string;
|
36
|
+
};
|
37
|
+
|
38
|
+
TraceObject() {}
|
39
|
+
~TraceObject();
|
40
|
+
void Initialize(
|
41
|
+
char phase, const uint8_t* category_enabled_flag, const char* name,
|
42
|
+
const char* scope, uint64_t id, uint64_t bind_id, int num_args,
|
43
|
+
const char** arg_names, const uint8_t* arg_types,
|
44
|
+
const uint64_t* arg_values,
|
45
|
+
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
|
46
|
+
unsigned int flags);
|
47
|
+
void UpdateDuration();
|
48
|
+
void InitializeForTesting(
|
49
|
+
char phase, const uint8_t* category_enabled_flag, const char* name,
|
50
|
+
const char* scope, uint64_t id, uint64_t bind_id, int num_args,
|
51
|
+
const char** arg_names, const uint8_t* arg_types,
|
52
|
+
const uint64_t* arg_values,
|
53
|
+
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
|
54
|
+
unsigned int flags, int pid, int tid, int64_t ts, int64_t tts,
|
55
|
+
uint64_t duration, uint64_t cpu_duration);
|
56
|
+
|
57
|
+
int pid() const { return pid_; }
|
58
|
+
int tid() const { return tid_; }
|
59
|
+
char phase() const { return phase_; }
|
60
|
+
const uint8_t* category_enabled_flag() const {
|
61
|
+
return category_enabled_flag_;
|
62
|
+
}
|
63
|
+
const char* name() const { return name_; }
|
64
|
+
const char* scope() const { return scope_; }
|
65
|
+
uint64_t id() const { return id_; }
|
66
|
+
uint64_t bind_id() const { return bind_id_; }
|
67
|
+
int num_args() const { return num_args_; }
|
68
|
+
const char** arg_names() { return arg_names_; }
|
69
|
+
uint8_t* arg_types() { return arg_types_; }
|
70
|
+
ArgValue* arg_values() { return arg_values_; }
|
71
|
+
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables() {
|
72
|
+
return arg_convertables_;
|
73
|
+
}
|
74
|
+
unsigned int flags() const { return flags_; }
|
75
|
+
int64_t ts() { return ts_; }
|
76
|
+
int64_t tts() { return tts_; }
|
77
|
+
uint64_t duration() { return duration_; }
|
78
|
+
uint64_t cpu_duration() { return cpu_duration_; }
|
79
|
+
|
80
|
+
private:
|
81
|
+
int pid_;
|
82
|
+
int tid_;
|
83
|
+
char phase_;
|
84
|
+
const char* name_;
|
85
|
+
const char* scope_;
|
86
|
+
const uint8_t* category_enabled_flag_;
|
87
|
+
uint64_t id_;
|
88
|
+
uint64_t bind_id_;
|
89
|
+
int num_args_ = 0;
|
90
|
+
const char* arg_names_[kTraceMaxNumArgs];
|
91
|
+
uint8_t arg_types_[kTraceMaxNumArgs];
|
92
|
+
ArgValue arg_values_[kTraceMaxNumArgs];
|
93
|
+
std::unique_ptr<v8::ConvertableToTraceFormat>
|
94
|
+
arg_convertables_[kTraceMaxNumArgs];
|
95
|
+
char* parameter_copy_storage_ = nullptr;
|
96
|
+
unsigned int flags_;
|
97
|
+
int64_t ts_;
|
98
|
+
int64_t tts_;
|
99
|
+
uint64_t duration_;
|
100
|
+
uint64_t cpu_duration_;
|
101
|
+
|
102
|
+
// Disallow copy and assign
|
103
|
+
TraceObject(const TraceObject&) = delete;
|
104
|
+
void operator=(const TraceObject&) = delete;
|
105
|
+
};
|
106
|
+
|
107
|
+
class V8_PLATFORM_EXPORT TraceWriter {
|
108
|
+
public:
|
109
|
+
TraceWriter() {}
|
110
|
+
virtual ~TraceWriter() {}
|
111
|
+
virtual void AppendTraceEvent(TraceObject* trace_event) = 0;
|
112
|
+
virtual void Flush() = 0;
|
113
|
+
|
114
|
+
static TraceWriter* CreateJSONTraceWriter(std::ostream& stream);
|
115
|
+
|
116
|
+
private:
|
117
|
+
// Disallow copy and assign
|
118
|
+
TraceWriter(const TraceWriter&) = delete;
|
119
|
+
void operator=(const TraceWriter&) = delete;
|
120
|
+
};
|
121
|
+
|
122
|
+
class V8_PLATFORM_EXPORT TraceBufferChunk {
|
123
|
+
public:
|
124
|
+
explicit TraceBufferChunk(uint32_t seq);
|
125
|
+
|
126
|
+
void Reset(uint32_t new_seq);
|
127
|
+
bool IsFull() const { return next_free_ == kChunkSize; }
|
128
|
+
TraceObject* AddTraceEvent(size_t* event_index);
|
129
|
+
TraceObject* GetEventAt(size_t index) { return &chunk_[index]; }
|
130
|
+
|
131
|
+
uint32_t seq() const { return seq_; }
|
132
|
+
size_t size() const { return next_free_; }
|
133
|
+
|
134
|
+
static const size_t kChunkSize = 64;
|
135
|
+
|
136
|
+
private:
|
137
|
+
size_t next_free_ = 0;
|
138
|
+
TraceObject chunk_[kChunkSize];
|
139
|
+
uint32_t seq_;
|
140
|
+
|
141
|
+
// Disallow copy and assign
|
142
|
+
TraceBufferChunk(const TraceBufferChunk&) = delete;
|
143
|
+
void operator=(const TraceBufferChunk&) = delete;
|
144
|
+
};
|
145
|
+
|
146
|
+
class V8_PLATFORM_EXPORT TraceBuffer {
|
147
|
+
public:
|
148
|
+
TraceBuffer() {}
|
149
|
+
virtual ~TraceBuffer() {}
|
150
|
+
|
151
|
+
virtual TraceObject* AddTraceEvent(uint64_t* handle) = 0;
|
152
|
+
virtual TraceObject* GetEventByHandle(uint64_t handle) = 0;
|
153
|
+
virtual bool Flush() = 0;
|
154
|
+
|
155
|
+
static const size_t kRingBufferChunks = 1024;
|
156
|
+
|
157
|
+
static TraceBuffer* CreateTraceBufferRingBuffer(size_t max_chunks,
|
158
|
+
TraceWriter* trace_writer);
|
159
|
+
|
160
|
+
private:
|
161
|
+
// Disallow copy and assign
|
162
|
+
TraceBuffer(const TraceBuffer&) = delete;
|
163
|
+
void operator=(const TraceBuffer&) = delete;
|
164
|
+
};
|
165
|
+
|
166
|
+
// Options determines how the trace buffer stores data.
|
167
|
+
enum TraceRecordMode {
|
168
|
+
// Record until the trace buffer is full.
|
169
|
+
RECORD_UNTIL_FULL,
|
170
|
+
|
171
|
+
// Record until the user ends the trace. The trace buffer is a fixed size
|
172
|
+
// and we use it as a ring buffer during recording.
|
173
|
+
RECORD_CONTINUOUSLY,
|
174
|
+
|
175
|
+
// Record until the trace buffer is full, but with a huge buffer size.
|
176
|
+
RECORD_AS_MUCH_AS_POSSIBLE,
|
177
|
+
|
178
|
+
// Echo to console. Events are discarded.
|
179
|
+
ECHO_TO_CONSOLE,
|
180
|
+
};
|
181
|
+
|
182
|
+
class V8_PLATFORM_EXPORT TraceConfig {
|
183
|
+
public:
|
184
|
+
typedef std::vector<std::string> StringList;
|
185
|
+
|
186
|
+
static TraceConfig* CreateDefaultTraceConfig();
|
187
|
+
|
188
|
+
TraceConfig() : enable_systrace_(false), enable_argument_filter_(false) {}
|
189
|
+
TraceRecordMode GetTraceRecordMode() const { return record_mode_; }
|
190
|
+
bool IsSystraceEnabled() const { return enable_systrace_; }
|
191
|
+
bool IsArgumentFilterEnabled() const { return enable_argument_filter_; }
|
192
|
+
|
193
|
+
void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; }
|
194
|
+
void EnableSystrace() { enable_systrace_ = true; }
|
195
|
+
void EnableArgumentFilter() { enable_argument_filter_ = true; }
|
196
|
+
|
197
|
+
void AddIncludedCategory(const char* included_category);
|
198
|
+
|
199
|
+
bool IsCategoryGroupEnabled(const char* category_group) const;
|
200
|
+
|
201
|
+
private:
|
202
|
+
TraceRecordMode record_mode_;
|
203
|
+
bool enable_systrace_ : 1;
|
204
|
+
bool enable_argument_filter_ : 1;
|
205
|
+
StringList included_categories_;
|
206
|
+
|
207
|
+
// Disallow copy and assign
|
208
|
+
TraceConfig(const TraceConfig&) = delete;
|
209
|
+
void operator=(const TraceConfig&) = delete;
|
210
|
+
};
|
211
|
+
|
212
|
+
class V8_PLATFORM_EXPORT TracingController {
|
213
|
+
public:
|
214
|
+
enum Mode { DISABLED = 0, RECORDING_MODE };
|
215
|
+
|
216
|
+
// The pointer returned from GetCategoryGroupEnabledInternal() points to a
|
217
|
+
// value with zero or more of the following bits. Used in this class only.
|
218
|
+
// The TRACE_EVENT macros should only use the value as a bool.
|
219
|
+
// These values must be in sync with macro values in TraceEvent.h in Blink.
|
220
|
+
enum CategoryGroupEnabledFlags {
|
221
|
+
// Category group enabled for the recording mode.
|
222
|
+
ENABLED_FOR_RECORDING = 1 << 0,
|
223
|
+
// Category group enabled by SetEventCallbackEnabled().
|
224
|
+
ENABLED_FOR_EVENT_CALLBACK = 1 << 2,
|
225
|
+
// Category group enabled to export events to ETW.
|
226
|
+
ENABLED_FOR_ETW_EXPORT = 1 << 3
|
227
|
+
};
|
228
|
+
|
229
|
+
TracingController();
|
230
|
+
~TracingController();
|
231
|
+
void Initialize(TraceBuffer* trace_buffer);
|
232
|
+
const uint8_t* GetCategoryGroupEnabled(const char* category_group);
|
233
|
+
static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag);
|
234
|
+
uint64_t AddTraceEvent(
|
235
|
+
char phase, const uint8_t* category_enabled_flag, const char* name,
|
236
|
+
const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,
|
237
|
+
const char** arg_names, const uint8_t* arg_types,
|
238
|
+
const uint64_t* arg_values,
|
239
|
+
std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
|
240
|
+
unsigned int flags);
|
241
|
+
void UpdateTraceEventDuration(const uint8_t* category_enabled_flag,
|
242
|
+
const char* name, uint64_t handle);
|
243
|
+
|
244
|
+
void StartTracing(TraceConfig* trace_config);
|
245
|
+
void StopTracing();
|
246
|
+
|
247
|
+
void AddTraceStateObserver(Platform::TraceStateObserver* observer);
|
248
|
+
void RemoveTraceStateObserver(Platform::TraceStateObserver* observer);
|
249
|
+
|
250
|
+
private:
|
251
|
+
const uint8_t* GetCategoryGroupEnabledInternal(const char* category_group);
|
252
|
+
void UpdateCategoryGroupEnabledFlag(size_t category_index);
|
253
|
+
void UpdateCategoryGroupEnabledFlags();
|
254
|
+
|
255
|
+
std::unique_ptr<TraceBuffer> trace_buffer_;
|
256
|
+
std::unique_ptr<TraceConfig> trace_config_;
|
257
|
+
std::unique_ptr<base::Mutex> mutex_;
|
258
|
+
std::unordered_set<Platform::TraceStateObserver*> observers_;
|
259
|
+
Mode mode_ = DISABLED;
|
260
|
+
|
261
|
+
// Disallow copy and assign
|
262
|
+
TracingController(const TracingController&) = delete;
|
263
|
+
void operator=(const TracingController&) = delete;
|
264
|
+
};
|
265
|
+
|
266
|
+
} // namespace tracing
|
267
|
+
} // namespace platform
|
268
|
+
} // namespace v8
|
269
|
+
|
270
|
+
#endif // V8_LIBPLATFORM_V8_TRACING_H_
|
@@ -16,11 +16,9 @@ namespace v8 {
|
|
16
16
|
enum DebugEvent {
|
17
17
|
Break = 1,
|
18
18
|
Exception = 2,
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
CompileError = 6,
|
23
|
-
AsyncTaskEvent = 7,
|
19
|
+
AfterCompile = 3,
|
20
|
+
CompileError = 4,
|
21
|
+
AsyncTaskEvent = 5,
|
24
22
|
};
|
25
23
|
|
26
24
|
class V8_EXPORT Debug {
|
@@ -87,7 +85,6 @@ class V8_EXPORT Debug {
|
|
87
85
|
virtual ~Message() {}
|
88
86
|
};
|
89
87
|
|
90
|
-
|
91
88
|
/**
|
92
89
|
* An event details object passed to the debug event listener.
|
93
90
|
*/
|
@@ -145,7 +142,7 @@ class V8_EXPORT Debug {
|
|
145
142
|
*
|
146
143
|
* \param message the debug message handler message object
|
147
144
|
*
|
148
|
-
* A
|
145
|
+
* A MessageHandler does not take possession of the message data,
|
149
146
|
* and must not rely on the data persisting after the handler returns.
|
150
147
|
*/
|
151
148
|
typedef void (*MessageHandler)(const Message& message);
|
@@ -157,9 +154,6 @@ class V8_EXPORT Debug {
|
|
157
154
|
|
158
155
|
static bool SetDebugEventListener(Isolate* isolate, EventCallback that,
|
159
156
|
Local<Value> data = Local<Value>());
|
160
|
-
V8_DEPRECATED("Use version with an Isolate",
|
161
|
-
static bool SetDebugEventListener(
|
162
|
-
EventCallback that, Local<Value> data = Local<Value>()));
|
163
157
|
|
164
158
|
// Schedule a debugger break to happen when JavaScript code is run
|
165
159
|
// in the given isolate.
|
@@ -170,38 +164,37 @@ class V8_EXPORT Debug {
|
|
170
164
|
static void CancelDebugBreak(Isolate* isolate);
|
171
165
|
|
172
166
|
// Check if a debugger break is scheduled in the given isolate.
|
173
|
-
|
167
|
+
V8_DEPRECATED("No longer supported",
|
168
|
+
static bool CheckDebugBreak(Isolate* isolate));
|
174
169
|
|
175
170
|
// Message based interface. The message protocol is JSON.
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
Local<Value> Call(v8::Local<v8::Function> fun,
|
204
|
-
Local<Value> data = Local<Value>()));
|
171
|
+
V8_DEPRECATED("No longer supported",
|
172
|
+
static void SetMessageHandler(Isolate* isolate,
|
173
|
+
MessageHandler handler));
|
174
|
+
|
175
|
+
V8_DEPRECATED("No longer supported",
|
176
|
+
static void SendCommand(Isolate* isolate,
|
177
|
+
const uint16_t* command, int length,
|
178
|
+
ClientData* client_data = NULL));
|
179
|
+
|
180
|
+
/**
|
181
|
+
* Run a JavaScript function in the debugger.
|
182
|
+
* \param fun the function to call
|
183
|
+
* \param data passed as second argument to the function
|
184
|
+
* With this call the debugger is entered and the function specified is called
|
185
|
+
* with the execution state as the first argument. This makes it possible to
|
186
|
+
* get access to information otherwise not available during normal JavaScript
|
187
|
+
* execution e.g. details on stack frames. Receiver of the function call will
|
188
|
+
* be the debugger context global object, however this is a subject to change.
|
189
|
+
* The following example shows a JavaScript function which when passed to
|
190
|
+
* v8::Debug::Call will return the current line of JavaScript execution.
|
191
|
+
*
|
192
|
+
* \code
|
193
|
+
* function frame_source_line(exec_state) {
|
194
|
+
* return exec_state.frame(0).sourceLine();
|
195
|
+
* }
|
196
|
+
* \endcode
|
197
|
+
*/
|
205
198
|
// TODO(dcarney): data arg should be a MaybeLocal
|
206
199
|
static MaybeLocal<Value> Call(Local<Context> context,
|
207
200
|
v8::Local<v8::Function> fun,
|
@@ -210,10 +203,9 @@ class V8_EXPORT Debug {
|
|
210
203
|
/**
|
211
204
|
* Returns a mirror object for the given object.
|
212
205
|
*/
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
v8::Local<v8::Value> obj);
|
206
|
+
V8_DEPRECATED("No longer supported",
|
207
|
+
static MaybeLocal<Value> GetMirror(Local<Context> context,
|
208
|
+
v8::Local<v8::Value> obj));
|
217
209
|
|
218
210
|
/**
|
219
211
|
* Makes V8 process all pending debug messages.
|
@@ -246,9 +238,8 @@ class V8_EXPORT Debug {
|
|
246
238
|
* "Evaluate" debug command behavior currently is not specified in scope
|
247
239
|
* of this method.
|
248
240
|
*/
|
249
|
-
|
250
|
-
|
251
|
-
static void ProcessDebugMessages());
|
241
|
+
V8_DEPRECATED("No longer supported",
|
242
|
+
static void ProcessDebugMessages(Isolate* isolate));
|
252
243
|
|
253
244
|
/**
|
254
245
|
* Debugger is running in its own context which is entered while debugger
|
@@ -257,15 +248,16 @@ class V8_EXPORT Debug {
|
|
257
248
|
* to change. The Context exists only when the debugger is active, i.e. at
|
258
249
|
* least one DebugEventListener or MessageHandler is set.
|
259
250
|
*/
|
260
|
-
|
261
|
-
|
262
|
-
static Local<Context> GetDebugContext());
|
251
|
+
V8_DEPRECATED("Use v8-inspector",
|
252
|
+
static Local<Context> GetDebugContext(Isolate* isolate));
|
263
253
|
|
264
254
|
/**
|
265
255
|
* While in the debug context, this method returns the top-most non-debug
|
266
256
|
* context, if it exists.
|
267
257
|
*/
|
268
|
-
|
258
|
+
V8_DEPRECATED(
|
259
|
+
"No longer supported",
|
260
|
+
static MaybeLocal<Context> GetDebuggedContext(Isolate* isolate));
|
269
261
|
|
270
262
|
/**
|
271
263
|
* Enable/disable LiveEdit functionality for the given Isolate
|