Commit 36460395 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Purpose Plugin] Reset pending reply serial when aborting

When the QMenu is closed or the Purpose job finishes, we make sure to send a reply out and reset the pending reply serial.
However, when we determined on the host side that we cannot share the contents,
we send a reply but don't reset the pending reply serial, having every subsequent purpose request
fail until reloading the extension or restarting the browser.

Differential Revision:
parent 19298988
......@@ -139,6 +139,7 @@ QJsonObject PurposePlugin::handleData(int serial, const QString &event, const QJ
// navigator.share({title: "foo"}) is valid but makes no sense
// and we also cannot share via Purpose without "urls"
m_pendingReplySerial = -1;
return {
{QStringLiteral("success"), false},
{QStringLiteral("errorCode"), QStringLiteral("INVALID_ARGUMENT")}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment