Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_PROMISE_UTILS_H_ | |
| 6 #define V8_PROMISE_UTILS_H_ | |
| 7 | |
| 8 #include "src/objects.h" | |
| 9 | |
| 10 namespace v8 { | |
| 11 namespace internal { | |
| 12 | |
| 13 class PromiseUtils : public AllStatic { | |
|
adamk
2016/11/10 18:10:54
Please add a comment for this class.
gsathya
2016/11/11 02:34:37
Done. Feel free to suggest something better.
| |
| 14 public: | |
| 15 enum PromiseResolvingFunctionContextSlot { | |
|
adamk
2016/11/10 18:10:54
Looks like this is no longer used?
gsathya
2016/11/11 02:34:37
Done.
| |
| 16 kAlreadyVisitedSlot = 4, | |
| 17 kPromiseSlot, | |
| 18 kDebugEventSlot, | |
| 19 }; | |
| 20 | |
| 21 static MUST_USE_RESULT Handle<JSObject> GetPromise(Isolate* isolate, | |
| 22 Handle<Context> context); | |
|
adamk
2016/11/10 18:10:55
Please add a comment for this block of functions;
gsathya
2016/11/11 02:34:37
Done.
| |
| 23 static MUST_USE_RESULT Handle<Object> GetDebugEvent(Isolate* isolate, | |
| 24 Handle<Context> context); | |
| 25 static MUST_USE_RESULT Handle<Smi> GetAlreadyVisited(Isolate* isolate, | |
|
adamk
2016/11/10 18:10:54
MUST_USE_RESULT on a Handle generally isn't necess
gsathya
2016/11/11 02:34:37
Done.
| |
| 26 Handle<Context> context); | |
| 27 static void SetAlreadyVisitedToTrue(Handle<Context> context); | |
|
adamk
2016/11/10 18:10:55
SetAlreadyVisited() is a good enough name, I'd say
gsathya
2016/11/11 02:34:37
Done.
| |
| 28 | |
| 29 static void CreateResolvingFunctions(Isolate* isolate, | |
| 30 Handle<JSObject> promise, | |
| 31 Handle<Object> debug_event, | |
| 32 Handle<JSFunction>* resolve, | |
| 33 Handle<JSFunction>* reject); | |
| 34 }; | |
| 35 } // namespace internal | |
| 36 } // namespace v8 | |
| 37 | |
| 38 #endif // V8_PROMISE_UTILS_H_ | |
| OLD | NEW |