Skip to content

Commit

Permalink
refactor(ses): convert async arrow functions for Hermes
Browse files Browse the repository at this point in the history
- fix remaining React Native Android release build (Metro bundle) errors
- convert load fn and drainQueue fn to standard async fns like asyncTrampoline
- test: 379 passed, 2 known failures, 2 skipped
- load fn is too integrated into SES and tests to be removed
  • Loading branch information
leotm committed Jun 2, 2024
1 parent 92f26f0 commit d04d591
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ses/src/module-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function asyncJobQueue() {
*
* @returns {Promise<Array<Error>>}
*/
const drainQueue = async () => {
async function drainQueue () {
for (const job of pendingJobs) {
// eslint-disable-next-line no-await-in-loop
await job;
Expand Down Expand Up @@ -387,12 +387,12 @@ const preferAsync = (asyncImpl, _syncImpl) => asyncImpl;
* compartment and the specifier of the module within its own compartment.
* This graph is then ready to be synchronously linked and executed.
*/
export const load = async (
export async function load (
compartmentPrivateFields,
moduleAliases,
compartment,
moduleSpecifier,
) => {
) {
const { name: compartmentName } = weakmapGet(
compartmentPrivateFields,
compartment,
Expand Down

0 comments on commit d04d591

Please sign in to comment.