Skip to content

WinInetRequestWrapper::cancel() should remove status callback #183

Closed
@HIROSN

Description

@HIROSN

Describe your environment.
Microsoft Edge 80.0.326.0
SDK version 3.2.176.1

Steps to reproduce.
No repro steps.
This is a Watson bug: Bug 23052293: [Watson Failure] caused by BAD_INSTRUCTION_PTR_c0000005_oneds.dll!Unloaded

What is the expected behavior?
Browser shutdown without issues.

What is the actual behavior?
We unload our DLL after flush and tear down log manager. Occasionally a callback to WinInetRequestWrapper::winInetCallback is made in the unloaded DLL.

Additional context.
Thanks to @bliptec, here is a proposed fix.

    void cancel()
    {
        if (m_hWinInetRequest != nullptr)
        {
            ::InternetSetStatusCallback(m_hWinInetRequest, nullptr);
            ::InternetCloseHandle(m_hWinInetRequest);
            // don't wait for request callback
        }
    }

Metadata

Metadata

Assignees

Labels

EDGEPartner Team - Microsoft EdgeP2Issues that are not blockingPR sent to code reviewPending code reviewbugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions