-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search: promise did not implement onCancel #44740
Comments
/cc @chrmarti |
The async awaiter generated by TypeScript breaks the cancel chain (introduced here 70e020b). I'll add a fix. |
@chrmarti wow thanks for finding this! |
Marking as verified as I am not seeing this in todays insider build. |
Does this just mean we can't use async/await when we use cancel? Which means we have to be very careful anywhere it's used in core? Didn't realize that. |
@roblourens I think this means that as much as possible we must stay away from using |
The TypeScript helper for async/await knows which promise to instantiate based on the declared return type on the async function, but it doesn't know about the cancel handler passed as an additional argument to the WinJS promise. When there is no return type declared, it just uses the native promise, which doesn't even have a cancel method. (See http://jsbin.com/mepixob/4/edit?html,js,output for my investigation.) |
I am not sure yet how to reproduce, but I see this error popping up in insiders console:
It looks like it originates from the file quick open trying to cancel an active search.
I wonder why this suddenly shows up so much more often, did something change here @roblourens ?
The text was updated successfully, but these errors were encountered: