-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
[TypeError: _runMicrotasks is not a function] #2181
Comments
Try |
I knew this error for a while now. I would like to fix it, if we really should, with some guidance. It would be a good opportunity to get to know a little about the C++ land. |
@thefourtheye This indeed seems like an v8 issuse. |
@cswl I would not be very sure about that, because |
@thefourtheye Ah, yes..sorry. I had set alias for iojs with --stack-trace-limit=1. |
@cswl The |
@thefourtheye Hmm, I read on MDN that Promise.reject is a static method so I thought the bindings were not necessary and it can be called as standalone function. Cause this works in iojs using bluebird.
Comment out bluebird and you get _runMicrotasks is not a function. |
Wait. I might be totally wrong here. Let's hear from the experts. Cc @benjamingr @petkaantonov @vkurchatkin |
@cswl As per the ECMAScript 6 specification for
... NOTE The So, I would say the behavior is correct (throwing a TypeError), as per the specifications, but the error message need not have to include X posting similar bug nodejs/node-v0.x-archive#25623, but with |
Okay, the actual place where this error originates is here, return new this(function(resolve, reject) { reject(r) }); Here, Edit 1: Looks like v8 uses |
Sorry for unavailability, I've talked about this with Domenic in the past, |
Anyway, this is not a bug - it's specified behavior. |
@benjamingr Correct, it is as per the spec. But the error message should not say |
Yes, the error message in Chrome is pretty bad too last I checked :) On Wed, Jul 15, 2015 at 8:36 AM, thefourtheye [email protected]
|
I suspect it's a bug in v8.It tries to be smart and show better message than |
I pinpointed the error in https://github.com/nodejs/io.js/blob/master/src/node.js Have a look at function _tickDomainCallback line 362. The _runMicroTasks() at line 400 seems to be throwing the error. |
Here is the related v8 issue, http://code.google.com/p/v8/issues/detail?id=4243 |
Closing this. The behaviour is in line with the spec. Error message is clearly wrong, but it's just a minor issue with v8. |
The below code throws the above mentioned error. I tried in iojs 2.3.4 and 3.0nightly. I havent tested on Chrome, but its working as expected on FFox.
I think its some sort of a bug, I dont know much internal details, but I dont see why the below code will throw the above expection.
The text was updated successfully, but these errors were encountered: