Git Product home page Git Product logo

Comments (4)

laverdet avatar laverdet commented on July 18, 2024

Is there an easy way to repro this?

from node-fibers.

scriby avatar scriby commented on July 18, 2024

Here's how to reproduce:

  1. Get a project set up with the asyncblock dependency
  2. Run the following code (the exact code doesn't matter, but this works):
var asyncTask = function(callback) {
    process.nextTick(function() {
        callback(null, 1, 2, 3);
    });
};

asyncblock(function(flow) {
    asyncTask(flow.add());
    flow.wait();
});
  1. I'm using the debugger built into the WebStorm editor, so if you can't reproduce in your environment, you might try installing it (it has a 30 day free trial)
  2. Set a breakpoint on the asyncTask(flow.add()); line, and step in there
  3. Once inside the asyncblock's flow.add method, try to inspect the contents of the "this" variable. I did this by right clicking -> evaluate expression -> "this" -> press enter -> expand the little triangle next to the variable
  4. At this point, the error is printed to the console:

Assertion failed: (info.This()->InternalFieldCount() == 1), function GetStarted, file fibers.cc, line 440.

Thanks,

Chris

from node-fibers.

laverdet avatar laverdet commented on July 18, 2024

Yeah this can be repro'd with:

var fiber = new Fiber(function(){});
var fiber2 = Object.create(fiber);
console.log(fiber.started);

Not really sure how to fix it though. The accessor is called but with the wrong this. I'd have to walk down the prototype chain to find the right one. Doesn't seem worth it.. I guess I could throw instead of crashing the application though.

from node-fibers.

scriby avatar scriby commented on July 18, 2024

Ok. I don't think it's that big of a deal assuming it only affects the debugger.

from node-fibers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.