Skip to content

Commit 79bcc68

Browse files
authored
Merge 8f5acfa into 2521052
2 parents 2521052 + 8f5acfa commit 79bcc68

36 files changed

Lines changed: 96 additions & 240 deletions

CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="..\packages\cef.sdk.114.2.10\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.114.2.10\build\cef.sdk.props')" />
44
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
@@ -26,7 +26,7 @@
2626
<ProjectGuid>{6C4BB501-2F8E-48AC-9AB5-8CFB2D74185C}</ProjectGuid>
2727
<Keyword>ManagedCProj</Keyword>
2828
<RootNamespace>CefSharpBrowserSubprocessCore</RootNamespace>
29-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
29+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
3030
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
3131
</PropertyGroup>
3232
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -261,4 +261,4 @@
261261
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" />
262262
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" />
263263
</ImportGroup>
264-
</Project>
264+
</Project>

CefSharp.BrowserSubprocess/CefSharp.BrowserSubprocess.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net452</TargetFramework>
3+
<TargetFramework>net462</TargetFramework>
44
<OutputType>WinExe</OutputType>
55
<Platforms>x86;x64</Platforms>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0"?>
22
<configuration>
3-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>

CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="..\packages\cef.sdk.114.2.10\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.114.2.10\build\cef.sdk.props')" />
44
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
@@ -26,7 +26,7 @@
2626
<ProjectGuid>{7B495581-2271-4F41-9476-ACB86E8C864F}</ProjectGuid>
2727
<RootNamespace>CefSharp</RootNamespace>
2828
<Keyword>ManagedCProj</Keyword>
29-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
29+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
3030
</PropertyGroup>
3131
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3232
<Import Project="..\CefSharp.props" />
@@ -368,4 +368,4 @@
368368
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" />
369369
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" />
370370
</ImportGroup>
371-
</Project>
371+
</Project>

CefSharp.Core.Runtime/Internals/CefBrowserHostWrapper.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,7 @@ Task<double>^ CefBrowserHostWrapper::GetZoomLevelAsync()
134134

135135
if (CefCurrentlyOn(TID_UI))
136136
{
137-
auto taskSource = gcnew TaskCompletionSource<double>();
138-
139-
CefSharp::Internals::TaskExtensions::TrySetResultAsync<double>(taskSource, GetZoomLevelOnUI());
140-
return taskSource->Task;
137+
return Task::FromResult(GetZoomLevelOnUI());
141138
}
142139
return Cef::UIThreadTaskFactory->StartNew(gcnew Func<double>(this, &CefBrowserHostWrapper::GetZoomLevelOnUI));
143140
}

CefSharp.Core.Runtime/Internals/ClientAdapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ namespace CefSharp
14891489
response->Message = StringUtils::ToClr(argList->GetString(2));
14901490
}
14911491

1492-
CefSharp::Internals::TaskExtensions::TrySetResultAsync<JavascriptResponse^>(pendingTask, response);
1492+
pendingTask->TrySetResult(response);
14931493
}
14941494

14951495
handled = true;

CefSharp.Core/CefSharp.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net452</TargetFramework>
3+
<TargetFramework>net462</TargetFramework>
44
<OutputType>Library</OutputType>
55
<RootNamespace>CefSharp</RootNamespace>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

CefSharp.Core/DevTools/DevToolsClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public Task<T> ExecuteDevToolsMethodAsync<T>(string method, IDictionary<string,
138138
throw new ObjectDisposedException(nameof(IBrowser));
139139
}
140140

141-
var taskCompletionSource = new TaskCompletionSource<T>();
141+
var taskCompletionSource = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
142142

143143
var methodResultContext = new DevToolsMethodResponseContext(
144144
type: typeof(T),
@@ -332,7 +332,7 @@ void IDevToolsMessageObserver.OnDevToolsMethodResult(IBrowser browser, int messa
332332
/// <summary>
333333
/// Deserialize the JSON stream into a .Net object.
334334
/// For .Net Core/.Net 5.0 uses System.Text.Json
335-
/// for .Net 4.5.2 uses System.Runtime.Serialization.Json
335+
/// for .Net 4.6.2 uses System.Runtime.Serialization.Json
336336
/// </summary>
337337
/// <typeparam name="T">Object type</typeparam>
338338
/// <param name="eventName">event Name</param>
@@ -359,7 +359,7 @@ private static T DeserializeJsonEvent<T>(string eventName, Stream stream) where
359359
/// <summary>
360360
/// Deserialize the JSON stream into a .Net object.
361361
/// For .Net Core/.Net 5.0 uses System.Text.Json
362-
/// for .Net 4.5.2 uses System.Runtime.Serialization.Json
362+
/// for .Net 4.6.2 uses System.Runtime.Serialization.Json
363363
/// </summary>
364364
/// <typeparam name="T">Object type</typeparam>
365365
/// <param name="stream">JSON stream</param>
@@ -372,7 +372,7 @@ private static T DeserializeJson<T>(Stream stream)
372372
/// <summary>
373373
/// Deserialize the JSON stream into a .Net object.
374374
/// For .Net Core/.Net 5.0 uses System.Text.Json
375-
/// for .Net 4.5.2 uses System.Runtime.Serialization.Json
375+
/// for .Net 4.6.2 uses System.Runtime.Serialization.Json
376376
/// </summary>
377377
/// <param name="type">Object type</param>
378378
/// <param name="stream">JSON stream</param>

CefSharp.Core/WebBrowserExtensionsEx.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public static Task<NavigationEntry> GetVisibleNavigationEntryAsync(this IChromiu
3939
return Task.FromResult<NavigationEntry>(entry);
4040
}
4141

42-
var tcs = new TaskCompletionSource<NavigationEntry>();
42+
var tcs = new TaskCompletionSource<NavigationEntry>(TaskCreationOptions.RunContinuationsAsynchronously);
4343

4444
Cef.UIThreadTaskFactory.StartNew(delegate
4545
{
4646
var entry = host.GetVisibleNavigationEntry();
4747

48-
tcs.TrySetResultAsync(entry);
48+
tcs.TrySetResult(entry);
4949
});
5050

5151
return tcs.Task;
@@ -107,7 +107,7 @@ public static Task<byte[]> DownloadUrlAsync(this IFrame frame, string url)
107107
throw new Exception("Frame is invalid, unable to continue.");
108108
}
109109

110-
var taskCompletionSource = new TaskCompletionSource<byte[]>();
110+
var taskCompletionSource = new TaskCompletionSource<byte[]>(TaskCreationOptions.RunContinuationsAsynchronously);
111111

112112
//Can be created on any valid CEF Thread, here we'll use the CEF UI Thread
113113
Cef.UIThreadTaskFactory.StartNew(delegate
@@ -129,11 +129,11 @@ public static Task<byte[]> DownloadUrlAsync(this IFrame frame, string url)
129129
{
130130
if (req.RequestStatus == UrlRequestStatus.Success)
131131
{
132-
taskCompletionSource.TrySetResultAsync(memoryStream.ToArray());
132+
taskCompletionSource.TrySetResult(memoryStream.ToArray());
133133
}
134134
else
135135
{
136-
taskCompletionSource.TrySetExceptionAsync(new Exception("RequestStatus:" + req.RequestStatus + ";StatusCode:" + req.Response.StatusCode));
136+
taskCompletionSource.TrySetException(new Exception("RequestStatus:" + req.RequestStatus + ";StatusCode:" + req.Response.StatusCode));
137137
}
138138
})
139139
.Build();

CefSharp.OffScreen/CefSharp.OffScreen.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net452;net462</TargetFrameworks>
3+
<TargetFrameworks>net462</TargetFrameworks>
44
<OutputType>Library</OutputType>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile>

0 commit comments

Comments
 (0)