OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013, Google Inc. All rights reserved. | 2 * Copyright (C) 2013, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 29 matching lines...) Expand all Loading... |
40 InternalRejectCallbackIndex, | 40 InternalRejectCallbackIndex, |
41 InternalFieldCount, // This entry must always be at the bottom. | 41 InternalFieldCount, // This entry must always be at the bottom. |
42 }; | 42 }; |
43 | 43 |
44 enum WrapperCallbackEnvironmentFieldIndex { | 44 enum WrapperCallbackEnvironmentFieldIndex { |
45 WrapperCallbackEnvironmentPromiseIndex, | 45 WrapperCallbackEnvironmentPromiseIndex, |
46 WrapperCallbackEnvironmentCallbackIndex, | 46 WrapperCallbackEnvironmentCallbackIndex, |
47 WrapperCallbackEnvironmentFieldCount, // This entry must always be at th
e bottom. | 47 WrapperCallbackEnvironmentFieldCount, // This entry must always be at th
e bottom. |
48 }; | 48 }; |
49 | 49 |
50 enum PromiseEveryEnvironmentFieldIndex { | 50 enum PromiseAllEnvironmentFieldIndex { |
51 PromiseEveryEnvironmentPromiseIndex, | 51 PromiseAllEnvironmentPromiseIndex, |
52 PromiseEveryEnvironmentCountdownIndex, | 52 PromiseAllEnvironmentCountdownIndex, |
53 PromiseEveryEnvironmentIndexIndex, | 53 PromiseAllEnvironmentIndexIndex, |
54 PromiseEveryEnvironmentResultsIndex, | 54 PromiseAllEnvironmentResultsIndex, |
55 PromiseEveryEnvironmentFieldCount, // This entry must always be at the b
ottom. | 55 PromiseAllEnvironmentFieldCount, // This entry must always be at the bot
tom. |
56 }; | 56 }; |
57 | 57 |
58 enum PrimitiveWrapperFieldIndex { | 58 enum PrimitiveWrapperFieldIndex { |
59 PrimitiveWrapperPrimitiveIndex, | 59 PrimitiveWrapperPrimitiveIndex, |
60 PrimitiveWrapperFieldCount, // This entry must always be at the bottom. | 60 PrimitiveWrapperFieldCount, // This entry must always be at the bottom. |
61 }; | 61 }; |
62 | 62 |
63 enum PromiseState { | 63 enum PromiseState { |
64 Pending, | 64 Pending, |
65 Fulfilled, | 65 Fulfilled, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // Return true if |maybePromise| is a Promise object. | 105 // Return true if |maybePromise| is a Promise object. |
106 static bool isPromise(v8::Handle<v8::Value> maybePromise, v8::Isolate*); | 106 static bool isPromise(v8::Handle<v8::Value> maybePromise, v8::Isolate*); |
107 | 107 |
108 // Coerces |maybePromise| to a Promise object. | 108 // Coerces |maybePromise| to a Promise object. |
109 static v8::Local<v8::Object> toPromise(v8::Handle<v8::Value> maybePromise, v
8::Isolate*); | 109 static v8::Local<v8::Object> toPromise(v8::Handle<v8::Value> maybePromise, v
8::Isolate*); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace WebCore | 112 } // namespace WebCore |
113 | 113 |
114 #endif // V8PromiseCustom_h | 114 #endif // V8PromiseCustom_h |
OLD | NEW |