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

Side by Side Diff: src/inspector/V8InspectorImpl.cpp

Issue 2323173004: [inspector] handle context destroyed after console.log (Closed)
Patch Set: fix formatting 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
« no previous file with comments | « src/inspector/V8InspectorImpl.h ('k') | src/inspector/V8RuntimeAgentImpl.h » ('j') | 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) 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (storageIt == m_consoleStorageMap.end()) 164 if (storageIt == m_consoleStorageMap.end())
165 storageIt = 165 storageIt =
166 m_consoleStorageMap 166 m_consoleStorageMap
167 .insert(std::make_pair( 167 .insert(std::make_pair(
168 contextGroupId, 168 contextGroupId,
169 wrapUnique(new V8ConsoleMessageStorage(this, contextGroupId)))) 169 wrapUnique(new V8ConsoleMessageStorage(this, contextGroupId))))
170 .first; 170 .first;
171 return storageIt->second.get(); 171 return storageIt->second.get();
172 } 172 }
173 173
174 bool V8InspectorImpl::hasConsoleMessageStorage(int contextGroupId) {
175 ConsoleStorageMap::iterator storageIt =
176 m_consoleStorageMap.find(contextGroupId);
177 return storageIt != m_consoleStorageMap.end();
178 }
179
174 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace( 180 std::unique_ptr<V8StackTrace> V8InspectorImpl::createStackTrace(
175 v8::Local<v8::StackTrace> stackTrace) { 181 v8::Local<v8::StackTrace> stackTrace) {
176 return m_debugger->createStackTrace(stackTrace); 182 return m_debugger->createStackTrace(stackTrace);
177 } 183 }
178 184
179 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect( 185 std::unique_ptr<V8InspectorSession> V8InspectorImpl::connect(
180 int contextGroupId, V8Inspector::Channel* channel, 186 int contextGroupId, V8Inspector::Channel* channel,
181 const StringView& state) { 187 const StringView& state) {
182 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend()); 188 DCHECK(m_sessions.find(contextGroupId) == m_sessions.cend());
183 std::unique_ptr<V8InspectorSessionImpl> session = 189 std::unique_ptr<V8InspectorSessionImpl> session =
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 358 }
353 359
354 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup( 360 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(
355 int contextGroupId) { 361 int contextGroupId) {
356 if (!contextGroupId) return nullptr; 362 if (!contextGroupId) return nullptr;
357 SessionMap::iterator iter = m_sessions.find(contextGroupId); 363 SessionMap::iterator iter = m_sessions.find(contextGroupId);
358 return iter == m_sessions.end() ? nullptr : iter->second; 364 return iter == m_sessions.end() ? nullptr : iter->second;
359 } 365 }
360 366
361 } // namespace v8_inspector 367 } // namespace v8_inspector
OLDNEW
« no previous file with comments | « src/inspector/V8InspectorImpl.h ('k') | src/inspector/V8RuntimeAgentImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698