Carries out the import operation
| 238 | |
| 239 | // Carries out the import operation |
| 240 | GJS_JSAPI_RETURN_CONVENTION |
| 241 | static JSObject* import(JSContext* cx, JS::HandleObject importer, |
| 242 | JS::HandleId id, const char* name, GFile* file) { |
| 243 | JS::RootedObject module(cx, GjsScriptModule::create(cx, name)); |
| 244 | if (!module || |
| 245 | !priv(module)->define_import(cx, module, importer, id) || |
| 246 | !priv(module)->import_file(cx, module, file)) |
| 247 | return nullptr; |
| 248 | |
| 249 | return module; |
| 250 | } |
| 251 | |
| 252 | GjsScriptModule(GjsScriptModule&) = delete; |
| 253 | GjsScriptModule& operator=(GjsScriptModule&) = delete; |
nothing calls this directly
no test coverage detected