| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 | 870 |
| 871 // Allow for the active closing of HandleScopes which allows to pass a handle | 871 // Allow for the active closing of HandleScopes which allows to pass a handle |
| 872 // from the HandleScope being closed to the next top most HandleScope. | 872 // from the HandleScope being closed to the next top most HandleScope. |
| 873 bool is_closed_; | 873 bool is_closed_; |
| 874 internal::Object** RawClose(internal::Object** value); | 874 internal::Object** RawClose(internal::Object** value); |
| 875 | 875 |
| 876 friend class ImplementationUtilities; | 876 friend class ImplementationUtilities; |
| 877 }; | 877 }; |
| 878 | 878 |
| 879 | 879 |
| 880 /** |
| 881 * A simple Maybe type, representing an object which may or may not have a |
| 882 * value. |
| 883 */ |
| 884 template<class T> |
| 885 struct Maybe { |
| 886 Maybe() : has_value(false) {} |
| 887 explicit Maybe(T t) : has_value(true), value(t) {} |
| 888 Maybe(bool has, T t) : has_value(has), value(t) {} |
| 889 |
| 890 bool has_value; |
| 891 T value; |
| 892 }; |
| 893 |
| 894 |
| 880 // --- Special objects --- | 895 // --- Special objects --- |
| 881 | 896 |
| 882 | 897 |
| 883 /** | 898 /** |
| 884 * The superclass of values and API object templates. | 899 * The superclass of values and API object templates. |
| 885 */ | 900 */ |
| 886 class V8_EXPORT Data { | 901 class V8_EXPORT Data { |
| 887 private: | 902 private: |
| 888 Data(); | 903 Data(); |
| 889 }; | 904 }; |
| (...skipping 5644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6534 */ | 6549 */ |
| 6535 | 6550 |
| 6536 | 6551 |
| 6537 } // namespace v8 | 6552 } // namespace v8 |
| 6538 | 6553 |
| 6539 | 6554 |
| 6540 #undef TYPE_CHECK | 6555 #undef TYPE_CHECK |
| 6541 | 6556 |
| 6542 | 6557 |
| 6543 #endif // V8_H_ | 6558 #endif // V8_H_ |
| OLD | NEW |