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

Unified Diff: include/v8.h

Issue 384963002: ES6 Unscopables (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Updated to reflect the July 2014 consensus Created 6 years, 4 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 | « BUILD.gn ('k') | src/bootstrapper.cc » ('j') | src/unscopables.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « BUILD.gn ('k') | src/bootstrapper.cc » ('j') | src/unscopables.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698