OLD | NEW |
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 (function(global, utils, extrasUtils) { | 5 (function(global, utils, extrasUtils) { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 103 matching lines...) Loading... |
114 if (instrumenting && %is_promise(throwawayPromise)) { | 114 if (instrumenting && %is_promise(throwawayPromise)) { |
115 SET_PRIVATE(throwawayPromise, promiseHandledBySymbol, deferred.promise); | 115 SET_PRIVATE(throwawayPromise, promiseHandledBySymbol, deferred.promise); |
116 } | 116 } |
117 } | 117 } |
118 } catch (e) { | 118 } catch (e) { |
119 %_Call(deferred.reject, UNDEFINED, e); | 119 %_Call(deferred.reject, UNDEFINED, e); |
120 } | 120 } |
121 return deferred.promise; | 121 return deferred.promise; |
122 } | 122 } |
123 | 123 |
| 124 %DebugMarkAsPromiseBuiltin(PromiseAll); |
| 125 %DebugMarkAsPromiseBuiltin(PromiseRace); |
| 126 |
124 // ------------------------------------------------------------------- | 127 // ------------------------------------------------------------------- |
125 // Install exported functions. | 128 // Install exported functions. |
126 | 129 |
127 utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ | 130 utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
128 "all", PromiseAll, | 131 "all", PromiseAll, |
129 "race", PromiseRace, | 132 "race", PromiseRace, |
130 ]); | 133 ]); |
131 | 134 |
132 }) | 135 }) |
OLD | NEW |