summaryrefslogtreecommitdiff
path: root/src/node.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.cc')
-rw-r--r--src/node.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/node.cc b/src/node.cc
index bab251ada3..c24dfce0ab 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1542,14 +1542,6 @@ static void GetBinding(const FunctionCallbackInfo<Value>& args) {
Local<Object> exports;
if (mod != nullptr) {
exports = InitModule(env, mod, module);
- } else if (!strcmp(*module_v, "constants")) {
- exports = Object::New(env->isolate());
- CHECK(exports->SetPrototype(env->context(),
- Null(env->isolate())).FromJust());
- DefineConstants(env->isolate(), exports);
- } else if (!strcmp(*module_v, "natives")) {
- exports = Object::New(env->isolate());
- DefineJavaScript(env, exports);
} else {
return ThrowIfNoSuchModule(env, *module_v);
}
@@ -1569,6 +1561,14 @@ static void GetInternalBinding(const FunctionCallbackInfo<Value>& args) {
node_module* mod = get_internal_module(*module_v);
if (mod != nullptr) {
exports = InitModule(env, mod, module);
+ } else if (!strcmp(*module_v, "constants")) {
+ exports = Object::New(env->isolate());
+ CHECK(exports->SetPrototype(env->context(),
+ Null(env->isolate())).FromJust());
+ DefineConstants(env->isolate(), exports);
+ } else if (!strcmp(*module_v, "natives")) {
+ exports = Object::New(env->isolate());
+ DefineJavaScript(env, exports);
} else if (!strcmp(*module_v, "code_cache")) {
// internalBinding('code_cache')
exports = Object::New(env->isolate());