feat: [contentTracing] allow calling stopTracing() with no arguments (#18411)

This commit is contained in:
Jeremy Apthorp 2019-05-28 14:15:42 -07:00 committed by GitHub
parent 1a609f0caf
commit 815b9d7707
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 137 additions and 62 deletions

View file

@ -82,6 +82,21 @@ class Promise {
}
}
// Returns an already-resolved promise.
template <typename T>
static v8::Local<v8::Promise> ResolvedPromise(v8::Isolate* isolate,
T result) {
Promise resolved(isolate);
resolved.Resolve(result);
return resolved.GetHandle();
}
static v8::Local<v8::Promise> ResolvedPromise(v8::Isolate* isolate) {
Promise resolved(isolate);
resolved.Resolve();
return resolved.GetHandle();
}
v8::Local<v8::Promise> GetHandle() const;
v8::Maybe<bool> Resolve() {