OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/inspector/v8-debugger-script.h" | 5 #include "src/inspector/v8-debugger-script.h" |
6 | 6 |
7 #include "src/inspector/inspected-context.h" | 7 #include "src/inspector/inspected-context.h" |
8 #include "src/inspector/string-util.h" | 8 #include "src/inspector/string-util.h" |
9 #include "src/inspector/wasm-translation.h" | 9 #include "src/inspector/wasm-translation.h" |
10 | 10 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 int last_newline = -1; | 243 int last_newline = -1; |
244 size_t next_newline = source.find('\n', last_newline + 1); | 244 size_t next_newline = source.find('\n', last_newline + 1); |
245 while (next_newline != String16::kNotFound) { | 245 while (next_newline != String16::kNotFound) { |
246 last_newline = static_cast<int>(next_newline); | 246 last_newline = static_cast<int>(next_newline); |
247 next_newline = source.find('\n', last_newline + 1); | 247 next_newline = source.find('\n', last_newline + 1); |
248 ++num_lines; | 248 ++num_lines; |
249 } | 249 } |
250 m_endLine = num_lines; | 250 m_endLine = num_lines; |
251 m_endColumn = static_cast<int>(source.length()) - last_newline - 1; | 251 m_endColumn = static_cast<int>(source.length()) - last_newline - 1; |
252 m_source = std::move(source); | 252 m_source = std::move(source); |
| 253 USE(script->ContextId().To(&m_executionContextId)); |
253 } | 254 } |
254 | 255 |
255 const String16& sourceMappingURL() const override { return emptyString(); } | 256 const String16& sourceMappingURL() const override { return emptyString(); } |
256 bool isLiveEdit() const override { return false; } | 257 bool isLiveEdit() const override { return false; } |
257 bool isModule() const override { return false; } | 258 bool isModule() const override { return false; } |
258 void setSourceMappingURL(const String16&) override {} | 259 void setSourceMappingURL(const String16&) override {} |
259 | 260 |
260 bool getPossibleBreakpoints( | 261 bool getPossibleBreakpoints( |
261 const v8::debug::Location& start, const v8::debug::Location& end, | 262 const v8::debug::Location& start, const v8::debug::Location& end, |
262 bool restrictToFunction, | 263 bool restrictToFunction, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 if (m_hash.isEmpty()) m_hash = calculateHash(source()); | 341 if (m_hash.isEmpty()) m_hash = calculateHash(source()); |
341 DCHECK(!m_hash.isEmpty()); | 342 DCHECK(!m_hash.isEmpty()); |
342 return m_hash; | 343 return m_hash; |
343 } | 344 } |
344 | 345 |
345 void V8DebuggerScript::setSourceURL(const String16& sourceURL) { | 346 void V8DebuggerScript::setSourceURL(const String16& sourceURL) { |
346 m_sourceURL = sourceURL; | 347 m_sourceURL = sourceURL; |
347 } | 348 } |
348 | 349 |
349 } // namespace v8_inspector | 350 } // namespace v8_inspector |
OLD | NEW |