Skip to content
This repository was archived by the owner on Oct 5, 2019. It is now read-only.
This repository was archived by the owner on Oct 5, 2019. It is now read-only.

Needs a converter for promises? #20

@YurySolovyov

Description

@YurySolovyov

This code fails to compile:

void TestPromise(mate::Arguments* args) {
  v8::Isolate* isolate = args->isolate();
  auto resolver = v8::Promise::Resolver::New(isolate);
  args->Return(resolver->GetPromise());
  resolver->Resolve(v8::String::NewFromUtf8(isolate, "value"));
}

but this works as expected:

void TestPromise(mate::Arguments* args) {
  v8::Isolate* isolate = args->isolate();
  auto resolver = v8::Promise::Resolver::New(isolate);
  v8::Local<v8::Object> promise = resolver->GetPromise();
  args->Return(promise);
  resolver->Resolve(v8::String::NewFromUtf8(isolate, "value"));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions