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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp

Issue 2452403002: [Bindings] Reformat template files (4/4) (Closed)
Patch Set: Rebase Created 4 years, 2 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
Index: third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp b/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
index 3d8a1d0f67900999620871d30d45c417c58c5f13..b8132fc3f783188466dd0f9c08334835b06d6aa3 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
@@ -19,58 +19,52 @@ namespace blink {
StringSequenceCallbackFunctionLongSequenceArg::StringSequenceCallbackFunctionLongSequenceArg(ScriptState* scriptState, v8::Local<v8::Function> callback)
: m_scriptState(scriptState),
- m_callback(scriptState->isolate(), callback)
-{
- DCHECK(!m_callback.isEmpty());
- m_callback.setPhantom();
+ m_callback(scriptState->isolate(), callback) {
+ DCHECK(!m_callback.isEmpty());
+ m_callback.setPhantom();
}
-DEFINE_TRACE(StringSequenceCallbackFunctionLongSequenceArg)
-{
-}
+DEFINE_TRACE(StringSequenceCallbackFunctionLongSequenceArg) {}
-DEFINE_TRACE_WRAPPERS(StringSequenceCallbackFunctionLongSequenceArg)
-{
- visitor->traceWrappers(&m_callback.cast<v8::Object>());
+DEFINE_TRACE_WRAPPERS(StringSequenceCallbackFunctionLongSequenceArg) {
+ visitor->traceWrappers(&m_callback.cast<v8::Object>());
}
-bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* scriptWrappable, const Vector<int>& arg, Vector<String>& returnValue)
-{
- if (!m_scriptState->contextIsValid())
- return false;
+bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* scriptWrappable, const Vector<int>& arg, Vector<String>& returnValue) {
+ if (!m_scriptState->contextIsValid())
+ return false;
- ExecutionContext* context = m_scriptState->getExecutionContext();
- DCHECK(context);
- if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreStopped())
- return false;
+ ExecutionContext* context = m_scriptState->getExecutionContext();
+ DCHECK(context);
+ if (context->activeDOMObjectsAreSuspended() || context->activeDOMObjectsAreStopped())
+ return false;
- if (m_callback.isEmpty())
- return false;
+ if (m_callback.isEmpty())
+ return false;
- // TODO(bashi): Make sure that using TrackExceptionState is OK.
- // crbug.com/653769
- TrackExceptionState exceptionState;
- ScriptState::Scope scope(m_scriptState.get());
+ // TODO(bashi): Make sure that using TrackExceptionState is OK.
+ // crbug.com/653769
+ TrackExceptionState exceptionState;
+ ScriptState::Scope scope(m_scriptState.get());
- v8::Local<v8::Value> argArgument = toV8(arg, m_scriptState->context()->Global(), m_scriptState->isolate());
+ v8::Local<v8::Value> argArgument = toV8(arg, m_scriptState->context()->Global(), m_scriptState->isolate());
- v8::Local<v8::Value> thisValue = toV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate());
+ v8::Local<v8::Value> thisValue = toV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate());
- v8::Local<v8::Value> argv[] = { argArgument };
+ v8::Local<v8::Value> argv[] = { argArgument };
- v8::Local<v8::Value> v8ReturnValue;
- v8::TryCatch exceptionCatcher(m_scriptState->isolate());
- exceptionCatcher.SetVerbose(true);
+ v8::Local<v8::Value> v8ReturnValue;
+ v8::TryCatch exceptionCatcher(m_scriptState->isolate());
+ exceptionCatcher.SetVerbose(true);
- if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue))
- {
- Vector<String> cppValue = toImplArray<Vector<String>>(v8ReturnValue, 0, m_scriptState->isolate(), exceptionState);
+ if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) {
+ Vector<String> cppValue = toImplArray<Vector<String>>(v8ReturnValue, 0, m_scriptState->isolate(), exceptionState);
if (exceptionState.hadException())
- return false;
- returnValue = cppValue;
- return true;
- }
- return false;
+ return false;
+ returnValue = cppValue;
+ return true;
+ }
+ return false;
}
-} // namespace blink
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698