Skip to content

Proxy Error wrapped Promise in debug mode #10406

Description

@sky-train
  • 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);
});

Activity

  1. added
    v8 engineIssues and PRs related to the V8 dependency.
    on Dec 22, 2016
  2. mscdex commented on Dec 22, 2016

    @mscdex
    Contributor

    /cc @nodejs/v8

  3. bnoordhuis commented on Dec 22, 2016

    @bnoordhuis
    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?

  4. sky-train commented on Dec 22, 2016

    @sky-train
    Author

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

    yes it work.

  5. bnoordhuis commented on Dec 22, 2016

    @bnoordhuis
    Member

    @SklyarovYura Can you try the fix from #10409?

  6. sky-train commented on Dec 22, 2016

    @sky-train
    Author

    Can you try the fix from #10409?

    Thanks it works

  7. TimothyGu commented on Jul 10, 2017

    @TimothyGu
    Member

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

  8. targos commented on Nov 24, 2017

    @targos
    Member

    Fixed in #10409

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions