Chromium Code Reviews| 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 16 matching lines...) Expand all Loading... | |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "sky/engine/config.h" | 31 #include "sky/engine/config.h" |
| 32 #include "sky/engine/v8_inspector/AsyncCallStackTracker.h" | 32 #include "sky/engine/v8_inspector/AsyncCallStackTracker.h" |
| 33 | 33 |
| 34 #include "sky/engine/bindings/core/v8/V8Binding.h" | 34 #include "sky/engine/bindings/core/v8/V8Binding.h" |
| 35 #include "sky/engine/bindings/core/v8/V8RecursionScope.h" | 35 #include "sky/engine/bindings/core/v8/V8RecursionScope.h" |
| 36 #include "sky/engine/core/dom/ExecutionContext.h" | 36 #include "sky/engine/core/dom/ExecutionContext.h" |
| 37 // #include "core/dom/ExecutionContextTask.h" | |
| 38 #include "sky/engine/core/events/Event.h" | 37 #include "sky/engine/core/events/Event.h" |
| 39 #include "sky/engine/core/events/EventTarget.h" | 38 #include "sky/engine/core/events/EventTarget.h" |
| 40 #include "sky/engine/wtf/text/StringBuilder.h" | 39 #include "sky/engine/wtf/text/StringBuilder.h" |
| 41 #include "sky/engine/wtf/text/StringHash.h" | 40 #include "sky/engine/wtf/text/StringHash.h" |
| 42 #include "v8/include/v8.h" | 41 #include "v8/include/v8.h" |
| 43 | 42 |
| 44 namespace { | 43 namespace { |
| 45 | 44 |
| 46 static const char setTimeoutName[] = "setTimeout"; | 45 static const char setTimeoutName[] = "setTimeout"; |
| 47 static const char setIntervalName[] = "setInterval"; | 46 static const char setIntervalName[] = "setInterval"; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 void AsyncCallStackTracker::willDeliverMutationRecords(ExecutionContext* context , MutationObserver* observer) | 234 void AsyncCallStackTracker::willDeliverMutationRecords(ExecutionContext* context , MutationObserver* observer) |
| 236 { | 235 { |
| 237 ASSERT(context); | 236 ASSERT(context); |
| 238 ASSERT(isEnabled()); | 237 ASSERT(isEnabled()); |
| 239 if (ExecutionContextData* data = m_executionContextDataMap.get(context)) | 238 if (ExecutionContextData* data = m_executionContextDataMap.get(context)) |
| 240 setCurrentAsyncCallChain(context, data->m_mutationObserverCallChains.tak e(observer)); | 239 setCurrentAsyncCallChain(context, data->m_mutationObserverCallChains.tak e(observer)); |
| 241 else | 240 else |
| 242 setCurrentAsyncCallChain(context, nullptr); | 241 setCurrentAsyncCallChain(context, nullptr); |
| 243 } | 242 } |
| 244 | 243 |
| 245 // void AsyncCallStackTracker::didPostExecutionContextTask(ExecutionContext* con text, ExecutionContextTask* task, const ScriptValue& callFrames) | 244 // void AsyncCallStackTracker::didPostExecutionContextTask(ExecutionContext* con text, ExecutionContextTask* task, const ScriptValue& callFrames) |
|
yurys
2014/12/03 07:33:35
Should this code be removed too given that the inc
| |
| 246 // { | 245 // { |
| 247 // ASSERT(context); | 246 // ASSERT(context); |
| 248 // ASSERT(isEnabled()); | 247 // ASSERT(isEnabled()); |
| 249 // if (!validateCallFrames(callFrames)) | 248 // if (!validateCallFrames(callFrames)) |
| 250 // return; | 249 // return; |
| 251 // ExecutionContextData* data = createContextDataIfNeeded(context); | 250 // ExecutionContextData* data = createContextDataIfNeeded(context); |
| 252 // data->m_executionContextTaskCallChains.set(task, createAsyncCallChain(tas k->taskNameForInstrumentation(), callFrames)); | 251 // data->m_executionContextTaskCallChains.set(task, createAsyncCallChain(tas k->taskNameForInstrumentation(), callFrames)); |
| 253 // } | 252 // } |
| 254 | 253 |
| 255 // void AsyncCallStackTracker::didKillAllExecutionContextTasks(ExecutionContext* context) | 254 // void AsyncCallStackTracker::didKillAllExecutionContextTasks(ExecutionContext* context) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 } | 391 } |
| 393 | 392 |
| 394 void AsyncCallStackTracker::clear() | 393 void AsyncCallStackTracker::clear() |
| 395 { | 394 { |
| 396 m_currentAsyncCallChain.clear(); | 395 m_currentAsyncCallChain.clear(); |
| 397 m_nestedAsyncCallCount = 0; | 396 m_nestedAsyncCallCount = 0; |
| 398 m_executionContextDataMap.clear(); | 397 m_executionContextDataMap.clear(); |
| 399 } | 398 } |
| 400 | 399 |
| 401 } // namespace blink | 400 } // namespace blink |
| OLD | NEW |