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

Allow "released callback" errors to be traced to remote calls #3103

Merged
merged 1 commit into from
Oct 16, 2015

Conversation

bengotow
Copy link
Contributor

It's very difficult to understand and trace Calling a callback of released renderer view errors, which are caused by passing functions to remote and then releasing the window.

These changes make it easy to debug and fix these by changing the "ID" used to track the functions. The callbacks-registry uses (new Error).stack to identify the file and line number where the function was passed to a remote call, and includes that in the ID.

index.html:

      var callback = function() {
        console.log("Run some code!");
      };
      app.on('browser-window-focus', callback); << line 16

The new exceptions look like this:

image

@zcbenz
Copy link
Contributor

zcbenz commented Oct 16, 2015

This is 🆒.

zcbenz added a commit that referenced this pull request Oct 16, 2015
Allow "released callback" errors to be traced to remote calls
@zcbenz zcbenz merged commit 4871ea7 into electron:master Oct 16, 2015
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.

2 participants