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

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 1305433004: DevTools: fix assertion failure when collecting async calls stacks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index a1017fe481fe1ae90fd8bb547fa6807dc3b52ce9..147f151e50ff55902fc38b897c19f91156d863b1 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -33,6 +33,8 @@
#include "bindings/core/v8/V8Binding.h"
#include "core/inspector/ScriptAsyncCallStack.h"
#include "core/inspector/v8/V8Debugger.h"
+#include "platform/ScriptForbiddenScope.h"
+#include "wtf/MainThread.h"
namespace blink {
@@ -259,6 +261,9 @@ bool InspectorDebuggerAgent::isPaused()
PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> InspectorDebuggerAgent::currentAsyncStackTraceForConsole()
{
+ OwnPtr<ScriptForbiddenScope::AllowUserAgentScript> allowScripting;
esprehn 2015/08/19 22:43:53 I think you want to use Optional<ScriptForbiddenSc
yurys 2015/08/20 00:05:09 Didn't know that we have Optional, thanks! https:
+ if (isMainThread())
+ allowScripting = adoptPtr(new ScriptForbiddenScope::AllowUserAgentScript());
return m_v8DebuggerAgent->currentAsyncStackTraceForConsole();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698