Commit d7eed001 authored by yurys@chromium.org's avatar yurys@chromium.org

Fix crash in AsyncCallTracker::didEnqueueMutationRecord

The method should be allowed to execute JS since it needs it to collect call stack.

BUG=525305

Review URL: https://codereview.chromium.org/1313693007

git-svn-id: svn://svn.chromium.org/blink/trunk@201280 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 3353a51f
...@@ -310,6 +310,9 @@ void AsyncCallTracker::didEnqueueMutationRecord(ExecutionContext* context, Mutat ...@@ -310,6 +310,9 @@ void AsyncCallTracker::didEnqueueMutationRecord(ExecutionContext* context, Mutat
ExecutionContextData* data = createContextDataIfNeeded(context); ExecutionContextData* data = createContextDataIfNeeded(context);
if (data->m_mutationObserverCallChains.contains(observer)) if (data->m_mutationObserverCallChains.contains(observer))
return; return;
Optional<ScriptForbiddenScope::AllowUserAgentScript> allowScripting;
if (isMainThread())
allowScripting.emplace();
int operationId = m_debuggerAgent->traceAsyncOperationStarting(enqueueMutationRecordName); int operationId = m_debuggerAgent->traceAsyncOperationStarting(enqueueMutationRecordName);
data->m_mutationObserverCallChains.set(observer, operationId); data->m_mutationObserverCallChains.set(observer, operationId);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment