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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp

Issue 2446213002: [Bindings] [Reformat] Reformat template files (Closed)
Patch Set: Rebase (Split out Callbackfunctions) 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
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
index fa9fd2153e67e2720b805139778601e2394e74f5..f44f571d0e43ca29ca4e4b8f1ad827fa25214e95 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
@@ -19,52 +19,46 @@ namespace blink {
VoidCallbackFunctionModules::VoidCallbackFunctionModules(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(VoidCallbackFunctionModules)
-{
-}
+DEFINE_TRACE(VoidCallbackFunctionModules) {}
-DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules)
-{
- visitor->traceWrappers(&m_callback.cast<v8::Object>());
+DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) {
+ visitor->traceWrappers(&m_callback.cast<v8::Object>());
}
-bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable)
-{
- if (!m_scriptState->contextIsValid())
- return false;
+bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) {
+ 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> 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 = nullptr;
+ v8::Local<v8::Value> *argv = nullptr;
- 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, 0, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue))
- {
- return true;
- }
- return false;
+ if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) {
+ return true;
+ }
+ return false;
}
-} // namespace blink
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698