Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: src/inspector/v8-debugger-script.cc

Issue 2840923002: Revert of [inspector] always include user scripts in the snapshot. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 USE(script->ContextId().To(&m_executionContextId)); 141 v8::Local<v8::Value> contextData;
142 if (script->ContextData().ToLocal(&contextData) && contextData->IsInt32()) {
143 m_executionContextId =
144 static_cast<int>(contextData.As<v8::Int32>()->Value());
145 }
142 146
143 if (script->Source().ToLocal(&tmp)) { 147 if (script->Source().ToLocal(&tmp)) {
144 m_source = toProtocolString(tmp); 148 m_source = toProtocolString(tmp);
145 } 149 }
146 150
147 m_isModule = script->IsModule(); 151 m_isModule = script->IsModule();
148 152
149 m_script.Reset(m_isolate, script); 153 m_script.Reset(m_isolate, script);
150 } 154 }
151 155
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (m_hash.isEmpty()) m_hash = calculateHash(source()); 344 if (m_hash.isEmpty()) m_hash = calculateHash(source());
341 DCHECK(!m_hash.isEmpty()); 345 DCHECK(!m_hash.isEmpty());
342 return m_hash; 346 return m_hash;
343 } 347 }
344 348
345 void V8DebuggerScript::setSourceURL(const String16& sourceURL) { 349 void V8DebuggerScript::setSourceURL(const String16& sourceURL) {
346 m_sourceURL = sourceURL; 350 m_sourceURL = sourceURL;
347 } 351 }
348 352
349 } // namespace v8_inspector 353 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698