8000 Guard against missing remote function properties by kevinsawicki · Pull Request #7209 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Guard against missing remote function properties #7209

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

Merged
merged 4 commits into from
Sep 16, 2016

Conversation

kevinsawicki
Copy link
Contributor

A remote function that is no longer available when its properties are accessed will throws error when the member metadata is lazily loaded.

This pull request guards against this case and at least partially fixes #7196, specifically the Cannot read property 'Symbol(Symbol.iterator)' of undefined errors.

}

return new Proxy(remoteMemberFunction, {
set: function(target, property, value, receiver) {
if (property !== 'ref') loadRemoteProperties()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents eagerly loading the function properties when the function is accessed or invoked.

@kevinsawicki kevinsawicki force-pushed the remote-function-missing-properties branch from 32b9780 to eef4277 Compare September 14, 2016 20:30
@zcbenz
Copy link
Contributor
zcbenz commented Sep 16, 2016

👍

@zcbenz zcbenz merged commit ea244a5 into master Sep 16, 2016
@zcbenz zcbenz deleted the remote-function-missing-properties branch September 16, 2016 12:11
@maxbrunsfeld
Copy link
Contributor

👏

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.

TypeError when accessing remote objects
3 participants
0