Skip to content

Proxy Error wrapped Promise in debug mode #10406

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

Closed
sky-train opened this issue Dec 22, 2016 · 7 comments
Closed

Proxy Error wrapped Promise in debug mode #10406

sky-train opened this issue Dec 22, 2016 · 7 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@sky-train
Copy link

  • Version: 7.3.0
  • Platform: Windows 64-bit
  • Subsystem:

nodejs/help#417

if there is a breakpoint, and script execution in debug mode results in an error:

Fatal error in runtime\runtime-debug.cc, line 1423
Check failed: args[0]->IsJSObject().
==== C stack trace ===============================
v8::Testing::DeoptimizeAll [0x00007FF63641E116+1835382]
v8::Testing::DeoptimizeAll [0x00007FF6365CAD2D+3591565]
(No symbol) [0x000003442F4063AB]

script is run on WebStorm, VS2015

error occurs in the transition from let proxy = createProxy(); to resolve(proxy);

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);
});

@mscdex mscdex added the v8 engine Issues and PRs related to the V8 dependency. label Dec 22, 2016
@mscdex
Copy link
Contributor

mscdex commented Dec 22, 2016

/cc @nodejs/v8

@bnoordhuis
Copy link
Member

It's the result of a %DebugGetPrototype(this.value_) call in deps/v8/src/debug/mirrors.js with a value that isn't an object or array. I'm not able to reproduce locally but I expect that is because the built-in debugger doesn't hit that particular code path.

Does node --inspect script.js work for you?

@sky-train
Copy link
Author

Does node --inspect script.js work for you?

yes it work.

@bnoordhuis
Copy link
Member

@SklyarovYura Can you try the fix from #10409?

@sky-train
Copy link
Author

Can you try the fix from #10409?

Thanks it works

@TimothyGu
Copy link
Member

BTW, #8224 describes an issue of the same underlying cause as this one.

@targos
Copy link
Member

targos commented Nov 24, 2017

Fixed in #10409

@targos targos closed this as completed Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

5 participants