FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: added test for indexed properties by AnnaMag · Pull Request #11769 · nodejs/node · GitHub

/ node Public

test: added test for indexed properties - #11769

Closed
AnnaMag wants to merge 1 commit into
nodejs:masterfrom
AnnaMag:test_indexed_properties
Closed

test: added test for indexed properties#11769
AnnaMag wants to merge 1 commit into
nodejs:masterfrom
AnnaMag:test_indexed_properties

Conversation

AnnaMag commented Mar 9, 2017

Copy link
Copy Markdown
Member

Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

nodejs-github-bot added the test Issues and PRs related to the tests. label Mar 9, 2017

AnnaMag commented Mar 9, 2017

Copy link
Copy Markdown
Member Author

cc/ @fhinkel

mscdex added the vm Issues and PRs related to the vm subsystem. label Mar 9, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Perhaps we could just use a multi-line template string here instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not sure I understand. @mscdex, could you be a little more specific, please? :)

fhinkel Mar 9, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Instead of +-ing several strings, we can use one multi-line string by using backticks.

 const code = `Object.defineProperty(this, 99, {  
      value: 20,  
      enumerable: true  
 });`; 

It's less characters total and you can copy and paste such strings into the REPL without removing all the ' + ' in between.

See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @fhinkel. The code is revised now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

minor nit: extra space after '99'

AnnaMag force-pushed the test_indexed_properties branch from af3a0d9 to 6672b64 Compare March 9, 2017 14:17

fhinkel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().
AnnaMag force-pushed the test_indexed_properties branch from 6672b64 to b4b59ad Compare March 9, 2017 18:32

mscdex commented Mar 9, 2017

Copy link
Copy Markdown
Contributor

LGTM.

cjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The indentation looks off on lines 8 and 9. Other than that, LGTM.

jasnell commented Mar 15, 2017

Copy link
Copy Markdown
Member

jasnell pushed a commit that referenced this pull request Mar 15, 2017
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: #11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>

jasnell commented Mar 15, 2017

Copy link
Copy Markdown
Member

Landed in 1a210c4

jasnell closed this Mar 15, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Mar 20, 2017
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: nodejs#11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: nodejs#11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this pull request Apr 18, 2017
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: #11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2017
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: #11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins mentioned this pull request Apr 19, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Currently, indexed properties are correctly copied
onto the sandbox by CopyProperties().
This will break when CopyProperties() is removed
after adjusting NamedPropertyHandlerConfiguration
config() to use property callbacks from the new
V8 API. To fix it, we will set a config for indexed
properties.

This test is a preparation step for the patch
that removes CopyProperties().

PR-URL: nodejs/node#11769
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL