2018-06-27 21:06:08 +00:00
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/common/promise_util.h"
|
2019-01-15 17:54:59 +00:00
|
|
|
|
2019-08-23 00:03:28 +00:00
|
|
|
namespace mate {
|
2019-02-21 12:32:44 +00:00
|
|
|
|
2019-08-23 00:03:28 +00:00
|
|
|
template <typename T>
|
|
|
|
v8::Local<v8::Value> mate::Converter<electron::util::Promise<T>>::ToV8(
|
|
|
|
v8::Isolate*,
|
|
|
|
const electron::util::Promise<T>& val) {
|
|
|
|
return val.GetHandle();
|
2019-02-21 12:32:44 +00:00
|
|
|
}
|
|
|
|
|
2019-08-23 00:03:28 +00:00
|
|
|
template <>
|
|
|
|
v8::Local<v8::Value> mate::Converter<electron::util::Promise<void*>>::ToV8(
|
2018-06-27 21:06:08 +00:00
|
|
|
v8::Isolate*,
|
2019-08-23 00:03:28 +00:00
|
|
|
const electron::util::Promise<void*>& val) {
|
2019-02-21 12:32:44 +00:00
|
|
|
return val.GetHandle();
|
2018-06-27 21:06:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace mate
|