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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp

Issue 1442953002: Oilpan: turn MuteConsoleScope into a stack allocated object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix init Created 5 years, 1 month 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
Index: third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
index d648dc074cb236b358085ad1590ba87eced0b7e8..96a5263a2bbbf9da369d1431f6cbfa9ae867c72f 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
@@ -40,7 +40,6 @@
#include "core/inspector/v8/V8Debugger.h"
#include "core/inspector/v8/V8RuntimeAgent.h"
#include "platform/JSONValues.h"
-#include "wtf/Optional.h"
using blink::TypeBuilder::Runtime::ExecutionContextDescription;
@@ -99,17 +98,17 @@ void InspectorRuntimeAgent::restore()
void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& expression, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptionsAndMuteConsole, const int* optExecutionContextId, const bool* const returnByValue, const bool* generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown, RefPtr<TypeBuilder::Debugger::ExceptionDetails>& exceptionDetails)
{
int executionContextId = optExecutionContextId ? *optExecutionContextId : m_injectedScriptManager->injectedScriptIdFor(defaultScriptState());
- Optional<MuteConsoleScope<InspectorRuntimeAgent>> muteScope;
+ MuteConsoleScope<InspectorRuntimeAgent> muteScope;
if (asBool(doNotPauseOnExceptionsAndMuteConsole))
- muteScope.emplace(this);
+ muteScope.enter(this);
m_v8RuntimeAgent->evaluate(errorString, expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, &executionContextId, returnByValue, generatePreview, result, wasThrown, exceptionDetails);
}
void InspectorRuntimeAgent::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const RefPtr<JSONArray>* const optionalArguments, const bool* const doNotPauseOnExceptionsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown)
{
- Optional<MuteConsoleScope<InspectorRuntimeAgent>> muteScope;
+ MuteConsoleScope<InspectorRuntimeAgent> muteScope;
if (asBool(doNotPauseOnExceptionsAndMuteConsole))
- muteScope.emplace(this);
+ muteScope.enter(this);
m_v8RuntimeAgent->callFunctionOn(errorString, objectId, expression, optionalArguments, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, result, wasThrown);
}

Powered by Google App Engine
This is Rietveld 408576698