Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy Error wrapped Promise #417

Closed
sky-train opened this issue Dec 21, 2016 · 5 comments
Closed

Proxy Error wrapped Promise #417

sky-train opened this issue Dec 21, 2016 · 5 comments

Comments

@sky-train
Copy link

Fatal error in runtime\runtime-debug.cc, line 1423

Check failed: args[0]->IsJSObject().

code showing the error

function createProxy(){
    let handler = {
        get(target,key,context){
            return Reflect.get(target,key,context);
        }
    }
    ,data = {a:1};
    return new Proxy(data,handler);
}

function load(){
    return new Promise(function (resolve,reject) {
        let proxy = createProxy();
        resolve(proxy);
    });
}

load().then(function (proxy) {
    console.log(proxy.a);
});
@addaleax
Copy link
Member

What version of Node.js are you using?

@sky-train
Copy link
Author

Node 7.3.0

@addaleax
Copy link
Member

Just running the code as node script.js does not show any problems. You are probably doing something debug-related here, judging from the file that throws the error.

Can you share the command you are using?

@sky-train
Copy link
Author

sky-train commented Dec 21, 2016

Yes you are right.
error occurs when it run in WebStrom 2016.1.3 (and VS2015) in debug mode

Thank you

@addaleax
Copy link
Member

Sorry, I can’t help you right now, but please open an issue at https://github.com/nodejs/node and:

  • Include a link to this issue
  • Include all the information above (Reproducible script + node version + environment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants