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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Propagate |promise|'s state to |derivedPromise|. | 121 // Propagate |promise|'s state to |derivedPromise|. |
122 static void updateDerivedFromPromise(v8::Handle<v8::Object> derivedPromise,
v8::Handle<v8::Function> onFulfilled, v8::Handle<v8::Function> onRejected, v8::H
andle<v8::Object> promise, v8::Isolate*); | 122 static void updateDerivedFromPromise(v8::Handle<v8::Object> derivedPromise,
v8::Handle<v8::Function> onFulfilled, v8::Handle<v8::Function> onRejected, v8::H
andle<v8::Object> promise, v8::Isolate*); |
123 | 123 |
124 // Returns a Promise instance that will be fulfilled or rejected by | 124 // Returns a Promise instance that will be fulfilled or rejected by |
125 // |thenable|'s result. | 125 // |thenable|'s result. |
126 static v8::Local<v8::Object> coerceThenable(v8::Handle<v8::Object> thenable,
v8::Handle<v8::Function> then, v8::Isolate*); | 126 static v8::Local<v8::Object> coerceThenable(v8::Handle<v8::Object> thenable,
v8::Handle<v8::Function> then, v8::Isolate*); |
127 | 127 |
128 // |promise| must be a Promise instance. | 128 // |promise| must be a Promise instance. |
129 // Applies a transformation to an argument and use it to update derived | 129 // Applies a transformation to an argument and use it to update derived |
130 // promies. | 130 // promies. |
131 static void callHandler(v8::Handle<v8::Object> promise, v8::Handle<v8::Funct
ion> handler, v8::Handle<v8::Value> argument, v8::Isolate*); | 131 static void callHandler(v8::Handle<v8::Object> promise, v8::Handle<v8::Funct
ion> handler, v8::Handle<v8::Value> argument, PromiseState originatorState, v8::
Isolate*); |
132 }; | 132 }; |
133 | 133 |
134 } // namespace WebCore | 134 } // namespace WebCore |
135 | 135 |
136 #endif // V8PromiseCustom_h | 136 #endif // V8PromiseCustom_h |
OLD | NEW |