Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/promise-utils.cc

Issue 2637523002: [promises] Clean up promise utils and remove dead code (Closed)
Patch Set: Fix nits Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/promise-utils.h ('k') | src/runtime/runtime-promise.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #include "src/promise-utils.h"
6
7 #include "src/factory.h"
8 #include "src/isolate.h"
9 #include "src/objects-inl.h"
10
11 namespace v8 {
12 namespace internal {
13
14 JSPromise* PromiseUtils::GetPromise(Handle<Context> context) {
15 return JSPromise::cast(context->get(kPromiseSlot));
16 }
17
18 Object* PromiseUtils::GetDebugEvent(Handle<Context> context) {
19 return context->get(kDebugEventSlot);
20 }
21
22 bool PromiseUtils::HasAlreadyVisited(Handle<Context> context) {
23 return Smi::cast(context->get(kAlreadyVisitedSlot))->value() != 0;
24 }
25
26 void PromiseUtils::SetAlreadyVisited(Handle<Context> context) {
27 context->set(kAlreadyVisitedSlot, Smi::FromInt(1));
28 }
29
30 } // namespace internal
31 } // namespace v8
OLDNEW
« no previous file with comments | « src/promise-utils.h ('k') | src/runtime/runtime-promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698