| 3672 | if (!jsEntry.exceptionTracker) { |
| 3673 | result = jsEntry.exceptionTracker.extractError(); |
| 3674 | return; |
| 3675 | } |
| 3676 | |
| 3677 | result = convertedValue; |
| 3678 | }); |
| 3679 | |
| 3680 | return result; |
| 3681 | } |
| 3682 | |
| 3683 | Result<Void> JavaScriptRuntime::evalModuleSync(const StringBox& path, bool reevalOnReload) { |
| 3684 | auto resourceIdResult = JavaScriptPathResolver::resolveResourceId(path); |
| 3685 | if (!resourceIdResult) { |
| 3686 | return resourceIdResult.moveError(); |
| 3687 | } |
| 3688 | |
| 3689 | Result<Void> result = Void(); |
| 3690 | |
| 3691 | dispatchSynchronouslyOnJsThread(JsThreadDispatchReason::EvalModuleSync, [&](JavaScriptEntryParameters& jsEntry) { |
| 3692 | if (reevalOnReload) { |
| 3693 | _modulesToAutoReload.insert(resourceIdResult.value()); |
| 3694 | } |
| 3695 | |
| 3696 | auto importResult = this->importModule(resourceIdResult.value(), jsEntry); |
| 3697 | if (!jsEntry.exceptionTracker) { |
| 3698 | if (reevalOnReload) { |
| 3699 | onRecoverableError("evalModuleSync", jsEntry.exceptionTracker); |
no test coverage detected