OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if !defined(_WIN32) && !defined(_WIN64) | 5 #if !defined(_WIN32) && !defined(_WIN64) |
6 #include <unistd.h> // NOLINT | 6 #include <unistd.h> // NOLINT |
7 #endif // !defined(_WIN32) && !defined(_WIN64) | 7 #endif // !defined(_WIN32) && !defined(_WIN64) |
8 | 8 |
9 #include "include/libplatform/libplatform.h" | 9 #include "include/libplatform/libplatform.h" |
10 #include "include/v8.h" | 10 #include "include/v8.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 new ExecuteStringTask(ToVector(args[0].As<v8::String>()))); | 150 new ExecuteStringTask(ToVector(args[0].As<v8::String>()))); |
151 } | 151 } |
152 } | 152 } |
153 }; | 153 }; |
154 | 154 |
155 v8::Local<v8::String> ToString(v8::Isolate* isolate, | 155 v8::Local<v8::String> ToString(v8::Isolate* isolate, |
156 const v8_inspector::StringView& string) { | 156 const v8_inspector::StringView& string) { |
157 if (string.is8Bit()) | 157 if (string.is8Bit()) |
158 return v8::String::NewFromOneByte(isolate, string.characters8(), | 158 return v8::String::NewFromOneByte(isolate, string.characters8(), |
159 v8::NewStringType::kNormal, | 159 v8::NewStringType::kNormal, |
160 string.length()) | 160 static_cast<int>(string.length())) |
161 .ToLocalChecked(); | 161 .ToLocalChecked(); |
162 else | 162 else |
163 return v8::String::NewFromTwoByte(isolate, string.characters16(), | 163 return v8::String::NewFromTwoByte(isolate, string.characters16(), |
164 v8::NewStringType::kNormal, | 164 v8::NewStringType::kNormal, |
165 string.length()) | 165 static_cast<int>(string.length())) |
166 .ToLocalChecked(); | 166 .ToLocalChecked(); |
167 } | 167 } |
168 | 168 |
169 class FrontendChannelImpl : public InspectorClientImpl::FrontendChannel { | 169 class FrontendChannelImpl : public InspectorClientImpl::FrontendChannel { |
170 public: | 170 public: |
171 explicit FrontendChannelImpl(TaskRunner* frontend_task_runner) | 171 explicit FrontendChannelImpl(TaskRunner* frontend_task_runner) |
172 : frontend_task_runner_(frontend_task_runner) {} | 172 : frontend_task_runner_(frontend_task_runner) {} |
173 virtual ~FrontendChannelImpl() {} | 173 virtual ~FrontendChannelImpl() {} |
174 | 174 |
175 void SendMessageToFrontend(const v8_inspector::StringView& message) final { | 175 void SendMessageToFrontend(const v8_inspector::StringView& message) final { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 fprintf(stderr, "Internal error: script file doesn't exists: %s\n", | 243 fprintf(stderr, "Internal error: script file doesn't exists: %s\n", |
244 argv[i]); | 244 argv[i]); |
245 Exit(); | 245 Exit(); |
246 } | 246 } |
247 frontend_runner.Append(new ExecuteStringTask(chars)); | 247 frontend_runner.Append(new ExecuteStringTask(chars)); |
248 } | 248 } |
249 | 249 |
250 frontend_runner.Join(); | 250 frontend_runner.Join(); |
251 return 0; | 251 return 0; |
252 } | 252 } |
OLD | NEW |