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