| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index 46dfab41b86c286a1661c26142cb45a91edf2355..80b1f9af7721a9d43d35a249ec60b30f45324028 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -1886,6 +1886,9 @@ function RunMicrotasksJS() {
|
| }
|
|
|
| function EnqueueMicrotask(fn) {
|
| + if (!IS_FUNCTION(func)) {
|
| + throw new $TypeError('Can only enqueue functions');
|
| + }
|
| var microtaskState = %GetMicrotaskState();
|
| if (IS_UNDEFINED(microtaskState.queue) || IS_NULL(microtaskState.queue)) {
|
| microtaskState.queue = new InternalArray;
|
|
|