diff --git a/src/plugins/projectexplorer/runcontrol.cpp b/src/plugins/projectexplorer/runcontrol.cpp index 14f2094c166..62b11f11570 100644 --- a/src/plugins/projectexplorer/runcontrol.cpp +++ b/src/plugins/projectexplorer/runcontrol.cpp @@ -298,9 +298,11 @@ public: bool useDebugChannel = false; bool useQmlChannel = false; bool usePerfChannel = false; + bool useWorkerChannel = false; QUrl debugChannel; QUrl qmlChannel; QUrl perfChannel; + QUrl workerChannel; }; class RunControlPrivate : public QObject, public RunControlPrivateData @@ -606,6 +608,8 @@ void RunControlPrivate::startPortsGathererIfNeededAndContinueStart() qmlChannel = getNextChannel(); if (usePerfChannel) perfChannel = getNextChannel(); + if (useWorkerChannel) + workerChannel = getNextChannel(); continueStart(); } else { @@ -700,6 +704,17 @@ QUrl RunControl::perfChannel() const return d->perfChannel; } +void RunControl::requestWorkerChannel() +{ + d->enablePortsGatherer(); + d->useWorkerChannel = true; +} + +QUrl RunControl::workerChannel() const +{ + return d->workerChannel; +} + void RunControlPrivate::continueStart() { checkState(RunControlState::Starting); diff --git a/src/plugins/projectexplorer/runcontrol.h b/src/plugins/projectexplorer/runcontrol.h index 69bcf1cdc1d..3003e83fef0 100644 --- a/src/plugins/projectexplorer/runcontrol.h +++ b/src/plugins/projectexplorer/runcontrol.h @@ -258,6 +258,9 @@ public: bool usesPerfChannel() const; QUrl perfChannel() const; + void requestWorkerChannel(); + QUrl workerChannel() const; + signals: void appendMessage(const QString &msg, Utils::OutputFormat format); void aboutToStart(); diff --git a/src/plugins/webassembly/webassemblyrunconfiguration.cpp b/src/plugins/webassembly/webassemblyrunconfiguration.cpp index 664625669c6..62d96ae5f6d 100644 --- a/src/plugins/webassembly/webassemblyrunconfiguration.cpp +++ b/src/plugins/webassembly/webassemblyrunconfiguration.cpp @@ -205,7 +205,7 @@ public: EmrunRunWorker(RunControl *runControl) : SimpleTargetRunner(runControl) { - runControl->enablePortsGatherer(); + runControl->requestWorkerChannel(); setStartModifier([this, runControl] { const QString browserId = @@ -213,7 +213,7 @@ public: setCommandLine(emrunCommand(runControl->target(), runControl->buildKey(), browserId, - QString::number(runControl->findEndPoint().port()))); + QString::number(runControl->workerChannel().port()))); setEnvironment(runControl->buildEnvironment()); }); }