Skip to content
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

prevent crash on win.showDevTools in normal build flavor #8213

Open
wants to merge 1 commit into
base: nw91
Choose a base branch
from

Conversation

ayushmanchhabra
Copy link
Contributor

@ayushmanchhabra ayushmanchhabra commented Aug 28, 2024

Fixes: #7844
Fixes: #8012

@ayushmanchhabra ayushmanchhabra changed the title prevent crash for functions running in incorrect build flavor prevent crash on calling win.showDevTools when not running sdk build flavor Aug 28, 2024
@ayushmanchhabra ayushmanchhabra changed the title prevent crash on calling win.showDevTools when not running sdk build flavor prevent crash when calling win.showDevTools in normal build flavor Aug 28, 2024
@ayushmanchhabra
Copy link
Contributor Author

ayushmanchhabra commented Aug 28, 2024

@rogerwang is this implementation okay or do you want the error to be returned via the callback as shown below?

win.showDevTools((status, error) => {
  if (error) {
    console.error(error)
  }
});

@ayushmanchhabra ayushmanchhabra changed the title prevent crash when calling win.showDevTools in normal build flavor prevent crash on win.showDevTools in normal build flavor Aug 28, 2024
@ayushmanchhabra
Copy link
Contributor Author

Currently the changed code returns the error via callback and exits the function. Is this implementation fine?

@ayushmanchhabra ayushmanchhabra marked this pull request as ready for review August 30, 2024 10:13
@ayushmanchhabra
Copy link
Contributor Author

Can this be merged in before releasing nw92?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-SDK nw.js fails on showDevTools DevTools segafult
1 participant