|
@@ -406,6 +406,15 @@ V8JS_METHOD(require)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(Z_TYPE(module_code) == IS_OBJECT) {
|
|
|
|
+ v8::Local<v8::Object> newobj = zval_to_v8js(&module_code, isolate)->ToObject();
|
|
|
|
+ c->modules_loaded[normalised_module_id].Reset(isolate, newobj);
|
|
|
|
+ info.GetReturnValue().Set(newobj);
|
|
|
|
+
|
|
|
|
+ efree(normalised_path);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
// Convert the return value to string
|
|
// Convert the return value to string
|
|
if (Z_TYPE(module_code) != IS_STRING) {
|
|
if (Z_TYPE(module_code) != IS_STRING) {
|
|
convert_to_string(&module_code);
|
|
convert_to_string(&module_code);
|