Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index f702166cd4d281965f2caba33a616888eb7cb0fb..6b1d8929248df22fe2d4105cd932b5215da98507 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -889,6 +889,11 @@ struct Maybe { |
Maybe() : has_value(false) {} |
explicit Maybe(T t) : has_value(true), value(t) {} |
Maybe(bool has, T t) : has_value(has), value(t) {} |
+ bool ToValue(T* t) { |
rossberg
2014/08/06 09:53:02
Can we not introduce this? Maybe intentionally is
arv (Not doing code reviews)
2014/08/06 15:08:28
Reverted this.
|
+ if (!has_value) return false; |
+ *t = value; |
+ return true; |
+ } |
bool has_value; |
T value; |