From 8d9c11b6f207c97f297356d9b9564fd8aaa9876b Mon Sep 17 00:00:00 2001 From: Martin Carlberg Date: Wed, 18 Aug 2021 15:56:36 +0200 Subject: [PATCH] Fixed: Make sure we return the result from an executed file in the callback --- Objective-J/Executable.js | 6 +++--- Objective-J/FileExecutable.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Objective-J/Executable.js b/Objective-J/Executable.js index 19b4e0572..f702aa146 100644 --- a/Objective-J/Executable.js +++ b/Objective-J/Executable.js @@ -478,13 +478,13 @@ Executable.fileImporterForURL = function(/*CFURL|String*/ aURL) { aFileExecutable.loadFileDependencies(function() { - aFileExecutable.execute(); - + var result = aFileExecutable.execute(); + // No more need to cache these. disableCFURLCaching(); if (aCallback) - aCallback(); + aCallback(result); }); }); } diff --git a/Objective-J/FileExecutable.js b/Objective-J/FileExecutable.js index 38fb227aa..0513bc07f 100644 --- a/Objective-J/FileExecutable.js +++ b/Objective-J/FileExecutable.js @@ -76,7 +76,7 @@ FileExecutable.prototype.execute = function(/*BOOL*/ shouldForce) this._hasExecuted = YES; - Executable.prototype.execute.call(this); + return Executable.prototype.execute.call(this); } DISPLAY_NAME(FileExecutable.prototype.execute);