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

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

Issue 1286383007: Use Optional instead of OwnPtr for holding AllowUserAgentScript (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 | « Source/core/inspector/AsyncCallTracker.cpp ('k') | 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 147f151e50ff55902fc38b897c19f91156d863b1..2dbd4fa3a05bf6fdaccfe11ee10a082b0dd3939e 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -35,6 +35,7 @@
#include "core/inspector/v8/V8Debugger.h"
#include "platform/ScriptForbiddenScope.h"
#include "wtf/MainThread.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -261,9 +262,9 @@ bool InspectorDebuggerAgent::isPaused()
PassRefPtrWillBeRawPtr<ScriptAsyncCallStack> InspectorDebuggerAgent::currentAsyncStackTraceForConsole()
{
- OwnPtr<ScriptForbiddenScope::AllowUserAgentScript> allowScripting;
+ Optional<ScriptForbiddenScope::AllowUserAgentScript> allowScripting;
if (isMainThread())
- allowScripting = adoptPtr(new ScriptForbiddenScope::AllowUserAgentScript());
+ allowScripting.emplace();
return m_v8DebuggerAgent->currentAsyncStackTraceForConsole();
}
« no previous file with comments | « Source/core/inspector/AsyncCallTracker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698