Skip to content

Proxy Error wrapped Promise in debug mode #10406

@sky-train

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

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