| 1298 | } |
| 1299 | |
| 1300 | void ScriptingObjects::ScriptDownloadObject::call(bool highPriority) |
| 1301 | { |
| 1302 | |
| 1303 | callback.call(nullptr, 0); |
| 1304 | |
| 1305 | #if 0 |
| 1306 | if (HiseJavascriptEngine::isJavascriptFunction(callback)) |
| 1307 | { |
| 1308 | auto type = highPriority ? JavascriptThreadPool::Task::HiPriorityCallbackExecution : |
| 1309 | JavascriptThreadPool::Task::Type::LowPriorityCallbackExecution; |
| 1310 | |
| 1311 | auto& pool = getScriptProcessor()->getMainController_()->getJavascriptThreadPool(); |
| 1312 | Ptr strongPtr = Ptr(this); |
| 1313 | |
| 1314 | pool.addJob(type, jp, [strongPtr](JavascriptProcessor* p) |
| 1315 | { |
| 1316 | if (auto e = p->getScriptEngine()) |
| 1317 | { |
| 1318 | auto r = Result::ok(); |
| 1319 | var::NativeFunctionArgs args(var(strongPtr), nullptr, 0); |
| 1320 | e->callExternalFunction(strongPtr->callback, args, &r); |
| 1321 | strongPtr->callbackPending.store(false); |
| 1322 | return r; |
| 1323 | } |
| 1324 | |
| 1325 | return Result::fail("engine doesn't exist"); |
| 1326 | }); |
| 1327 | } |
| 1328 | #endif |
| 1329 | } |
| 1330 | |
| 1331 | |
| 1332 | String ScriptingObjects::ScriptDownloadObject::getFullURL() |
no test coverage detected