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

Side by Side Diff: src/inspector/v8-inspector-session-impl.cc

Issue 2558913004: [inspector] Store interger in context embedder data instead of a string. (Closed)
Patch Set: review comments Created 4 years 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-inspector-impl.cc ('k') | src/inspector/v8-runtime-agent-impl.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 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 #include "src/inspector/v8-inspector-session-impl.h" 5 #include "src/inspector/v8-inspector-session-impl.h"
6 6
7 #include "src/inspector/injected-script.h" 7 #include "src/inspector/injected-script.h"
8 #include "src/inspector/inspected-context.h" 8 #include "src/inspector/inspected-context.h"
9 #include "src/inspector/protocol/Protocol.h" 9 #include "src/inspector/protocol/Protocol.h"
10 #include "src/inspector/remote-object-id.h" 10 #include "src/inspector/remote-object-id.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 const StringView& groupName) { 288 const StringView& groupName) {
289 return wrapObject(context, value, toString16(groupName), false); 289 return wrapObject(context, value, toString16(groupName), false);
290 } 290 }
291 291
292 std::unique_ptr<protocol::Runtime::RemoteObject> 292 std::unique_ptr<protocol::Runtime::RemoteObject>
293 V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context, 293 V8InspectorSessionImpl::wrapObject(v8::Local<v8::Context> context,
294 v8::Local<v8::Value> value, 294 v8::Local<v8::Value> value,
295 const String16& groupName, 295 const String16& groupName,
296 bool generatePreview) { 296 bool generatePreview) {
297 InjectedScript* injectedScript = nullptr; 297 InjectedScript* injectedScript = nullptr;
298 findInjectedScript(V8Debugger::contextId(context), injectedScript); 298 findInjectedScript(InspectedContext::contextId(context), injectedScript);
299 if (!injectedScript) return nullptr; 299 if (!injectedScript) return nullptr;
300 std::unique_ptr<protocol::Runtime::RemoteObject> result; 300 std::unique_ptr<protocol::Runtime::RemoteObject> result;
301 injectedScript->wrapObject(value, groupName, false, generatePreview, &result); 301 injectedScript->wrapObject(value, groupName, false, generatePreview, &result);
302 return result; 302 return result;
303 } 303 }
304 304
305 std::unique_ptr<protocol::Runtime::RemoteObject> 305 std::unique_ptr<protocol::Runtime::RemoteObject>
306 V8InspectorSessionImpl::wrapTable(v8::Local<v8::Context> context, 306 V8InspectorSessionImpl::wrapTable(v8::Local<v8::Context> context,
307 v8::Local<v8::Value> table, 307 v8::Local<v8::Value> table,
308 v8::Local<v8::Value> columns) { 308 v8::Local<v8::Value> columns) {
309 InjectedScript* injectedScript = nullptr; 309 InjectedScript* injectedScript = nullptr;
310 findInjectedScript(V8Debugger::contextId(context), injectedScript); 310 findInjectedScript(InspectedContext::contextId(context), injectedScript);
311 if (!injectedScript) return nullptr; 311 if (!injectedScript) return nullptr;
312 return injectedScript->wrapTable(table, columns); 312 return injectedScript->wrapTable(table, columns);
313 } 313 }
314 314
315 void V8InspectorSessionImpl::setCustomObjectFormatterEnabled(bool enabled) { 315 void V8InspectorSessionImpl::setCustomObjectFormatterEnabled(bool enabled) {
316 m_customObjectFormatterEnabled = enabled; 316 m_customObjectFormatterEnabled = enabled;
317 const V8InspectorImpl::ContextByIdMap* contexts = 317 const V8InspectorImpl::ContextByIdMap* contexts =
318 m_inspector->contextGroup(m_contextGroupId); 318 m_inspector->contextGroup(m_contextGroupId);
319 if (!contexts) return; 319 if (!contexts) return;
320 for (auto& idContext : *contexts) { 320 for (auto& idContext : *contexts) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches = 427 std::vector<std::unique_ptr<protocol::Debugger::SearchMatch>> matches =
428 searchInTextByLinesImpl(this, toString16(text), toString16(query), 428 searchInTextByLinesImpl(this, toString16(text), toString16(query),
429 caseSensitive, isRegex); 429 caseSensitive, isRegex);
430 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> result; 430 std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> result;
431 for (size_t i = 0; i < matches.size(); ++i) 431 for (size_t i = 0; i < matches.size(); ++i)
432 result.push_back(std::move(matches[i])); 432 result.push_back(std::move(matches[i]));
433 return result; 433 return result;
434 } 434 }
435 435
436 } // namespace v8_inspector 436 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-inspector-impl.cc ('k') | src/inspector/v8-runtime-agent-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698