diff options
author | Evan Welsh <contact@evanwelsh.com> | 2021-07-23 20:02:31 -0700 |
---|---|---|
committer | Evan Welsh <contact@evanwelsh.com> | 2021-07-23 20:02:31 -0700 |
commit | 53e43a342367c32888acc9186ca843efb25e16b8 (patch) | |
tree | b3356a50be6308c7054c4fcced0f0d542cbf0da5 | |
parent | 124c196a6086396e373f4df2bf9dddd9cf17fd0e (diff) | |
download | gjs-ewlsh/fix-realm-in-async.tar.gz |
Ensure the correct realm is entered in the async executorewlsh/fix-realm-in-async
-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; |