promise_util.cc 585 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2018 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #include "shell/common/promise_util.h"
  5. namespace mate {
  6. template <typename T>
  7. v8::Local<v8::Value> mate::Converter<electron::util::Promise<T>>::ToV8(
  8. v8::Isolate*,
  9. const electron::util::Promise<T>& val) {
  10. return val.GetHandle();
  11. }
  12. template <>
  13. v8::Local<v8::Value> mate::Converter<electron::util::Promise<void*>>::ToV8(
  14. v8::Isolate*,
  15. const electron::util::Promise<void*>& val) {
  16. return val.GetHandle();
  17. }
  18. } // namespace mate