| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 willFireAsyncCall(V8DebuggerAgent::unknownAsyncOperationId); | 303 willFireAsyncCall(V8DebuggerAgent::unknownAsyncOperationId); |
| 304 } | 304 } |
| 305 | 305 |
| 306 void AsyncCallTracker::didEnqueueMutationRecord(ExecutionContext* context, Mutat
ionObserver* observer) | 306 void AsyncCallTracker::didEnqueueMutationRecord(ExecutionContext* context, Mutat
ionObserver* observer) |
| 307 { | 307 { |
| 308 ASSERT(context); | 308 ASSERT(context); |
| 309 ASSERT(m_debuggerAgent->trackingAsyncCalls()); | 309 ASSERT(m_debuggerAgent->trackingAsyncCalls()); |
| 310 ExecutionContextData* data = createContextDataIfNeeded(context); | 310 ExecutionContextData* data = createContextDataIfNeeded(context); |
| 311 if (data->m_mutationObserverCallChains.contains(observer)) | 311 if (data->m_mutationObserverCallChains.contains(observer)) |
| 312 return; | 312 return; |
| 313 Optional<ScriptForbiddenScope::AllowUserAgentScript> allowScripting; |
| 314 if (isMainThread()) |
| 315 allowScripting.emplace(); |
| 313 int operationId = m_debuggerAgent->traceAsyncOperationStarting(enqueueMutati
onRecordName); | 316 int operationId = m_debuggerAgent->traceAsyncOperationStarting(enqueueMutati
onRecordName); |
| 314 data->m_mutationObserverCallChains.set(observer, operationId); | 317 data->m_mutationObserverCallChains.set(observer, operationId); |
| 315 } | 318 } |
| 316 | 319 |
| 317 void AsyncCallTracker::didClearAllMutationRecords(ExecutionContext* context, Mut
ationObserver* observer) | 320 void AsyncCallTracker::didClearAllMutationRecords(ExecutionContext* context, Mut
ationObserver* observer) |
| 318 { | 321 { |
| 319 ASSERT(context); | 322 ASSERT(context); |
| 320 ASSERT(m_debuggerAgent->trackingAsyncCalls()); | 323 ASSERT(m_debuggerAgent->trackingAsyncCalls()); |
| 321 if (ExecutionContextData* data = m_executionContextDataMap.get(context)) | 324 if (ExecutionContextData* data = m_executionContextDataMap.get(context)) |
| 322 data->m_mutationObserverCallChains.remove(observer); | 325 data->m_mutationObserverCallChains.remove(observer); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 { | 437 { |
| 435 #if ENABLE(OILPAN) | 438 #if ENABLE(OILPAN) |
| 436 visitor->trace(m_executionContextDataMap); | 439 visitor->trace(m_executionContextDataMap); |
| 437 visitor->trace(m_debuggerAgent); | 440 visitor->trace(m_debuggerAgent); |
| 438 visitor->trace(m_instrumentingAgents); | 441 visitor->trace(m_instrumentingAgents); |
| 439 #endif | 442 #endif |
| 440 V8DebuggerAgent::AsyncCallTrackingListener::trace(visitor); | 443 V8DebuggerAgent::AsyncCallTrackingListener::trace(visitor); |
| 441 } | 444 } |
| 442 | 445 |
| 443 } // namespace blink | 446 } // namespace blink |
| OLD | NEW |