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

lib: restate the code to use primordials by PoojaDurgad · Pull Request #36561 · nodejs/node · GitHub

/ node Public

lib: restate the code to use primordials - #36561

Closed
PoojaDurgad wants to merge 1 commit into
nodejs:masterfrom
PoojaDurgad:pri-v8prof
Closed

lib: restate the code to use primordials#36561
PoojaDurgad wants to merge 1 commit into
nodejs:masterfrom
PoojaDurgad:pri-v8prof

Conversation

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Dec 18, 2020

Copy link
Copy Markdown
Contributor Author

aduh95 commented Dec 18, 2020

Copy link
Copy Markdown
Contributor

I tried doing that in #36527 (fe72118 and b30bb91), but it seems this file cannot use primordials.

Copy link
Copy Markdown
Contributor Author

@aduh95 - yeah, looks like this file cannot use primordials. but why ? is there any other files which cannot use primordials?

aduh95 commented Dec 18, 2020

Copy link
Copy Markdown
Contributor

Not sure, but I think this is a one-of.

Trott commented Dec 21, 2020

Copy link
Copy Markdown
Member

Feel free to continue discussion or even re-open if you think appropriate, but I'm going to close this since it doesn't seem like it's going to land.

Trott closed this Dec 21, 2020
filtered = filtered.split('\n');
return out.replace(FUNC_RE, (all, prefix, postfix) => {
filtered = StringPrototypeSplit(filtered, '\n');
return StringPrototypeReplace(out, FUNC_RE, (all, prefix, postfix) => {

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

Note that calling StringPrototypeReplace on a RegExp is unsafe, as it calls RegExp.prototype[Symbol.replace].


This should instead use:

Suggested change
return StringPrototypeReplace(out, FUNC_RE, (all, prefix, postfix) => {
return RegExpPrototypeSymbolReplace(FUNC_RE, out, (all, prefix, postfix) => {

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

tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL