ohos: stop using the legacy evalWithConsumer()


evalWithConsumer() is only a backward-compatible alias for
evalWithPromise(), kept so that callers passing a result consumer keep
compiling. Port tryRunJavaScript() and fetchAllCookies() to
evalWithPromise() and split the promises with
makeThenCatchBranches(Q_FUNC_INFO).

Each callback then owns a branch promise, which is all
Promise::withContext() provides here, and an unfulfilled promise reports
its whole forwarding chain. Apart from those diagnostics, no functional
change is intended.

Part of removing QNapi::PromiseWithContext.

Pick-to: 6.12
Task-number: QTBUG-150038
Change-Id: I729ca25e793334af0b0ade56a5a0d935dca7ab1c
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
commit3fa8c8d9a4c3e599eb379031ba35f13f0b9edc91
parent6e0e9db8be2c7a287a4d8950e0eb798c3ba4dd2a
authorZbigniew Chyla <zbigniew.chyla@qt.io>
committerZbigniew Chyla <zbigniew.chyla@qt.io>
commit timeTue, 22 Sep 2026 04:39:31 +0000