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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 | 871 |
872 void V8DebuggerImpl::disconnect(V8InspectorSessionImpl* session) | 872 void V8DebuggerImpl::disconnect(V8InspectorSessionImpl* session) |
873 { | 873 { |
874 DCHECK(m_sessions.find(session->contextGroupId()) != m_sessions.end()); | 874 DCHECK(m_sessions.find(session->contextGroupId()) != m_sessions.end()); |
875 m_sessions.erase(session->contextGroupId()); | 875 m_sessions.erase(session->contextGroupId()); |
876 } | 876 } |
877 | 877 |
878 InspectedContext* V8DebuggerImpl::getContext(int groupId, int contextId) const | 878 InspectedContext* V8DebuggerImpl::getContext(int groupId, int contextId) const |
879 { | 879 { |
880 ContextsByGroupMap::const_iterator contextGroupIt = m_contexts.find(groupId)
; | 880 ContextsByGroupMap::const_iterator contextGroupIt = m_contexts.find(groupId)
; |
881 if (contextGroupIt == m_contexts.cend()) | 881 if (contextGroupIt == m_contexts.end()) |
882 return nullptr; | 882 return nullptr; |
883 | 883 |
884 ContextByIdMap::iterator contextIt = contextGroupIt->second->find(contextId)
; | 884 ContextByIdMap::iterator contextIt = contextGroupIt->second->find(contextId)
; |
885 if (contextIt == contextGroupIt->second->end()) | 885 if (contextIt == contextGroupIt->second->end()) |
886 return nullptr; | 886 return nullptr; |
887 | 887 |
888 return contextIt->second.get(); | 888 return contextIt->second.get(); |
889 } | 889 } |
890 | 890 |
891 void V8DebuggerImpl::contextCreated(const V8ContextInfo& info) | 891 void V8DebuggerImpl::contextCreated(const V8ContextInfo& info) |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 | 1144 |
1145 V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI
d) | 1145 V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI
d) |
1146 { | 1146 { |
1147 if (!contextGroupId) | 1147 if (!contextGroupId) |
1148 return nullptr; | 1148 return nullptr; |
1149 SessionMap::iterator iter = m_sessions.find(contextGroupId); | 1149 SessionMap::iterator iter = m_sessions.find(contextGroupId); |
1150 return iter == m_sessions.end() ? nullptr : iter->second; | 1150 return iter == m_sessions.end() ? nullptr : iter->second; |
1151 } | 1151 } |
1152 | 1152 |
1153 } // namespace blink | 1153 } // namespace blink |
OLD | NEW |