| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 void AsyncCallStackTracker::didEnqueueEvent(EventTarget* eventTarget, Event* eve
nt, const ScriptValue& callFrames) | 201 void AsyncCallStackTracker::didEnqueueEvent(EventTarget* eventTarget, Event* eve
nt, const ScriptValue& callFrames) |
| 202 { | 202 { |
| 203 ASSERT(eventTarget->executionContext()); | 203 ASSERT(eventTarget->executionContext()); |
| 204 ASSERT(isEnabled()); | 204 ASSERT(isEnabled()); |
| 205 if (!validateCallFrames(callFrames)) | 205 if (!validateCallFrames(callFrames)) |
| 206 return; | 206 return; |
| 207 ExecutionContextData* data = createContextDataIfNeeded(eventTarget->executio
nContext()); | 207 ExecutionContextData* data = createContextDataIfNeeded(eventTarget->executio
nContext()); |
| 208 data->m_eventCallChains.set(event, createAsyncCallChain(event->type(), callF
rames)); | 208 data->m_eventCallChains.set(event, createAsyncCallChain(event->type(), callF
rames)); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void AsyncCallStackTracker::didDispatchEvent(EventTarget* eventTarget, Event* ev
ent) | 211 void AsyncCallStackTracker::didRemoveEvent(EventTarget* eventTarget, Event* even
t) |
| 212 { | 212 { |
| 213 ASSERT(eventTarget->executionContext()); | 213 ASSERT(eventTarget->executionContext()); |
| 214 ASSERT(isEnabled()); | 214 ASSERT(isEnabled()); |
| 215 if (ExecutionContextData* data = m_executionContextDataMap.get(eventTarget->
executionContext())) | 215 if (ExecutionContextData* data = m_executionContextDataMap.get(eventTarget->
executionContext())) |
| 216 data->m_eventCallChains.remove(event); | 216 data->m_eventCallChains.remove(event); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void AsyncCallStackTracker::willHandleEvent(EventTarget* eventTarget, Event* eve
nt, EventListener* listener, bool useCapture) | 219 void AsyncCallStackTracker::willHandleEvent(EventTarget* eventTarget, Event* eve
nt, EventListener* listener, bool useCapture) |
| 220 { | 220 { |
| 221 ASSERT(eventTarget->executionContext()); | 221 ASSERT(eventTarget->executionContext()); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 { | 351 { |
| 352 m_currentAsyncCallChain.clear(); | 352 m_currentAsyncCallChain.clear(); |
| 353 m_nestedAsyncCallCount = 0; | 353 m_nestedAsyncCallCount = 0; |
| 354 ExecutionContextDataMap copy; | 354 ExecutionContextDataMap copy; |
| 355 m_executionContextDataMap.swap(copy); | 355 m_executionContextDataMap.swap(copy); |
| 356 for (ExecutionContextDataMap::const_iterator it = copy.begin(); it != copy.e
nd(); ++it) | 356 for (ExecutionContextDataMap::const_iterator it = copy.begin(); it != copy.e
nd(); ++it) |
| 357 delete it->value; | 357 delete it->value; |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace WebCore | 360 } // namespace WebCore |
| OLD | NEW |