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

Side by Side Diff: Source/bindings/v8/custom/V8PromiseCustom.h

Issue 177773002: Support Promises instrumentation on backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: V8PromiseCustom::setState -> (anonymous namespace)::setStateForPromise + REBASE Created 6 years, 9 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 | « Source/bindings/v8/ScriptObjectTraits.h ('k') | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 }; 63 };
64 64
65 static v8::Local<v8::Object> createPromise(v8::Handle<v8::Object> creationCo ntext, v8::Isolate*); 65 static v8::Local<v8::Object> createPromise(v8::Handle<v8::Object> creationCo ntext, v8::Isolate*);
66 66
67 // |promise| must be a Promise instance. 67 // |promise| must be a Promise instance.
68 static v8::Local<v8::Object> getInternal(v8::Handle<v8::Object> promise); 68 static v8::Local<v8::Object> getInternal(v8::Handle<v8::Object> promise);
69 69
70 // |internal| must be a Promise internal object. 70 // |internal| must be a Promise internal object.
71 static PromiseState getState(v8::Handle<v8::Object> internal); 71 static PromiseState getState(v8::Handle<v8::Object> internal);
72 72
73 // |internal| must be a Promise internal object.
74 // Set a |promise|'s state and result that correspond to the state.
75 static void setState(v8::Handle<v8::Object> internal, PromiseState, v8::Hand le<v8::Value>, v8::Isolate*);
76
77 // Return true if |maybePromise| is a Promise instance. 73 // Return true if |maybePromise| is a Promise instance.
78 static bool isPromise(v8::Handle<v8::Value> maybePromise, v8::Isolate*); 74 static bool isPromise(v8::Handle<v8::Value> maybePromise, v8::Isolate*);
79 75
80 // Coerces |maybePromise| to a Promise instance. 76 // Coerces |maybePromise| to a Promise instance.
81 static v8::Local<v8::Object> toPromise(v8::Handle<v8::Value> maybePromise, v 8::Isolate*); 77 static v8::Local<v8::Object> toPromise(v8::Handle<v8::Value> maybePromise, v 8::Isolate*);
82 78
83 // |promise| must be a Promise instance. 79 // |promise| must be a Promise instance.
84 static void resolve(v8::Handle<v8::Object> promise, v8::Handle<v8::Value> re sult, v8::Isolate*); 80 static void resolve(v8::Handle<v8::Object> promise, v8::Handle<v8::Value> re sult, v8::Isolate*);
85 81
86 // |promise| must be a Promise instance. 82 // |promise| must be a Promise instance.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 123
128 // |promise| must be a Promise instance. 124 // |promise| must be a Promise instance.
129 // Applies a transformation to an argument and use it to update derived 125 // Applies a transformation to an argument and use it to update derived
130 // promies. 126 // promies.
131 static void callHandler(v8::Handle<v8::Object> promise, v8::Handle<v8::Funct ion> handler, v8::Handle<v8::Value> argument, PromiseState originatorState, v8:: Isolate*); 127 static void callHandler(v8::Handle<v8::Object> promise, v8::Handle<v8::Funct ion> handler, v8::Handle<v8::Value> argument, PromiseState originatorState, v8:: Isolate*);
132 }; 128 };
133 129
134 } // namespace WebCore 130 } // namespace WebCore
135 131
136 #endif // V8PromiseCustom_h 132 #endif // V8PromiseCustom_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptObjectTraits.h ('k') | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698