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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorImpl.cpp

Issue 2318853002: [DevTools] Handle navigation in console.log (Closed)
Patch Set: Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (c) 2010-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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 V8ConsoleMessageStorage* V8InspectorImpl::ensureConsoleMessageStorage(int contex tGroupId) 157 V8ConsoleMessageStorage* V8InspectorImpl::ensureConsoleMessageStorage(int contex tGroupId)
158 { 158 {
159 ConsoleStorageMap::iterator storageIt = m_consoleStorageMap.find(contextGrou pId); 159 ConsoleStorageMap::iterator storageIt = m_consoleStorageMap.find(contextGrou pId);
160 if (storageIt == m_consoleStorageMap.end()) 160 if (storageIt == m_consoleStorageMap.end())
161 storageIt = m_consoleStorageMap.insert(std::make_pair(contextGroupId, wr apUnique(new V8ConsoleMessageStorage(this, contextGroupId)))).first; 161 storageIt = m_consoleStorageMap.insert(std::make_pair(contextGroupId, wr apUnique(new V8ConsoleMessageStorage(this, contextGroupId)))).first;
162 return storageIt->second.get(); 162 return storageIt->second.get();
163 } 163 }
164 164
165 bool V8InspectorImpl::hasConsoleMessageStorage(int contextGroupId)
166 {
167 ConsoleStorageMap::iterator storageIt = m_consoleStorageMap.find(contextGrou pId);
168 return storageIt != m_consoleStorageMap.end();
169 }
170
165 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St ackTrace> stackTrace) 171 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St ackTrace> stackTrace)
166 { 172 {
167 return m_debugger->createStackTrace(stackTrace); 173 return m_debugger->createStackTrace(stackTrace);
168 } 174 }
169 175
170 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId, V8Inspector::Channel* channel, const StringView& state) 176 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId, V8Inspector::Channel* channel, const StringView& state)
171 { 177 {
172 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend()); 178 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend());
173 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr eate(this, contextGroupId, channel, state); 179 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr eate(this, contextGroupId, channel, state);
174 m_sessions[contextGroupId] = session.get(); 180 m_sessions[contextGroupId] = session.get();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 348
343 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup Id) 349 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup Id)
344 { 350 {
345 if (!contextGroupId) 351 if (!contextGroupId)
346 return nullptr; 352 return nullptr;
347 SessionMap::iterator iter = m_sessions.find(contextGroupId); 353 SessionMap::iterator iter = m_sessions.find(contextGroupId);
348 return iter == m_sessions.end() ? nullptr : iter->second; 354 return iter == m_sessions.end() ? nullptr : iter->second;
349 } 355 }
350 356
351 } // namespace v8_inspector 357 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698