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

Unified Diff: Source/bindings/core/v8/V8BindingMacros.h

Issue 964553003: bindings: Use V8 MaybeLocal<> APIs in Dictionary class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/bindings/core/v8/DictionaryHelperForCore.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8BindingMacros.h
diff --git a/Source/bindings/core/v8/V8BindingMacros.h b/Source/bindings/core/v8/V8BindingMacros.h
index c774bd44e90a19bb14be356d2bc92ed21bf212bd..5fece1e5d4c27845c6d2f4fc212bf82925dd7779 100644
--- a/Source/bindings/core/v8/V8BindingMacros.h
+++ b/Source/bindings/core/v8/V8BindingMacros.h
@@ -78,7 +78,7 @@ namespace blink {
return retVal;
template <typename T>
-inline bool getValueFromMaybe(v8::Maybe<T> maybe, T& outVariable)
+inline bool v8Call(v8::Maybe<T> maybe, T& outVariable)
{
if (maybe.IsNothing())
return false;
@@ -89,13 +89,13 @@ inline bool getValueFromMaybe(v8::Maybe<T> maybe, T& outVariable)
inline bool v8CallBoolean(v8::Maybe<bool> maybe)
{
bool result;
- return getValueFromMaybe(maybe, result) && result;
+ return v8Call(maybe, result) && result;
}
template <typename T>
inline bool v8Call(v8::Maybe<T> maybe, T& outVariable, v8::TryCatch& tryCatch)
{
- bool success = getValueFromMaybe(maybe, outVariable);
+ bool success = v8Call(maybe, outVariable);
ASSERT(success || tryCatch.HasCaught());
return success;
}
@@ -110,7 +110,7 @@ inline bool v8Call(v8::MaybeLocal<T> maybeLocal, v8::Local<T>& outVariable, v8::
// The last "else" is to avoid dangling else problem.
#define V8_CALL(outVariable, handle, methodCall, failureExpression) \
- if (handle.IsEmpty() || !getValueFromMaybe(handle->methodCall, outVariable)) { \
+ if (handle.IsEmpty() || !v8Call(handle->methodCall, outVariable)) { \
failureExpression; \
} else
« no previous file with comments | « Source/bindings/core/v8/DictionaryHelperForCore.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698