| OLD | NEW |
| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 if (storageIt == m_consoleStorageMap.end()) | 167 if (storageIt == m_consoleStorageMap.end()) |
| 168 storageIt = m_consoleStorageMap.insert(std::make_pair(contextGroupId, wr
apUnique(new V8ConsoleMessageStorage(this, contextGroupId)))).first; | 168 storageIt = m_consoleStorageMap.insert(std::make_pair(contextGroupId, wr
apUnique(new V8ConsoleMessageStorage(this, contextGroupId)))).first; |
| 169 return storageIt->second.get(); | 169 return storageIt->second.get(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St
ackTrace> stackTrace) | 172 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(v8::Local<v8::St
ackTrace> stackTrace) |
| 173 { | 173 { |
| 174 return m_debugger->createStackTrace(stackTrace); | 174 return m_debugger->createStackTrace(stackTrace); |
| 175 } | 175 } |
| 176 | 176 |
| 177 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId,
protocol::FrontendChannel* channel, V8InspectorSessionClient* client, const Str
ing16* state) | 177 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(int contextGroupId,
protocol::FrontendChannel* channel, const String16* state) |
| 178 { | 178 { |
| 179 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend()); | 179 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend()); |
| 180 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr
eate(this, contextGroupId, channel, client, state); | 180 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr
eate(this, contextGroupId, channel, state); |
| 181 m_sessions[contextGroupId] = session.get(); | 181 m_sessions[contextGroupId] = session.get(); |
| 182 return std::move(session); | 182 return std::move(session); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void V8InspectorImpl::disconnect(V8InspectorSessionImpl* session) | 185 void V8InspectorImpl::disconnect(V8InspectorSessionImpl* session) |
| 186 { | 186 { |
| 187 DCHECK(m_sessions.find(session->contextGroupId()) != m_sessions.end()); | 187 DCHECK(m_sessions.find(session->contextGroupId()) != m_sessions.end()); |
| 188 m_sessions.erase(session->contextGroupId()); | 188 m_sessions.erase(session->contextGroupId()); |
| 189 } | 189 } |
| 190 | 190 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 | 346 |
| 347 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup
Id) | 347 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup
Id) |
| 348 { | 348 { |
| 349 if (!contextGroupId) | 349 if (!contextGroupId) |
| 350 return nullptr; | 350 return nullptr; |
| 351 SessionMap::iterator iter = m_sessions.find(contextGroupId); | 351 SessionMap::iterator iter = m_sessions.find(contextGroupId); |
| 352 return iter == m_sessions.end() ? nullptr : iter->second; | 352 return iter == m_sessions.end() ? nullptr : iter->second; |
| 353 } | 353 } |
| 354 | 354 |
| 355 } // namespace blink | 355 } // namespace blink |
| OLD | NEW |