8000 Handle remote arguments with no constructor by kevinsawicki · Pull Request #6369 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Handle remote arguments with no constructor #6369

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 6 commits into from
Jul 7, 2016

Conversation

kevinsawicki
Copy link
Contributor
@kevinsawicki kevinsawicki commented Jul 6, 2016

Continuation of #6360 with an added spec.

Use '' as the name when the object argument has no constructor. This makes the behavior for arguments the same as the behavior of return values.

Refs #5736
Closes #6360

@kevinsawicki kevinsawicki force-pushed the remote-object-with-no-constructor branch from d65e3ce to d67dfd0 Compare July 6, 2016 16:18
@@ -60,7 +60,7 @@ var wrapArgs = function (args, visited) {

ret = {
type: 'object',
name: value.constructor.name,
name: value.constructor != null ? value.constructor.name : 'Object',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chetverikov I tweaked your change a bit here to return an empty name when constructor.name is empty since that would seem to be the expected behavior for anonymous classes like new (class {}).

@zcbenz
Copy link
Contributor
zcbenz commented Jul 7, 2016

👍

@zcbenz zcbenz merged commit 0a64d6e into master Jul 7, 2016
@zcbenz zcbenz deleted the remote-object-with-no-constructor branch July 7, 2016 00:47
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.

3 participants
0