Skip to content

Instantly share code, notes, and snippets.

@fujii
Created January 9, 2022 03:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fujii/6dd1d7da709ca7c9015b1d0b82b289d9 to your computer and use it in GitHub Desktop.
diff --git a/Source/WebKitLegacy/win/WebDownloadCFNet.cpp b/Source/WebKitLegacy/win/WebDownloadCFNet.cpp
index ceff8c16113f..8749d7998aab 100644
--- a/Source/WebKitLegacy/win/WebDownloadCFNet.cpp
+++ b/Source/WebKitLegacy/win/WebDownloadCFNet.cpp
@@ -236,11 +236,11 @@ HRESULT WebDownload::cancelForResume()
if (!m_download)
return E_FAIL;
- HRESULT hr = S_OK;
RetainPtr<CFDataRef> resumeData;
if (m_destination.isEmpty()) {
CFURLDownloadCancel(m_download.get());
- goto exit;
+ m_download = nullptr;
+ return S_OK;
}
CFURLDownloadSetDeletesUponFailure(m_download.get(), false);
@@ -249,16 +249,15 @@ HRESULT WebDownload::cancelForResume()
resumeData = adoptCF(CFURLDownloadCopyResumeData(m_download.get()));
if (!resumeData) {
LOG(Download, "WebDownload - Unable to create resume data for download (%p)", this);
- goto exit;
+ m_download = nullptr;
+ return S_OK;
}
auto* resumeBytes = reinterpret_cast<const uint8_t*>(CFDataGetBytePtr(resumeData.get()));
uint32_t resumeLength = CFDataGetLength(resumeData.get());
DownloadBundle::appendResumeData(resumeBytes, resumeLength, m_bundlePath);
-exit:
- m_download = nullptr;
- return hr;
+ return S_OK;
}
HRESULT WebDownload::deletesFileUponFailure(_Out_ BOOL* result)
diff --git a/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp b/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
index e750f6de6b6f..7e6346ffa181 100644
--- a/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
+++ b/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
@@ -720,7 +720,7 @@ static void printLayer(StringBuilder& builder, const PlatformCALayer* layer, int
builder.append('\n');
printIndent(builder, indent);
- char* layerTypeName = nullptr;
+ const char* layerTypeName = nullptr;
switch (layer->layerType()) {
case PlatformCALayer::LayerTypeLayer: layerTypeName = "layer"; break;
case PlatformCALayer::LayerTypeWebLayer: layerTypeName = "web-layer"; break;
diff --git a/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp b/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp
index 0b0ad5ffdbff..45d1a5131f9c 100644
--- a/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp
+++ b/Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAD3DRenderer.cpp
@@ -592,7 +592,7 @@ bool CAD3DRenderer::resetD3DDevice(CWindow window, const CGSize& size)
D3DPRESENT_PARAMETERS parameters = initialPresentationParameters(size);
parameters.hDeviceWindow = window;
if (m_usingDirect3D9Ex) {
- CComQIPtr<IDirect3DDevice9Ex> d3d9Ex = m_d3dDevice;
+ CComQIPtr<IDirect3DDevice9Ex> d3d9Ex(m_d3dDevice);
ASSERT(d3d9Ex);
hr = d3d9Ex->ResetEx(&parameters, nullptr);
} else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment