diff options
Diffstat (limited to 'gjs/internal.cpp')
-rw-r--r-- | gjs/internal.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gjs/internal.cpp b/gjs/internal.cpp index a803eda4..fea6e71e 100644 --- a/gjs/internal.cpp +++ b/gjs/internal.cpp @@ -513,6 +513,8 @@ class PromiseData { static void load_async_callback(GObject* file, GAsyncResult* res, void* data) { std::unique_ptr<PromiseData> promise(PromiseData::from_ptr(data)); + JSAutoRealm ac(promise->cx, gjs_get_import_global(promise->cx)); + char* contents; size_t length; GError* error = nullptr; |