@@ -65,15 +65,15 @@ class V8_EXPORT StringView {
6565class V8_EXPORT StringBuffer {
6666 public:
6767 virtual ~StringBuffer () = default ;
68- virtual const StringView& string () = 0;
68+ virtual StringView string () const = 0;
6969 // This method copies contents.
70- static std::unique_ptr<StringBuffer> create (const StringView& );
70+ static std::unique_ptr<StringBuffer> create (StringView);
7171};
7272
7373class V8_EXPORT V8ContextInfo {
7474 public:
7575 V8ContextInfo (v8::Local<v8::Context> context, int contextGroupId,
76- const StringView& humanReadableName)
76+ StringView humanReadableName)
7777 : context(context),
7878 contextGroupId (contextGroupId),
7979 humanReadableName(humanReadableName),
@@ -132,37 +132,36 @@ class V8_EXPORT V8InspectorSession {
132132 virtual void addInspectedObject (std::unique_ptr<Inspectable>) = 0;
133133
134134 // 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;
137137 virtual std::vector<uint8_t > state () = 0;
138138 virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>>
139139 supportedDomains () = 0 ;
140140
141141 // Debugger actions.
142- virtual void schedulePauseOnNextStatement (const StringView& breakReason,
143- const StringView& breakDetails) = 0;
142+ virtual void schedulePauseOnNextStatement (StringView breakReason,
143+ StringView breakDetails) = 0;
144144 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;
147147 virtual void setSkipAllPauses (bool ) = 0;
148148 virtual void resume () = 0;
149149 virtual void stepOver () = 0;
150150 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 ;
153153
154154 // Remote objects.
155155 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,
157157 bool generatePreview) = 0;
158158
159159 virtual bool unwrapObject (std::unique_ptr<StringBuffer>* error,
160- const StringView& objectId, v8::Local<v8::Value>*,
160+ StringView objectId, v8::Local<v8::Value>*,
161161 v8::Local<v8::Context>*,
162162 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;
166165};
167166
168167class V8_EXPORT V8InspectorClient {
@@ -240,7 +239,7 @@ struct V8_EXPORT V8StackTraceId {
240239 V8StackTraceId (uintptr_t id, const std::pair<int64_t , int64_t > debugger_id);
241240 V8StackTraceId (uintptr_t id, const std::pair<int64_t , int64_t > debugger_id,
242241 bool should_pause);
243- explicit V8StackTraceId (const StringView& );
242+ explicit V8StackTraceId (StringView);
244243 V8StackTraceId& operator =(const V8StackTraceId&) = default ;
245244 V8StackTraceId& operator =(V8StackTraceId&&) noexcept = default ;
246245 ~V8StackTraceId () = default ;
@@ -265,26 +264,26 @@ class V8_EXPORT V8Inspector {
265264 virtual void idleFinished () = 0;
266265
267266 // Async stack traces instrumentation.
268- virtual void asyncTaskScheduled (const StringView& taskName, void * task,
267+ virtual void asyncTaskScheduled (StringView taskName, void * task,
269268 bool recurring) = 0;
270269 virtual void asyncTaskCanceled (void * task) = 0;
271270 virtual void asyncTaskStarted (void * task) = 0;
272271 virtual void asyncTaskFinished (void * task) = 0;
273272 virtual void allAsyncTasksCanceled () = 0;
274273
275- virtual V8StackTraceId storeCurrentStackTrace (
276- const StringView& description) = 0;
274+ virtual V8StackTraceId storeCurrentStackTrace (StringView description) = 0;
277275 virtual void externalAsyncTaskStarted (const V8StackTraceId& parent) = 0;
278276 virtual void externalAsyncTaskFinished (const V8StackTraceId& parent) = 0;
279277
280278 // 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;
286285 virtual void exceptionRevoked (v8::Local<v8::Context>, unsigned exceptionId,
287- const StringView& message) = 0;
286+ StringView message) = 0;
288287
289288 // Connection.
290289 class V8_EXPORT Channel {
@@ -295,8 +294,9 @@ class V8_EXPORT V8Inspector {
295294 virtual void sendNotification (std::unique_ptr<StringBuffer> message) = 0;
296295 virtual void flushProtocolNotifications () = 0;
297296 };
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;
300300
301301 // API methods.
302302 virtual std::unique_ptr<V8StackTrace> createStackTrace (
0 commit comments