Unverified Commit dab09877 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

module: don't cache uninitialized builtins

Don't cache the exported values of fully uninitialized builtins.
This works by adding an additional `loading` flag that is only
active during initial loading of an internal module and checking
that either the module is fully loaded or is in that state before
using its cached value.

This has the effect that builtins modules which could not be loaded
(e.g. because compilation failed due to missing stack space) can be
loaded at a later point.

Fixes: https://github.com/nodejs/node/issues/6899
PR-URL: https://github.com/nodejs/node/pull/6907


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent 4bd410bb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment