Skip to content

Commit

Permalink
IBrowserHost.GetVisibleNavigationEntry - Add call to ThrowIfExecutedO…
Browse files Browse the repository at this point in the history
…nNonCefUiThread guard and improve xml doc

Resolves #2986
  • Loading branch information
amaitland committed Dec 9, 2019
1 parent db4f5f3 commit 99c177a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CefSharp.Core/Internals/CefBrowserHostWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@ NavigationEntry^ CefBrowserHostWrapper::GetVisibleNavigationEntry()
{
ThrowIfDisposed();

ThrowIfExecutedOnNonCefUiThread();

auto entry = _browserHost->GetVisibleNavigationEntry();

return TypeConversion::FromNative(entry, true);
Expand Down
3 changes: 2 additions & 1 deletion CefSharp/IBrowserHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ public interface IBrowserHost : IDisposable

/// <summary>
/// Returns the current visible navigation entry for this browser. This method
/// can only be called on the CEF UI thread.
/// can only be called on the CEF UI thread which by default is not the same
/// as your application UI thread.
/// </summary>
/// <returns>the current navigation entry</returns>
NavigationEntry GetVisibleNavigationEntry();
Expand Down

0 comments on commit 99c177a

Please sign in to comment.