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

Side by Side Diff: src/inspector/v8-runtime-agent-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-session-impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 Response ensureContext(V8InspectorImpl* inspector, int contextGroupId, 234 Response ensureContext(V8InspectorImpl* inspector, int contextGroupId,
235 Maybe<int> executionContextId, int* contextId) { 235 Maybe<int> executionContextId, int* contextId) {
236 if (executionContextId.isJust()) { 236 if (executionContextId.isJust()) {
237 *contextId = executionContextId.fromJust(); 237 *contextId = executionContextId.fromJust();
238 } else { 238 } else {
239 v8::HandleScope handles(inspector->isolate()); 239 v8::HandleScope handles(inspector->isolate());
240 v8::Local<v8::Context> defaultContext = 240 v8::Local<v8::Context> defaultContext =
241 inspector->client()->ensureDefaultContextInGroup(contextGroupId); 241 inspector->client()->ensureDefaultContextInGroup(contextGroupId);
242 if (defaultContext.IsEmpty()) 242 if (defaultContext.IsEmpty())
243 return Response::Error("Cannot find default execution context"); 243 return Response::Error("Cannot find default execution context");
244 *contextId = V8Debugger::contextId(defaultContext); 244 *contextId = InspectedContext::contextId(defaultContext);
245 } 245 }
246 return Response::OK(); 246 return Response::OK();
247 } 247 }
248 248
249 } // namespace 249 } // namespace
250 250
251 V8RuntimeAgentImpl::V8RuntimeAgentImpl( 251 V8RuntimeAgentImpl::V8RuntimeAgentImpl(
252 V8InspectorSessionImpl* session, protocol::FrontendChannel* FrontendChannel, 252 V8InspectorSessionImpl* session, protocol::FrontendChannel* FrontendChannel,
253 protocol::DictionaryValue* state) 253 protocol::DictionaryValue* state)
254 : m_session(session), 254 : m_session(session),
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 } 730 }
731 731
732 bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, 732 bool V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message,
733 bool generatePreview) { 733 bool generatePreview) {
734 message->reportToFrontend(&m_frontend, m_session, generatePreview); 734 message->reportToFrontend(&m_frontend, m_session, generatePreview);
735 m_frontend.flush(); 735 m_frontend.flush();
736 return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId()); 736 return m_inspector->hasConsoleMessageStorage(m_session->contextGroupId());
737 } 737 }
738 738
739 } // namespace v8_inspector 739 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/v8-inspector-session-impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698