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

src: fix warning in string_search.h by RaisinTen · Pull Request #37146 · nodejs/node · GitHub

/ node Public

src: fix warning in string_search.h - #37146

Closed
RaisinTen wants to merge 1 commit into
nodejs:masterfrom
RaisinTen:src/fix-warning-in-string_search.h
Closed

src: fix warning in string_search.h#37146
RaisinTen wants to merge 1 commit into
nodejs:masterfrom
RaisinTen:src/fix-warning-in-string_search.h

Conversation

Copy link
Copy Markdown
Member

Fixes: #37145

nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. labels Jan 30, 2021

Copy link
Copy Markdown
Collaborator

targos commented Jan 30, 2021

Copy link
Copy Markdown
Member

The change looks OK, but I opened the issue because I'm not sure it's enough to just fix the warning.

Copy link
Copy Markdown
Member Author

@targos I realise that the code here matches this:
https://chromium.googlesource.com/v8/v8.git/+/refs/heads/master/src/strings/string-search.h#415
Do you know why the code is duplicated here if we already have a copy in deps/v8?

targos commented Jan 31, 2021

Copy link
Copy Markdown
Member

We cannot use that code from V8 as it is not part of their public API.

Copy link
Copy Markdown
Member Author

In that case should we prefer using the types that were used originally?

Copy link
Copy Markdown
Member

In that case should we prefer using the types that were used originally?

V8 implements this for strings. Strings in JS have a bounded size, which is smaller than INT_MAX. We implement this for Buffers, which also have a bounded size, but that size doesn’t fit into an int (at least on 64-bit platforms).

RaisinTen added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Feb 3, 2021

jasnell commented Feb 4, 2021

Copy link
Copy Markdown
Member

Landed in c148c3a

jasnell closed this Feb 4, 2021
jasnell pushed a commit that referenced this pull request Feb 4, 2021
Fixes: #37145

PR-URL: #37146
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
RaisinTen deleted the src/fix-warning-in-string_search.h branch February 5, 2021 13:34
danielleadams pushed a commit that referenced this pull request Feb 16, 2021
Fixes: #37145

PR-URL: #37146
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This was referenced Feb 16, 2021
targos pushed a commit that referenced this pull request May 1, 2021
Fixes: #37145

PR-URL: #37146
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
danielleadams mentioned this pull request May 3, 2021
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

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concerning compilation warning in string_search.h

8 participants


Back | FazBrowse Home | New Git URL