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

Side by Side Diff: include/v8.h

Issue 418383002: Change Has* and Get*Attributes to return Maybe<*>, indicating possible exceptions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/objects-inl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 struct Maybe { 888 struct Maybe {
889 Maybe() : has_value(false) {} 889 Maybe() : has_value(false) {}
890 explicit Maybe(T t) : has_value(true), value(t) {} 890 explicit Maybe(T t) : has_value(true), value(t) {}
891 Maybe(bool has, T t) : has_value(has), value(t) {} 891 Maybe(bool has, T t) : has_value(has), value(t) {}
892 892
893 bool has_value; 893 bool has_value;
894 T value; 894 T value;
895 }; 895 };
896 896
897 897
898 // Convenience wrapper.
899 template <class T>
900 inline Maybe<T> maybe(T t) {
901 return Maybe<T>(t);
902 }
903
904
898 // --- Special objects --- 905 // --- Special objects ---
899 906
900 907
901 /** 908 /**
902 * The superclass of values and API object templates. 909 * The superclass of values and API object templates.
903 */ 910 */
904 class V8_EXPORT Data { 911 class V8_EXPORT Data {
905 private: 912 private:
906 Data(); 913 Data();
907 }; 914 };
(...skipping 5854 matching lines...) Expand 10 before | Expand all | Expand 10 after
6762 */ 6769 */
6763 6770
6764 6771
6765 } // namespace v8 6772 } // namespace v8
6766 6773
6767 6774
6768 #undef TYPE_CHECK 6775 #undef TYPE_CHECK
6769 6776
6770 6777
6771 #endif // V8_H_ 6778 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698