Index: Source/bindings/core/v8/V8BindingMacros.h |
diff --git a/Source/bindings/core/v8/V8BindingMacros.h b/Source/bindings/core/v8/V8BindingMacros.h |
index d99f9c09837e53de5e8ad3d50056663507fb35f4..c774bd44e90a19bb14be356d2bc92ed21bf212bd 100644 |
--- a/Source/bindings/core/v8/V8BindingMacros.h |
+++ b/Source/bindings/core/v8/V8BindingMacros.h |
@@ -78,14 +78,6 @@ namespace blink { |
return retVal; |
template <typename T> |
-inline bool v8Call(v8::MaybeLocal<T> maybeLocal, v8::Local<T>& outVariable, v8::TryCatch& tryCatch) |
-{ |
- bool success = maybeLocal.ToLocal(&outVariable); |
- ASSERT(success || tryCatch.HasCaught()); |
- return success; |
-} |
- |
-template <typename T> |
inline bool getValueFromMaybe(v8::Maybe<T> maybe, T& outVariable) |
{ |
if (maybe.IsNothing()) |
@@ -100,6 +92,22 @@ inline bool v8CallBoolean(v8::Maybe<bool> maybe) |
return getValueFromMaybe(maybe, result) && result; |
} |
+template <typename T> |
+inline bool v8Call(v8::Maybe<T> maybe, T& outVariable, v8::TryCatch& tryCatch) |
+{ |
+ bool success = getValueFromMaybe(maybe, outVariable); |
+ ASSERT(success || tryCatch.HasCaught()); |
+ return success; |
+} |
+ |
+template <typename T> |
+inline bool v8Call(v8::MaybeLocal<T> maybeLocal, v8::Local<T>& outVariable, v8::TryCatch& tryCatch) |
+{ |
+ bool success = maybeLocal.ToLocal(&outVariable); |
+ ASSERT(success || tryCatch.HasCaught()); |
+ return success; |
+} |
+ |
// The last "else" is to avoid dangling else problem. |
#define V8_CALL(outVariable, handle, methodCall, failureExpression) \ |
if (handle.IsEmpty() || !getValueFromMaybe(handle->methodCall, outVariable)) { \ |