| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 if (lineEnds.size() > 1) { | 131 if (lineEnds.size() > 1) { |
| 132 m_endColumn = source_length - lineEnds[lineEnds.size() - 2] - 1; | 132 m_endColumn = source_length - lineEnds[lineEnds.size() - 2] - 1; |
| 133 } else { | 133 } else { |
| 134 m_endColumn = source_length + m_startColumn; | 134 m_endColumn = source_length + m_startColumn; |
| 135 } | 135 } |
| 136 } else { | 136 } else { |
| 137 m_endLine = m_startLine; | 137 m_endLine = m_startLine; |
| 138 m_endColumn = m_startColumn; | 138 m_endColumn = m_startColumn; |
| 139 } | 139 } |
| 140 | 140 |
| 141 v8::Local<v8::Value> contextData; | 141 USE(script->ContextId().To(&m_executionContextId)); |
| 142 if (script->ContextData().ToLocal(&contextData) && contextData->IsInt32()) { | |
| 143 m_executionContextId = | |
| 144 static_cast<int>(contextData.As<v8::Int32>()->Value()); | |
| 145 } | |
| 146 | 142 |
| 147 if (script->Source().ToLocal(&tmp)) { | 143 if (script->Source().ToLocal(&tmp)) { |
| 148 m_source = toProtocolString(tmp); | 144 m_source = toProtocolString(tmp); |
| 149 } | 145 } |
| 150 | 146 |
| 151 m_isModule = script->IsModule(); | 147 m_isModule = script->IsModule(); |
| 152 | 148 |
| 153 m_script.Reset(m_isolate, script); | 149 m_script.Reset(m_isolate, script); |
| 154 } | 150 } |
| 155 | 151 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 if (m_hash.isEmpty()) m_hash = calculateHash(source()); | 340 if (m_hash.isEmpty()) m_hash = calculateHash(source()); |
| 345 DCHECK(!m_hash.isEmpty()); | 341 DCHECK(!m_hash.isEmpty()); |
| 346 return m_hash; | 342 return m_hash; |
| 347 } | 343 } |
| 348 | 344 |
| 349 void V8DebuggerScript::setSourceURL(const String16& sourceURL) { | 345 void V8DebuggerScript::setSourceURL(const String16& sourceURL) { |
| 350 m_sourceURL = sourceURL; | 346 m_sourceURL = sourceURL; |
| 351 } | 347 } |
| 352 | 348 |
| 353 } // namespace v8_inspector | 349 } // namespace v8_inspector |
| OLD | NEW |