Skip to content

Commit

Permalink
feat: support multiple webview windows in dart isolates
Browse files Browse the repository at this point in the history
  • Loading branch information
letrungdo committed Apr 26, 2024
1 parent 08eee67 commit 477c755
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion windows/util/rohelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,25 @@ HRESULT RoHelper::WindowsCompareStringOrdinal(HSTRING one, HSTRING two,
return mFpWindowsCompareStringOrdinal(one, two, result);
}

static ABI::Windows::System::IDispatcherQueueController** queueController;

HRESULT RoHelper::CreateDispatcherQueueController(
DispatcherQueueOptions options,
ABI::Windows::System::IDispatcherQueueController**
dispatcherQueueController) {
if (!mWinRtAvailable) {
return E_FAIL;
}
return mFpCreateDispatcherQueueController(options, dispatcherQueueController);
if (queueController == nullptr || *queueController == nullptr) {
auto result = mFpCreateDispatcherQueueController(options, dispatcherQueueController);
queueController = dispatcherQueueController;
return result;
}
else
{
dispatcherQueueController = queueController;
return S_OK;
}
}

HRESULT RoHelper::WindowsDeleteString(HSTRING one) {
Expand Down

0 comments on commit 477c755

Please sign in to comment.