Skip to content

Conversation

@ayushmanchhabra
Copy link
Contributor

@ayushmanchhabra ayushmanchhabra commented Mar 3, 2023

Fixes: #8012
Fixes: #7844

The Window.showDevtools function crashes since it is not available on normal flavor. This PR makes the function throw an error which the user can catch in a try/catch block preventing crash.

@ayushmanchhabra ayushmanchhabra changed the title Prevent crash on nw.showDevTools on non-sdk build feat: exit nw.showDevTools function if called on non-sdk build Mar 3, 2023
@ayushmanchhabra ayushmanchhabra self-assigned this Mar 7, 2023
@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review March 7, 2023 08:33
@ayushmanchhabra
Copy link
Contributor Author

I was not sure how to test for this behaviour - please let me know if there is a better way to go about it!

TheJaredWilcurt and others added 4 commits March 8, 2023 00:39
Sanity tests are executed by chromedriver on sdk build flavor. We want to test if showDevTools does not crash NW on execution.
@ayushmanchhabra ayushmanchhabra changed the title feat: exit nw.showDevTools function if called on non-sdk build feat: exit showDevTools if called on non-sdk build Mar 9, 2023
@ayushmanchhabra ayushmanchhabra marked this pull request as draft March 10, 2023 02:29
@ayushmanchhabra ayushmanchhabra changed the base branch from nw73 to nw74 March 10, 2023 02:30
@ayushmanchhabra
Copy link
Contributor Author

ayushmanchhabra commented Mar 15, 2023

@rogerwang This is ready for review.

Would you be open to backporting these changes to previous versions (nw72 for win 7 and 8)?

@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review March 15, 2023 05:59
@ayushmanchhabra
Copy link
Contributor Author

@rogerwang would like to get some feedback on this whenever you get the time

@ayushmanchhabra ayushmanchhabra mentioned this pull request Apr 3, 2023
@ayushmanchhabra ayushmanchhabra marked this pull request as draft April 4, 2023 20:59
@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review April 5, 2023 04:46
@ayushmanchhabra ayushmanchhabra changed the title feat: exit showDevTools if called on non-sdk build Fix issue 8012 and 7844 Apr 17, 2023
@ayushmanchhabra ayushmanchhabra marked this pull request as draft April 18, 2023 00:56
@ayushmanchhabra ayushmanchhabra changed the base branch from nw74 to nw75 April 20, 2023 19:23
@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review April 20, 2023 19:30
@ayushmanchhabra
Copy link
Contributor Author

ayushmanchhabra commented Apr 20, 2023

@TheJaredWilcurt feel free to update/improve the JSDoc descriptions. I was not sure how to document a callback - maybe you can help out with that?

Co-authored-by: The Jared Wilcurt <[email protected]>
@ayushmanchhabra ayushmanchhabra closed this by deleting the head repository May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-SDK nw.js fails on showDevTools DevTools segafult

2 participants