@@ -65,15 +65,15 @@ class V8_EXPORT StringView {
65
65
class V8_EXPORT StringBuffer {
66
66
public:
67
67
virtual ~StringBuffer () = default ;
68
- virtual const StringView& string () = 0;
68
+ virtual StringView string () const = 0;
69
69
// This method copies contents.
70
- static std::unique_ptr<StringBuffer> create (const StringView& );
70
+ static std::unique_ptr<StringBuffer> create (StringView);
71
71
};
72
72
73
73
class V8_EXPORT V8ContextInfo {
74
74
public:
75
75
V8ContextInfo (v8::Local<v8::Context> context, int contextGroupId,
76
- const StringView& humanReadableName)
76
+ StringView humanReadableName)
77
77
: context(context),
78
78
contextGroupId (contextGroupId),
79
79
humanReadableName(humanReadableName),
@@ -132,37 +132,36 @@ class V8_EXPORT V8InspectorSession {
132
132
virtual void addInspectedObject (std::unique_ptr<Inspectable>) = 0;
133
133
134
134
// Dispatching protocol messages.
135
- static bool canDispatchMethod (const StringView& method);
136
- virtual void dispatchProtocolMessage (const StringView& message) = 0;
135
+ static bool canDispatchMethod (StringView method);
136
+ virtual void dispatchProtocolMessage (StringView message) = 0;
137
137
virtual std::vector<uint8_t > state () = 0;
138
138
virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
139
139
supportedDomains () = 0 ;
140
140
141
141
// Debugger actions.
142
- virtual void schedulePauseOnNextStatement (const StringView& breakReason,
143
- const StringView& breakDetails) = 0;
142
+ virtual void schedulePauseOnNextStatement (StringView breakReason,
143
+ StringView breakDetails) = 0;
144
144
virtual void cancelPauseOnNextStatement () = 0;
145
- virtual void breakProgram (const StringView& breakReason,
146
- const StringView& breakDetails) = 0;
145
+ virtual void breakProgram (StringView breakReason,
146
+ StringView breakDetails) = 0;
147
147
virtual void setSkipAllPauses (bool ) = 0;
148
148
virtual void resume () = 0;
149
149
virtual void stepOver () = 0;
150
150
virtual std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>>
151
- searchInTextByLines (const StringView& text, const StringView& query,
152
- bool caseSensitive, bool isRegex) = 0 ;
151
+ searchInTextByLines (StringView text, StringView query, bool caseSensitive ,
152
+ bool isRegex) = 0 ;
153
153
154
154
// Remote objects.
155
155
virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject (
156
- v8::Local<v8::Context>, v8::Local<v8::Value>, const StringView& groupName,
156
+ v8::Local<v8::Context>, v8::Local<v8::Value>, StringView groupName,
157
157
bool generatePreview) = 0;
158
158
159
159
virtual bool unwrapObject (std::unique_ptr<StringBuffer>* error,
160
- const StringView& objectId, v8::Local<v8::Value>*,
160
+ StringView objectId, v8::Local<v8::Value>*,
161
161
v8::Local<v8::Context>*,
162
162
std::unique_ptr<StringBuffer>* objectGroup) = 0;
163
- virtual void releaseObjectGroup (const StringView&) = 0;
164
- virtual void triggerPreciseCoverageDeltaUpdate (
165
- const StringView& occassion) = 0;
163
+ virtual void releaseObjectGroup (StringView) = 0;
164
+ virtual void triggerPreciseCoverageDeltaUpdate (StringView occassion) = 0;
166
165
};
167
166
168
167
class V8_EXPORT V8InspectorClient {
@@ -240,7 +239,7 @@ struct V8_EXPORT V8StackTraceId {
240
239
V8StackTraceId (uintptr_t id, const std::pair<int64_t , int64_t > debugger_id);
241
240
V8StackTraceId (uintptr_t id, const std::pair<int64_t , int64_t > debugger_id,
242
241
bool should_pause);
243
- explicit V8StackTraceId (const StringView& );
242
+ explicit V8StackTraceId (StringView);
244
243
V8StackTraceId& operator =(const V8StackTraceId&) = default ;
245
244
V8StackTraceId& operator =(V8StackTraceId&&) noexcept = default ;
246
245
~V8StackTraceId () = default ;
@@ -265,26 +264,26 @@ class V8_EXPORT V8Inspector {
265
264
virtual void idleFinished () = 0;
266
265
267
266
// Async stack traces instrumentation.
268
- virtual void asyncTaskScheduled (const StringView& taskName, void * task,
267
+ virtual void asyncTaskScheduled (StringView taskName, void * task,
269
268
bool recurring) = 0;
270
269
virtual void asyncTaskCanceled (void * task) = 0;
271
270
virtual void asyncTaskStarted (void * task) = 0;
272
271
virtual void asyncTaskFinished (void * task) = 0;
273
272
virtual void allAsyncTasksCanceled () = 0;
274
273
275
- virtual V8StackTraceId storeCurrentStackTrace (
276
- const StringView& description) = 0;
274
+ virtual V8StackTraceId storeCurrentStackTrace (StringView description) = 0;
277
275
virtual void externalAsyncTaskStarted (const V8StackTraceId& parent) = 0;
278
276
virtual void externalAsyncTaskFinished (const V8StackTraceId& parent) = 0;
279
277
280
278
// Exceptions instrumentation.
281
- virtual unsigned exceptionThrown (
282
- v8::Local<v8::Context>, const StringView& message,
283
- v8::Local<v8::Value> exception , const StringView& detailedMessage,
284
- const StringView& url, unsigned lineNumber, unsigned columnNumber,
285
- std::unique_ptr<V8StackTrace>, int scriptId) = 0;
279
+ virtual unsigned exceptionThrown (v8::Local<v8::Context>, StringView message,
280
+ v8::Local<v8::Value> exception ,
281
+ StringView detailedMessage, StringView url,
282
+ unsigned lineNumber, unsigned columnNumber,
283
+ std::unique_ptr<V8StackTrace>,
284
+ int scriptId) = 0;
286
285
virtual void exceptionRevoked (v8::Local<v8::Context>, unsigned exceptionId,
287
- const StringView& message) = 0;
286
+ StringView message) = 0;
288
287
289
288
// Connection.
290
289
class V8_EXPORT Channel {
@@ -295,8 +294,9 @@ class V8_EXPORT V8Inspector {
295
294
virtual void sendNotification (std::unique_ptr<StringBuffer> message) = 0;
296
295
virtual void flushProtocolNotifications () = 0;
297
296
};
298
- virtual std::unique_ptr<V8InspectorSession> connect (
299
- int contextGroupId, Channel*, const StringView& state) = 0;
297
+ virtual std::unique_ptr<V8InspectorSession> connect (int contextGroupId,
298
+ Channel*,
299
+ StringView state) = 0;
300
300
301
301
// API methods.
302
302
virtual std::unique_ptr<V8StackTrace> createStackTrace (
0 commit comments