Skip to content

Commit d350cad

Browse files
authored
Update to M93 (#3781)
* Upgrade to CEF 93.1.7+g9117d6a+chromium-93.0.4577.42 / Chromium 93.0.4577.42 - Core - Add basic ref counting implementation IMPLEMENT_REFCOUNTING implementation uses atomic which forces the VC++ compiler to compile as native which doesn't work for our managed ref classes. - Use InterlockedCompareExchange for custom ref count reads - Use InterlockedIncrement/InterlockedDecrement directly - There's no memory barrier for HasOneRef/HasAtLeastOneRef as the read of a LONG should happen in one operation on 32/64 bit architectures (at least that's my understanding at this point in time). References: https://github.com/chromiumembedded/cef/blob/4472/include/base/internal/cef_atomicops_x86_msvc.h#L125 https://github.com/chromiumembedded/cef/blob/4472/include/base/internal/cef_atomicops_arm64_msvc.h#L107 https://github.com/chromiumembedded/cef/blob/4472/include/base/cef_atomic_ref_count.h#L114 https://github.com/chromiumembedded/cef/blob/4472/include/cef_base.h#L91 - Remove Microsoft.Net.Compilers package from projects Now that we require a min of VS2019 to build there's no need for a custom compiler package - Start removing VS2015/VC++2015 references - Remove RegisterWidevineCdm This is a breaking change. CEF will now automatically download the Widevine CDM component Resolves #3767 - RequestContext.LoadExtension now uses managed to code spawn on CEF UI Thread Avoid having to use cef_callback.h which was causing problems for x86 builds
1 parent 5d14f7c commit d350cad

File tree

95 files changed

+276
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+276
-521
lines changed

CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace CefSharp
3838
_methodCallbackSave = nullptr;
3939
}
4040

41-
IMPLEMENT_REFCOUNTING(JavascriptAsyncMethodHandler);
41+
IMPLEMENT_REFCOUNTINGM(JavascriptAsyncMethodHandler);
4242
};
4343
}
4444
}

CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ namespace CefSharp
321321
return false;
322322
}
323323

324-
325-
IMPLEMENT_REFCOUNTING(BindObjectAsyncHandler);
324+
IMPLEMENT_REFCOUNTINGM(BindObjectAsyncHandler);
326325
};
327326
}
328327
}

CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ namespace CefSharp
8484
virtual DECL void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefDOMNode> node) override;
8585
virtual DECL void OnUncaughtException(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Exception> exception, CefRefPtr<CefV8StackTrace> stackTrace) override;
8686

87-
IMPLEMENT_REFCOUNTING(CefAppUnmanagedWrapper);
87+
IMPLEMENT_REFCOUNTINGM(CefAppUnmanagedWrapper);
8888
};
8989
}
9090
}

CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace CefSharp
3636
public:
3737
CefBrowserWrapper(CefRefPtr<CefBrowser> cefBrowser)
3838
{
39-
_cefBrowser = cefBrowser;
39+
_cefBrowser = cefBrowser.get();
4040
BrowserId = cefBrowser->GetIdentifier();
4141
IsPopup = cefBrowser->IsPopup();
4242

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\cef.sdk.92.0.25\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.92.0.25\build\cef.sdk.props')" />
3+
<Import Project="..\packages\cef.sdk.93.1.7\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.93.1.7\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')" />
55
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
66
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
@@ -37,6 +37,7 @@
3737
<RootNamespace>CefSharpBrowserSubprocessCore</RootNamespace>
3838
<Keyword>NetCoreCProj</Keyword>
3939
<TargetFramework>netcoreapp3.1</TargetFramework>
40+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
4041
</PropertyGroup>
4142
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4243
<Import Project="..\CefSharp.props" />
@@ -254,12 +255,14 @@
254255
</Manifest>
255256
</ItemDefinitionGroup>
256257
<ItemGroup>
258+
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h" />
257259
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\MCefRefPtr.h" />
258260
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\ReportUnhandledExceptions.h" />
259261
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\ObjectsSerialization.h" />
260262
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" />
261263
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\StringUtils.h" />
262264
<ClInclude Include="BindObjectAsyncHandler.h" />
265+
<ClCompile Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.cpp" />
263266
<ClCompile Include="BrowserSubprocessExecutable.h" />
264267
<ClInclude Include="Cef.h" />
265268
<ClInclude Include="JavascriptRootObjectWrapper.h" />

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\cef.sdk.92.0.25\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.92.0.25\build\cef.sdk.props')" />
3+
<Import Project="..\packages\cef.sdk.93.1.7\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.93.1.7\build\cef.sdk.props')" />
44
<Import Project="..\packages\GitLink.3.1.0\build\GitLink.props" Condition="Exists('..\packages\GitLink.3.1.0\build\GitLink.props')" />
55
<ItemGroup Label="ProjectConfigurations">
66
<ProjectConfiguration Include="Debug|Win32">
@@ -25,6 +25,7 @@
2525
<Keyword>ManagedCProj</Keyword>
2626
<RootNamespace>CefSharpBrowserSubprocessCore</RootNamespace>
2727
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
28+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
2829
</PropertyGroup>
2930
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
3031
<Import Project="..\CefSharp.props" />
@@ -168,11 +169,13 @@
168169
<Reference Include="System.ServiceModel" />
169170
</ItemGroup>
170171
<ItemGroup>
172+
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h" />
171173
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\MCefRefPtr.h" />
172174
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\ObjectsSerialization.h" />
173175
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" />
174176
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\StringUtils.h" />
175177
<ClInclude Include="BindObjectAsyncHandler.h" />
178+
<ClCompile Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.cpp" />
176179
<ClCompile Include="BrowserSubprocessExecutable.h" />
177180
<ClInclude Include="Cef.h" />
178181
<ClInclude Include="JavascriptPromiseHandler.h" />

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@
119119
<ClInclude Include="JavascriptPromiseHandler.h">
120120
<Filter>Header Files</Filter>
121121
</ClInclude>
122+
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h">
123+
<Filter>Header Files</Filter>
124+
</ClInclude>
122125
</ItemGroup>
123126
<ItemGroup>
124127
<ClCompile Include="AssemblyInfo.cpp">
@@ -190,6 +193,9 @@
190193
<ClCompile Include="BrowserSubprocessExecutable.h">
191194
<Filter>Header Files</Filter>
192195
</ClCompile>
196+
<ClCompile Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.cpp">
197+
<Filter>Source Files</Filter>
198+
</ClCompile>
193199
</ItemGroup>
194200
<ItemGroup>
195201
<ResourceCompile Include="Resource.rc" />

CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace CefSharp
3838

3939
CefRefPtr<CefV8Value> ConvertToCefObject(Object^ obj);
4040

41-
IMPLEMENT_REFCOUNTING(JavascriptMethodHandler);
41+
IMPLEMENT_REFCOUNTINGM(JavascriptMethodHandler);
4242
};
4343
}
4444
}

CefSharp.BrowserSubprocess.Core/JavascriptPostMessageHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ namespace CefSharp
8686
return true;
8787
}
8888

89-
IMPLEMENT_REFCOUNTING(JavascriptPostMessageHandler);
89+
IMPLEMENT_REFCOUNTINGM(JavascriptPostMessageHandler);
9090
};
9191
}
9292
}

CefSharp.BrowserSubprocess.Core/JavascriptPromiseHandler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace CefSharp
8383
return false;
8484
}
8585

86-
IMPLEMENT_REFCOUNTING(JavascriptPromiseHandler);
86+
IMPLEMENT_REFCOUNTINGM(JavascriptPromiseHandler);
8787
};
8888
}
8989
}

0 commit comments

Comments
 (0)