profile
viewpoint
Joyee Cheung joyeecheung @igalia Hangzhou, China https://joyeecheung.github.io/blog/ Spelled as Qiuyi Zhang (张秋怡) in Mandarin. joyee on freenode IRC. She/Her.

joyeecheung/diary 73

Reads diaries written in markdown from a git submodule, and generates a static site for it.

joyeecheung/dark-channel-prior-dehazing 47

Python implementation of "Single Image Haze Removal Using Dark Channel Prior"

joyeecheung/digit-detection-recognition 32

Detects and recognizes digits in the image with AdaBoost and SVM.

joyeecheung/cascade-classifier-trainer 13

Scripts to train the OpenCV cascade classifer with Haar features for AdaBoost.

joyeecheung/diary-calendar 10

Material design calendar as a React component

joyeecheung/aboutme 3

A simple aboutme page, written for the Web 2.0 Programming course.

joyeecheung/AI-Notes 2

Notes for Sun Yat-Sen University SE-311 Artificial Intelligence

joyeecheung/eslint-config-node-core 2

Sharable ESLint configurations following the style guide of Node.js core

joyeecheung/ARES-6-d8 1

A modified version of ARES-6 that can be run with d8

joyeecheung/batchcube 1

Python Implementation of Batch Data Cube on MapReduce

issue commentnodejs/node

Error reporting being sent to stdout rather than stderr

It seems reasonable to just print these to stderr unconditionally. Fix in https://chromium-review.googlesource.com/c/v8/v8/+/2069397

CalebCarroll

comment created time in 7 hours

pull request commentnodejs/node

doc: Add more useful information to Glossary.md

@gireeshpunathil I agree that providing customized knowledge about these terms in the context of Node.js would be useful (for example, by REPL we mean "the thing you see when you run node in the terminal") , however by putting things into context it would go against the goal of keeping the dictionary brief. For example, IMO if you do not know what ABI or RAII is, expanding them to Application Binary Interface or Resource Aquisition Is Intialization is still not sufficient for you to understand the comments mentioning them and keep reading/editing the code. To put those terms into the context of Node.js we need to explain by giving examples. Also, that's not what this PR is doing right now - it is giving general explanations about these terms.

HarshithaKP

comment created time in 7 hours

pull request commentnodejs/node

src,lib: don't run bootstrapper in CreateEnvironment

By the way, I think a quick band-aid fix to this issue without introducing breaking changes would be to maintain something like isInitialized in pre_execution.js for prepareMainThreadExecution() and return early there if it's set to true. It's not ideal but would lead to less impact.

codebytere

comment created time in 8 hours

Pull request review commentnodejs/node

src,lib: don't run bootstrapper in CreateEnvironment

 class EnvironmentTest : public EnvironmentTestFixture {   } }; -TEST_F(EnvironmentTest, PreExeuctionPreparation) {-  const v8::HandleScope handle_scope(isolate_);-  const Argv argv;-  Env env {handle_scope, argv};--  v8::Local<v8::Context> context = isolate_->GetCurrentContext();--  const char* run_script = "process.argv0";

The execution of environment.js was added to keep this test passing, which expected things like process.argv0 to be set during CreateEnvironment. So I guess the key is: should the pre-execution steps (which sets up e.g. process.argv0 here) be run in CreateEnvironment(), or LoadEnvironment()?

My original thought before finding the test broken had been that it should be run in LoadEnvironment(), as is done in all the non-embedding entry points (through explicitly running functions exported through require('internal/bootstrap/pre_execution')), but it would be a breaking change (which is exactly what this PR is doing and why it needs to remove this test).

I am good with finally breaking this somewhat odd contract but I wonder if anyone relies on it? Also it probably would be nicer if we keep environment.js and add a method that runs it, then we could just run that method here to set up process.argv0 and do not need to remove this test. Having control over when the pre-execution are run from C++ without writing require('internal/bootstrap/pre_execution') in JS themselves sounds useful to an embedder.

codebytere

comment created time in 9 hours

pull request commentnodejs/node

doc: Add more useful information to Glossary.md

for folks who don't know the meaning of those will also don't know where to search for it?

I'd suggest we give links to "where to search for it" instead of trying to explaining them ourselves. For example, the explanation to ABI here:

ABI: Application Binary Interface - contracts for internal API invocations.

seems misleading to me - API is a concept at the level of source code, which is relevant in writing programs, not in loading binaries. On the other hand Wikipedia does a better job explaining it:

An ABI defines how data structures or computational routines are accessed in machine code, which is a low-level, hardware-dependent format; in contrast, an API defines this access in source code, which is a relatively high-level, hardware-independent, often human-readable format. A common aspect of an ABI is the calling convention, which determines how data is provided as input to or read as output from computational routines; examples are the x86 calling conventions.

my general request is to look at the list from a new comer's angle, not from an experienced node.js programmer's

While I agree that the list exists to serve new comers, I don't think we need to extend the list to include terms that are not particularly different in the context of Node.js and that most people learn from elsewhere. For instance code cache and snapshot carry special meanings in this repository, so it makes sense to include them here, while ABI or RAII doesn't - those are concepts regularly taught in courses/books/tutorials/videos/whatever about systems and/or C/C++, and it's better that people learn them from those sources instead of here. Otherwise we end up recreating an index of terms of a textbook about system or C/C++ here, which is a good effort but IMO not an effort that belongs in this repo.

HarshithaKP

comment created time in a day

Pull request review commentnodejs/node

doc: Add more useful information to Glossary.md

 You may also need to check https://chromium.googlesource.com/chromiumos/docs/+/master/glossary.md. -* LGTM: "Looks good to me", commonly used to approve a code review.-* PTAL: Please take a look.-* RSLGTM: "Rubber-stamp looks good to me". The reviewer approving without doing+* ABI: Application Binary Interface - contracts for internal

Do we really need entries that can be easily looked up in Wikipedia or OS textbooks and widely used in the software world in general? The same goes to things like CLI, EOF, ELO, RAII, etc.

HarshithaKP

comment created time in 2 days

issue closednodejs/node

"heap out of memory" because strings are kept in memory when 13 chars substrings are referenced

Version: v13.9.0, v12.16.1, v10.19.0 and v8.10.0 tested Platform: v8.10.0 Ubuntu, others 64-bit Windows

What steps will reproduce the bug?

const fullStringSize = 10 * 1024 * 1024;
const result = [];
// when referencing a 12 chars substring, the complete string gets garbage collected
for (let i = 0; i < 100; ++i) {
  console.log('12 chars substring, ', i, (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(), 'MB');
  const text = require('crypto').randomBytes(fullStringSize) + '';
  result.push(text.substr(0, 12)); 
}
console.log('====================================');
// when referencing a 13 chars substring, the complete string does not get garbage collected
for (let i = 0; i < 1000; ++i) {
  console.log('13 chars substring, ', i, (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(), 'MB');
  const text = require('crypto').randomBytes(fullStringSize) + '';
  result.push(text.substr(0, 13)); 
}

In the first loop with 12 chars substrings, the memory usage is okay. The garbage collection cleans up the big strings. In the second loop with 13 chars substrings, the memory usage goes up until: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory The garbage collection keeps all the big strings in memory.

Additional information

I've programmed an app, that loads many big text files, but only keeps tiny substrings of these files referenced. After loading a lot files it crashes with heap out of memory and I wondered why. When I looked at the memory usage, I saw that the complete content of all loaded files are kept in memory if the referenced substrings have 13 chars or larger. So I reduced the problem to the example above.

Finding the implementation problem

After that I found that substrings less 13 chars are copies, otherwise referenced as a SlicedString (SlicedString::kMinLengt = 13): https://github.com/nodejs/node/blob/cdac18519fd14df9ece958cf8e29b846f512656e/deps/v8/src/builtins/builtins-string-gen.cc#L2250-L2253 And then I saw that there is a big missing feature: https://github.com/nodejs/node/blob/cdac18519fd14df9ece958cf8e29b846f512656e/deps/v8/src/objects/string.h#L646-L650 Really? How should a node.js developer know that the GC has no implementation to cleanup a big stings if he only keeps references to a 13 chars or more substring.

closed time in 2 days

andiby

issue commentnodejs/node

"heap out of memory" because strings are kept in memory when 13 chars substrings are referenced

Please on an issue on the V8 issue tracker instead since the fix to this needs to happen in V8: https://bugs.chromium.org/p/v8/issues/list

andiby

comment created time in 2 days

Pull request review commentnodejs/node

src: implement per-process native Debug() printer and use it in mkcodecache

 class Environment : public MemoryRetainer {   bool http_parser_buffer_in_use_ = false;   std::unique_ptr<http2::Http2State> http2_state_; -  bool debug_enabled_[static_cast<int>(DebugCategory::CATEGORY_COUNT)] = {-      false};-+  std::unique_ptr<EnabledDebugList> enabled_debug_list_;

Mostly to avoid the circular dependency - but I guess this can also be achieved by moving more things from debug_utils.h to debug_utils-inl.h so that env.h can just include debug_utils.h and debug_utils.h do not need to include env.h ?

joyeecheung

comment created time in 2 days

PR opened nodejs/node

Reviewers
src: implement per-process native Debug() printer and use it in mkcodecache C++ lib / src tools

src: make aliased_buffer.h self-contained

aliased_buffer.h uses MultiplyWithOverflowCheck() implemented in util-inl.h

src: refactor debug category parsing

Move the debug category parsing into a new EnabledDebugList class, so that it can be reused outside of Environment.

src: implement per-process native Debug() printer

This patch adds a per-process native Debug() printer that can be called when an Environment is not available.

tools: use per-process native Debug() printer in mkcodecache

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [ ] 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

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+128 -86

0 comment

8 changed files

pr created time in 3 days

create barnchjoyeecheung/node

branch : debug-native

created branch time in 3 days

Pull request review commentnodejs/node

doc: Add more useful information to Glossary.md

 You may also need to check https://chromium.googlesource.com/chromiumos/docs/+/master/glossary.md. -* LGTM: "Looks good to me", commonly used to approve a code review.-* PTAL: Please take a look.-* RSLGTM: "Rubber-stamp looks good to me". The reviewer approving without doing+* ABI: Application Binary Interface - contracts for internal+  API invocations.+* ASAP: As Soon As Possible.+* ASM: Assembler - General term for language translator, especially+  from high level to low level.+* ASYNC: Asynchronous+* BE: Big Endian - Byte order style in a multibyte data.+  (Opposite of LE, Little Endian)+* CI: Continues Intigration.+* CITGM: Canary In The Gold Mine - a smoke test unit in the repo that+  contain popular npm modules.+* CJS: Common JS.+* CLDR: Common Locale Data Repository.+* CLI: Command Line Interface.+* CMD: Command.+* CVE: Common Vulnerebilities and Exposures - A database that+  maintains reported security exposures.+* ECMA: European Computer Manufacturers Association - A body that+  governs JS spec among other things.+* ENV: Environment - General term for execution environment.+* EOF: End Of File.+* EOL: End Of Line (when used within a program), End of Life+  (when used within project documents).+* ESM: ECMA Script Module.+* ETW: Event Tracing for Windows.+* FD: File Descriptor.+* FFDC: First Failure Data Capture - Common terms for logs, traces+  and dumps that are produced by default on program error.+* FIPS:  Federal Information Processing Standards.+* FS: File System.+* ICU: International Components for Unicode.+* IPC: Inter Process Communication.+* JIT: Just In Time - General term for dynamic compiler in+  managed runtimes.+* JS/C++ boundary: A layer that bridges between JS APIs and the C+++  helpers that implements / abstracts platform capabilities.+* LGTM: Looks good to me - commonly used to approve a code review.+* LTS: Long Term Support.+* MDN: Mozila Development Network - A vast and authentic+  documentation on JavaScript.+* OOB: Out Of Bounds - Used in the context of TCP data transport.+* OOM: Out Of Memory.+* OSX: Mac OS.+* PPC: Power PC.+* PTAL: Please Take A Look.+* RAII: Resource Aquisition Is Intialization - A C++ feature for+  auto-cleanup of dynamically allocated objects.+* REPL: Read Evaluate Print Loop.+* RFC: Request For Comments.+* RSLGTM: Rubber-Stamp Looks Good To Me. The reviewer approving without doing   a full code review.+* RSS: Resident Set Size.+* SMP: Symmetric Multi Processor. * TSC: Technical Steering Committee. Detailed info see   [TSC](./GOVERNANCE.md#technical-steering-committee).-* WIP: "Work In Progress" - e.g. a patch that's not finished, but may be worth-  an early look.+* V8: JavaScript engine that is embedded in Node.js.+* VM: Virtual Machine, in the context of abstracting instructions,+  not to be confused with H/W level or O/S level Virtual machines.+* WASI: Web Assemby System Interface.+* WASM: Web Assembly.+* WG: Working Group - autonomous teams in the project with specific+  focus areas.+* WHATWG: Web Hypertext Application Technology Working Group+* WIP: "Work In Progress" - e.g. a patch that's not finished, but+may be worth an early look. * WPT: [web-platform-tests](https://github.com/web-platform-tests/wpt)-* godbolt: [Compiler Explorer](https://godbolt.org/) run compilers interactively-  from your web browser and interact with the assembly. Was created by and is-  primarily administrated by Matt Godbolt.-* primordials: Pristine built-ins that are not effected by prototype pollution-  and tampering with built-ins.+* bootstrap: Early phase in the Node.js process startup - that sets up+  the Node.js execution environment and loads the internal modules.+* code cache: A chunk of memory where the compiled JS code is stored.+* deps: upstream projects that this project depends.+* godbolt: [Compiler Explorer](https://godbolt.org/) run compilers+  interactively from your web browser and interact with the assembly.+  Was created by and is primarily administrated by Matt Godbolt.+* native modules/addons: A module / shared library that is+  implemented in C/C++, but exposes one or more interfaces,+  callable from JS.+* primordials: Pristine built-ins that are not effected by prototype+  pollution and tampering with built-ins.+* snapshot: Native object code compiled from the JS APIs of Node.js
* snapshot: when referring to the V8 startup snapshot, a chunk of bytes
  containing serialized V8 heap, which can be deserialized to restore
  the state of the V8 engine.

There is also the heap snapshot BTW.

HarshithaKP

comment created time in 3 days

Pull request review commentnodejs/node

doc: Add more useful information to Glossary.md

 You may also need to check https://chromium.googlesource.com/chromiumos/docs/+/master/glossary.md. -* LGTM: "Looks good to me", commonly used to approve a code review.-* PTAL: Please take a look.-* RSLGTM: "Rubber-stamp looks good to me". The reviewer approving without doing+* ABI: Application Binary Interface - contracts for internal+  API invocations.+* ASAP: As Soon As Possible.+* ASM: Assembler - General term for language translator, especially+  from high level to low level.+* ASYNC: Asynchronous+* BE: Big Endian - Byte order style in a multibyte data.+  (Opposite of LE, Little Endian)+* CI: Continues Intigration.+* CITGM: Canary In The Gold Mine - a smoke test unit in the repo that+  contain popular npm modules.+* CJS: Common JS.+* CLDR: Common Locale Data Repository.+* CLI: Command Line Interface.+* CMD: Command.+* CVE: Common Vulnerebilities and Exposures - A database that+  maintains reported security exposures.+* ECMA: European Computer Manufacturers Association - A body that+  governs JS spec among other things.+* ENV: Environment - General term for execution environment.+* EOF: End Of File.+* EOL: End Of Line (when used within a program), End of Life+  (when used within project documents).+* ESM: ECMA Script Module.+* ETW: Event Tracing for Windows.+* FD: File Descriptor.+* FFDC: First Failure Data Capture - Common terms for logs, traces+  and dumps that are produced by default on program error.+* FIPS:  Federal Information Processing Standards.+* FS: File System.+* ICU: International Components for Unicode.+* IPC: Inter Process Communication.+* JIT: Just In Time - General term for dynamic compiler in+  managed runtimes.+* JS/C++ boundary: A layer that bridges between JS APIs and the C+++  helpers that implements / abstracts platform capabilities.+* LGTM: Looks good to me - commonly used to approve a code review.+* LTS: Long Term Support.+* MDN: Mozila Development Network - A vast and authentic+  documentation on JavaScript.+* OOB: Out Of Bounds - Used in the context of TCP data transport.+* OOM: Out Of Memory.+* OSX: Mac OS.+* PPC: Power PC.+* PTAL: Please Take A Look.+* RAII: Resource Aquisition Is Intialization - A C++ feature for+  auto-cleanup of dynamically allocated objects.+* REPL: Read Evaluate Print Loop.+* RFC: Request For Comments.+* RSLGTM: Rubber-Stamp Looks Good To Me. The reviewer approving without doing   a full code review.+* RSS: Resident Set Size.+* SMP: Symmetric Multi Processor. * TSC: Technical Steering Committee. Detailed info see   [TSC](./GOVERNANCE.md#technical-steering-committee).-* WIP: "Work In Progress" - e.g. a patch that's not finished, but may be worth-  an early look.+* V8: JavaScript engine that is embedded in Node.js.+* VM: Virtual Machine, in the context of abstracting instructions,+  not to be confused with H/W level or O/S level Virtual machines.+* WASI: Web Assemby System Interface.+* WASM: Web Assembly.+* WG: Working Group - autonomous teams in the project with specific+  focus areas.+* WHATWG: Web Hypertext Application Technology Working Group+* WIP: "Work In Progress" - e.g. a patch that's not finished, but+may be worth an early look. * WPT: [web-platform-tests](https://github.com/web-platform-tests/wpt)-* godbolt: [Compiler Explorer](https://godbolt.org/) run compilers interactively-  from your web browser and interact with the assembly. Was created by and is-  primarily administrated by Matt Godbolt.-* primordials: Pristine built-ins that are not effected by prototype pollution-  and tampering with built-ins.+* bootstrap: Early phase in the Node.js process startup - that sets up+  the Node.js execution environment and loads the internal modules.+* code cache: A chunk of memory where the compiled JS code is stored.
* code cache: A chunk of bytes storing compiled JS code and its metadata

It does not necessarily reside in memory (can be written to disk)

HarshithaKP

comment created time in 3 days

issue commentnodejs/node

repl: printing big strings results in OOM

@addaleax Yeah, I think once the length of the string exceeds a certain value it's not really useful to display the whole string any more. The issue is before deciding whether to truncate the string, we first need to know at least the length of it, which requires flattening (and thus copying) of cons strings. Maybe one way to go about it is to implement and V8 that stops the flattening once a specified maximum length is reached, though it still only gives us a little bit of room for strings that are big but not that big for the machine running to code, and we still have to crash for strings longer than that.

joyeecheung

comment created time in 3 days

Pull request review commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

 void PerIsolatePlatformData::PostIdleTask(std::unique_ptr<v8::IdleTask> task) { }  void PerIsolatePlatformData::PostTask(std::unique_ptr<Task> task) {-  CHECK_NOT_NULL(flush_tasks_);+  if (flush_tasks_ == nullptr) {+    // V8 may post tasks during Isolate disposal. In that case, the only

If it's a-OK for tasks like this to go ignored, I guess my questions are answered (no, they won't be helpful). It would be nice to have NODE_DEBUG_NATIVE that does not require an Environment but yeah, probably not worth the hassle for this particular PR.

addaleax

comment created time in 3 days

issue closednodejs/node

URL should support auth, base, pathabsolute

<!-- Thank you for suggesting an idea to make Node.js better.

Please fill in as much of the template below as you're able. -->

Is your feature request related to a problem? Please describe. We want to use URL to manage the configuration for our connection to an http based database. In our configuration we want to be able to separately specify host, port, user, password. Some of the code is old, and it takes the URL and appends ':' and the configured port. This works fine as long as we keep the URL without a terminating '/' but the URL object does not support this. When a URL is constructed without a '/' and then exported again using url.href the '/' is always appended. You cannot correct the issue by using url.pathname = ''

URL works great and I do not want to change the above functionality, just understand the context to provide insight into my desired solution. I want to be able to take the URL object and scoop out of it the protocol, user, password, host, port. There is currently not a getter (for example base) that would enable me to scoop this out. Instead I must do the following

let stringUrl = url.protocol + '//' + url.username + ':' url.password + '@' + url.hostname + ":" + url.port; This would work, assuming that there is a username, or password, or port. If there isn't then I have to put if checks around the : and @ etc. But that really is the job of URL.

Describe the solution you'd like Please describe the desired behavior. Instead of coding the above, I just want to scoop out everything but the path and beyond. Something like

    const myURL = new URL("https://abc:xyz@example.org/p/a/t/h?query=string#hash");
    console.log(url.base)
    // Prints https://abc:xyz@example.org

also expose auth and pathabsolute (https://url.spec.whatwg.org/#relative-url-with-fragment-string)

    const myURL = new URL("https://abc:xyz@example.org/p/a/t/h?query=string#hash");
    console.log(myURL.auth);
    // Prints abc:xyz
    const myURL = new URL("https://abc:xyz@example.org/p/a/t/h?query=string#hash");
    console.log(myURL.pathabsolute);
    // Prints /p/a/t/h?query=string#hash

Describe alternatives you've considered Coding it myself is always an option, but I would rather leave URL to do the work.

Note documentation also mentions an auth which makes one think there is a getter for it, but there is not. See documentation containing auth:

┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                              href                                              │
├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤
│ protocol │  │        auth         │          host          │           path            │ hash  │
│          │  │                     ├─────────────────┬──────┼──────────┬────────────────┤       │
│          │  │                     │    hostname     │ port │ pathname │     search     │       │
│          │  │                     │                 │      │          ├─┬──────────────┤       │
│          │  │                     │                 │      │          │ │    query     │       │
"  https:   //    user   :   pass   @ sub.example.com : 8080   /p/a/t/h  ?  query=string   #hash "
│          │  │          │          │    hostname     │ port │          │                │       │
│          │  │          │          ├─────────────────┴──────┤          │                │       │
│ protocol │  │ username │ password │          host          │          │                │       │
├──────────┴──┼──────────┴──────────┼────────────────────────┤          │                │       │
│   origin    │                     │         origin         │ pathname │     search     │ hash  │
├─────────────┴─────────────────────┴────────────────────────┴──────────┴────────────────┴───────┤
│                                              href                                              │
└────────────────────────────────────────────────────────────────────────────────────────────────┘

I suggest updating the documentation to:

┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                              href                                              │
├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤
│ protocol │  │        auth         │          host          │           path            │ hash  │
│          │  │                     ├─────────────────┬──────┼──────────┬────────────────┤       │
│          │  │                     │    hostname     │ port │ pathname │     search     │       │
│          │  │                     │                 │      │          ├─┬──────────────┤       │
│          │  │                     │                 │      │          │ │    query     │       │
"  https:   //    user   :   pass   @ sub.example.com : 8080   /p/a/t/h  ?  query=string   #hash "
│          │  │          │          │    hostname     │ port │          │                │       │
│          │  │          │          ├─────────────────┴──────┤          │                │       │
│ protocol │  │ username │ password │          host          │          │                │       │
├──────────┴──┼──────────┴──────────┼────────────────────────┤          │                │       │
│   origin    │                     │         origin         │ pathname │     search     │ hash  │
├─────────────┴─────────────────────┴────────────────────────┼──────────┴────────────────┴───────┤
│                       base                                 │     pathabsolute                  │
├────────────────────────────────────────────────────────────┴───────────────────────────────────┤
│                                              href                                              │
└────────────────────────────────────────────────────────────────────────────────────────────────┘

closed time in 3 days

dodtsair

issue commentnodejs/node

URL should support auth, base, pathabsolute

Node.js is only an implementer of the WHATWG URL standard here, so changes like this need to be accepted in the upstream before it can be implemented in Node.js. Please open your feature request in https://github.com/whatwg/url/issues, thanks

dodtsair

comment created time in 3 days

Pull request review commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

 void PerIsolatePlatformData::PostIdleTask(std::unique_ptr<v8::IdleTask> task) { }  void PerIsolatePlatformData::PostTask(std::unique_ptr<Task> task) {-  CHECK_NOT_NULL(flush_tasks_);+  if (flush_tasks_ == nullptr) {+    // V8 may post tasks during Isolate disposal. In that case, the only

"Task discarded since it's posted during Isolate disposal"? Just in case this race triggers something surprising in the future and perhaps we could tell the user to try turning on the debug variable if it's too difficult to provide a reproducible test case for us.

addaleax

comment created time in 3 days

push eventnodejs/node-core-utils

James George

commit sha 4ea4dfad069d7cb6eccdea28f514a2b67e153508

feat: handle unknown commands (#387)

view details

push time in 3 days

issue closednodejs/node-core-utils

git-node doesn't handle unknown commands

git-node unknown is expected to show a suitable warning message kinda like Unknown argument: unknown.

closed time in 3 days

jamesgeorge007

Pull request review commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

 void PerIsolatePlatformData::PostIdleTask(std::unique_ptr<v8::IdleTask> task) { }  void PerIsolatePlatformData::PostTask(std::unique_ptr<Task> task) {-  CHECK_NOT_NULL(flush_tasks_);+  if (flush_tasks_ == nullptr) {+    // V8 may post tasks during Isolate disposal. In that case, the only

I wonder if a Debug print here would be helpful in the future..

addaleax

comment created time in 3 days

issue commentnodejs/node

Evaluate node core modules within a `vm.Context`

@SimenB By cross-context operations I mean for example, passing a sandbox into the createContext() call and access what's in sandbox from the inside, or returning something from an invocation of a compiled function evaluated on the context and use that returned result from the outside. That could introduce subtle issues when these objects are passed into builtins (on either side) as things like brand checks and instanceof checks may fail and most builtins aren't really prepared to handle objects created from a different context gracefully. But from the description in the OP and https://github.com/nodejs/node/issues/31852#issuecomment-588076155 it seems the use case of Jest does not require something like this, I think an option for this kind of use case would be fairly doable (compared to the kind that needs cross-context interop), though it would still need some internal cleanups as some internal hooks in Node.js currently assume they are evaluated in the main context (most ENVIRONMENT_STRONG_PERSISTENT_VALUES, I think) and depend on references to the set of things in the main context.

SimenB

comment created time in 3 days

issue commentnodejs/node

Evaluate node core modules within a `vm.Context`

If cross-context support is not necessary, this can be done explicit option to include these globals during context creation, which tells Node.js to run the corresponding setups and create a different set of builtins for the context. I believe it would be more difficult, or at least require more serialization/deserialization overhead, if we want the builtins from different contexts to interoperate with each other, however.

AFAIK the JS source of the node core modules are embedded in the binary of Node, so we cannot read them and pass them though compileFunction, SourceTextModule or some such ourselves so the globals would be the same.

The source code is actually available through one of the process.bindings but they cannot be evaluated properly in the user land anyway because they need a set of internals to be passed into the compiled function to finish the setup.

SimenB

comment created time in 4 days

Pull request review commentnodejs/node

util: inspecting private fields

+'use strict';++const {+  JSONParse,+  JSONStringify,+  Symbol,+} = primordials;+const EventEmitter = require('events');+const assert = require('internal/assert');+const {+  ERR_INSPECTOR_ALREADY_CONNECTED,+  ERR_INSPECTOR_COMMAND,+  ERR_INSPECTOR_NOT_CONNECTED,+  ERR_INVALID_ARG_TYPE,+} = require('internal/errors').codes;+const debug = require('internal/util/debuglog').debuglog('inspector');+const { validateString } = require('internal/validators');++const {+  Connection,+} = internalBinding('inspector');++const connectionSymbol = Symbol('connectionProperty');+const messageCallbacksSymbol = Symbol('messageCallbacks');+const nextIdSymbol = Symbol('nextId');+const onMessageSymbol = Symbol('onMessage');+const resultSymbol = Symbol('result');++// The synchronicity of this class depends on:+// - ChannelImpl::sendProtocolResponse is synchronous+// - InspectorSessionDelegate::sendMessageToFrontend is synchronous+// - JSBindingsConnection::OnMessage is synchronous+// when the Connection is instantiated with is_sync = true.+class SyncSession extends EventEmitter {+  constructor() {+    super();+    this[connectionSymbol] = null;+    this[nextIdSymbol] = 1;+    this[resultSymbol] = undefined;+  }++  connect() {+    if (this[connectionSymbol])+      throw new ERR_INSPECTOR_ALREADY_CONNECTED('The inspector session');+    const connection =+      new Connection(this[onMessageSymbol].bind(this), true);+    if (connection.sessionAttached) {+      throw new ERR_INSPECTOR_ALREADY_CONNECTED('Another inspector session');+    }+    this[connectionSymbol] = connection;+  }++  [onMessageSymbol](message) {+    const parsed = JSONParse(message);+    if (parsed.error) {+      throw (new ERR_INSPECTOR_COMMAND(parsed.error.code,+                                       parsed.error.message));+    }+    debug(`received message #${parsed.id}:`, parsed);+    if (parsed.id) {+      this[resultSymbol] = parsed.result;+    } else {+      this.emit(parsed.method, parsed);+      this.emit('inspectorNotification', parsed);+    }+  }++  post(method, params) {+    validateString(method, 'method');+    if (params && typeof params !== 'object') {+      throw new ERR_INVALID_ARG_TYPE('params', 'Object', params);+    }+    if (!this[connectionSymbol]) {+      throw new ERR_INSPECTOR_NOT_CONNECTED();+    }+    const id = this[nextIdSymbol]++;+    const message = { id, method };+    if (params) {+      message.params = params;+    }+    this[resultSymbol] = undefined;+    // [onMessageSymbol] is supposed to be called synchronously here+    // to store the result in this[resultSymbol].+    debug(`dispatching message #${id}:`, message);+    this[connectionSymbol].dispatch(JSONStringify(message));+    const result = this[resultSymbol];

Note that implicit synchronicity is still there - it's not guaranteed by V8 that the result would show up as this[resultSymbol] right after the call to this[connectionSymbol].dispatch(JSONStringify(message)), before post() returns. It only happens to work right now.

legendecas

comment created time in 4 days

PR closed nodejs/node

vm: lazily initialize primordials for vm contexts C++ author ready vm

Lazily initialize primordials when cross-context support for builtins is needed to fix the performance regression in context creation.

Fixes: https://github.com/nodejs/node/issues/29842

local benchmark results

                            confidence improvement accuracy (*)    (**)   (***)
 vm/create-context.js n=100        ***    485.26 %      ±15.48% ±21.32% ±29.29%

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+49 -43

5 comments

3 changed files

joyeecheung

pr closed time in 4 days

pull request commentnodejs/node

vm: lazily initialize primordials for vm contexts

Landed in e6c2277. Thanks!

joyeecheung

comment created time in 4 days

push eventnodejs/node

Joyee Cheung

commit sha e6c2277241e542cdf86475d71c5fdc581bd72025

vm: lazily initialize primordials for vm contexts Lazily initialize primordials when cross-context support for builtins is needed to fix the performance regression in context creation. PR-URL: https://github.com/nodejs/node/pull/31738 Fixes: https://github.com/nodejs/node/issues/29842 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

push time in 4 days

issue closednodejs/node

Significant slowdown of createContext and runInContext

In the latest v12.11.0 these methods work very slowly relative to v10.16.3. Here is a simple example where contexts are created and then a script is run: https://gist.github.com/yrsh/28d274727c1e67f88d0cdf2e2091b6c2

For example at my local machine, execution time with v12 is 21 ms, but with v10 it is 7.

closed time in 4 days

yrsh

issue commentnodejs/node

Node fatal error: ToggleAsyncHook Cannot toggle Inspector's AsyncHook

On a second thought the ordering seems odd, NodeInspectorClient::disconnectFrontend() is invoked before Agent::WaitForDisconnect() is invoked through the exit hook, is that just a race or a bug? cc @nodejs/inspector

edopalmieri

comment created time in 4 days

issue commentnodejs/node

Node fatal error: ToggleAsyncHook Cannot toggle Inspector's AsyncHook

@connor4312 Thanks for the notice.

One thing to note with the stack trace in the OP is that this happens when the worker is shutting down, and that's when JS is not supposed to be executed - however our inspector agent is not aware of this and tries to toggle the inspector async hooks to stop tracking async call stacks, which requires JS execution. In https://github.com/microsoft/vscode-js-debug/issues/222#issuecomment-586598585 it happens when the main thread is shutting down.

We should probably just return there when JS execution is not allowed, I'll work on a fix, but it would be helpful if there is a reproducible test case.

edopalmieri

comment created time in 4 days

pull request commentnodejs/node

tools: add NODE_TEST_NO_INTERNET to the doc builder

@mmarchini I don't think it's harmful for a release build to bypass that check when the environment variable is set anyway? Our release machines certainly don't have it set and at worse the links in the docs could get away with being a 404 which is not really the end of the world. Better still, it allows people to build releases when they are behind a firewall and explicitly opt out of these checks (which are probably not useful to them anyway).

joyeecheung

comment created time in 4 days

pull request commentnodejs/node

tools: add NODE_TEST_NO_INTERNET to the doc builder

@mmarchini I don't think it's harmful for a release build to bypass that check when the environment variable is set anyway? Our release machines certainly don't have it set and at worse the links in the docs could get away with being a 404 which is not really the end of the world. Better still, it allows people to build releases when they are behind a firewall.

joyeecheung

comment created time in 4 days

pull request commentnodejs/node

tools: add NODE_TEST_NO_INTERNET to the doc builder

cc @nodejs/documentation

joyeecheung

comment created time in 4 days

PR opened nodejs/node

tools: add NODE_TEST_NO_INTERNET to the doc builder

At the moment the doc builder tries to access the internet for CHANGELOG information and only falls back to local sources after the connection fails or a 5 second timeout. This means that the doc building could take at least 7 minutes on a machine with hijacked connection to Github for useless network attempts. This patch adds a NODE_TEST_NO_INTERNET environment variable to directly bypass these attempts so that docs can be built in reasonable time on a machine like that.

Fixes: https://github.com/nodejs/node/issues/29918 <!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [ ] 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

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+16 -10

0 comment

1 changed file

pr created time in 4 days

pull request commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

@bnoordhuis @addaleax @jasnell @lundibundi Thanks for the reviews. I've updated the PR, PTAL.

joyeecheung

comment created time in 4 days

create barnchjoyeecheung/node

branch : no-internet

created branch time in 4 days

push eventjoyeecheung/node

Joyee Cheung

commit sha cf0ed0b7d57bfbfa133d114ff68fc3b50f17a21a

fixup! doc: move gireeshpunathil to TSC emeritus

view details

push time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

+'use strict';+const common = require('../common');+const assert = require('assert');+const vm = require('vm');+const {+  SUMMARY,+  DETAILED+} = vm.constants.measureMemory.mode;++common.expectWarning('ExperimentalWarning',+                     'vm.measureMemory is an experimental feature. ' ++                     'This feature could change at any time');++// Test measuring memory of the current context+{+  vm.measureMemory(undefined)+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({})+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: SUMMARY })+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: DETAILED })+    .then((result) => {+      assert(result instanceof Object);+    });++  assert.throws(() => vm.measureMemory(null), {+    code: 'ERR_INVALID_ARG_TYPE'+  });+  assert.throws(() => vm.measureMemory('summary'), {+    code: 'ERR_INVALID_ARG_TYPE'+  });+  assert.throws(() => vm.measureMemory({ mode: -1 }), {+    code: 'ERR_OUT_OF_RANGE'+  });+}++// Test measuring memory of the sandbox+{+  const sandbox = vm.createContext();

It looks like the context could only fail due to e.g. allocation failure or maximum stack size reached, which seems difficult to test without flakes and is not what we usually test for, so I'll leave it here (but with an explanation in the doc of the error)

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

+'use strict';+const common = require('../common');+const assert = require('assert');+const vm = require('vm');+const {+  SUMMARY,+  DETAILED+} = vm.constants.measureMemory.mode;++common.expectWarning('ExperimentalWarning',+                     'vm.measureMemory is an experimental feature. ' ++                     'This feature could change at any time');++// Test measuring memory of the current context+{+  vm.measureMemory(undefined)+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({})+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: SUMMARY })+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: DETAILED })+    .then((result) => {+      assert(result instanceof Object);+    });

Added some tests with comments saying those might need to be updated when V8 is updated

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 static void WatchdogHasPendingSigint(const FunctionCallbackInfo<Value>& args) {   args.GetReturnValue().Set(ret); } +static void MeasureMemory(const FunctionCallbackInfo<Value>& args) {+  CHECK(args[0]->IsInt32());+  int32_t mode = args[0].As<v8::Int32>()->Value();+  Isolate* isolate = args.GetIsolate();+  Environment* env = Environment::GetCurrent(args);+  Local<Context> context;+  if (args[1]->IsUndefined()) {+    context = isolate->GetCurrentContext();+  } else {+    ContextifyContext* sandbox =+        ContextifyContext::ContextFromContextifiedSandbox(env,+                                                          args[1].As<Object>());+    CHECK_NOT_NULL(sandbox);+    context = sandbox->context();+    if (context.IsEmpty()) {  // Not yet fully initilaized+      return;

Updated to return a rejection here.

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 static void WatchdogHasPendingSigint(const FunctionCallbackInfo<Value>& args) {   args.GetReturnValue().Set(ret); } +static void MeasureMemory(const FunctionCallbackInfo<Value>& args) {+  CHECK(args[0]->IsInt32());+  int32_t mode = args[0].As<v8::Int32>()->Value();+  Isolate* isolate = args.GetIsolate();+  Environment* env = Environment::GetCurrent(args);+  Local<Context> context;+  if (args[1]->IsUndefined()) {+    context = isolate->GetCurrentContext();+  } else {+    ContextifyContext* sandbox =

done

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 function compileFunction(code, params, options = {}) {   return result.function; } +function measureMemory(options = {}, context) {+  emitExperimentalWarning('vm.measureMemory');+  validateObject(options, 'options');+  let mode = options.mode;+  if (mode === undefined) {+    mode = constants.measureMemory.mode.SUMMARY;+  }+  validateInt32(mode, 'options.mode',+                constants.measureMemory.mode.SUMMARY,+                constants.measureMemory.mode.DETAILED);

obsolete as we've switched to strings now.

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 function compileFunction(code, params, options = {}) {   return result.function; } +function measureMemory(options = {}, context) {+  emitExperimentalWarning('vm.measureMemory');+  validateObject(options, 'options');+  let mode = options.mode;+  if (mode === undefined) {+    mode = constants.measureMemory.mode.SUMMARY;+  }

updated

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 const {   validateBuffer,   validateObject, } = require('internal/validators');-const { kVmBreakFirstLineSymbol } = require('internal/util');+const {+  kVmBreakFirstLineSymbol,+  emitExperimentalWarning

fixed

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 console.log(globalVar); // 1000 ``` +## `vm.measureMemory([options, [contextifiedObject]])`++<!-- YAML+added: REPLACEME+-->++> Stability: 1 - Experimental++Measure the memory used by the current execution context or a specified context.++* `options` {Object} Optional.+  * `mode` {vm.constants.measureMemory.mode}+    **Default:** `vm.constants.measureMemory.mode.SUMMARY`+* `contextifiedObject` {Object} Optional. A [contextified][] object returned+  by `vm.createContext()`. If not specified, measure the memory usage of the+  current context where `vm.measureMemory()` is invoked.+* Returns: {Promise} If the memory is successfully measured the promise will+  resolve with an object containing information about the memory usage.++The format of the object that the returned Promise may resolve with is+specific to the V8 engine and may change from one version of V8 to the next.++The returned result is different from the statistics returned by+`v8.GetHeapSpaceStatistics()` in that `vm.measureMemory()` measures+the memory reachable from a specific context, while+`v8.GetHeapSpaceStatistics()` measures the memory used by an instance

fixed

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 console.log(globalVar); // 1000 ``` +## `vm.measureMemory([options, [contextifiedObject]])`++<!-- YAML+added: REPLACEME+-->++> Stability: 1 - Experimental++Measure the memory used by the current execution context or a specified context.++* `options` {Object} Optional.+  * `mode` {vm.constants.measureMemory.mode}+    **Default:** `vm.constants.measureMemory.mode.SUMMARY`+* `contextifiedObject` {Object} Optional. A [contextified][] object returned+  by `vm.createContext()`. If not specified, measure the memory usage of the+  current context where `vm.measureMemory()` is invoked.+* Returns: {Promise} If the memory is successfully measured the promise will+  resolve with an object containing information about the memory usage.++The format of the object that the returned Promise may resolve with is+specific to the V8 engine and may change from one version of V8 to the next.++The returned result is different from the statistics returned by+`v8.GetHeapSpaceStatistics()` in that `vm.measureMemory()` measures

oops, fixed

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 console.log(globalVar); // 1000 ``` +## `vm.measureMemory([options, [contextifiedObject]])`

Sounds like a good idea, and easier to type as well, thanks :) Updated

joyeecheung

comment created time in 4 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 console.log(globalVar); // 1000 ``` +## `vm.measureMemory([options, [contextifiedObject]])`++<!-- YAML+added: REPLACEME+-->++> Stability: 1 - Experimental++Measure the memory used by the current execution context or a specified context.

I've added emphasis about this in several places in the doc

joyeecheung

comment created time in 4 days

push eventjoyeecheung/node

Joyee Cheung

commit sha 60016e878c1b512b3475788c5eea9211b7af2617

fixup! vm: implement vm.measureMemory() for per-context memory measurement

view details

push time in 4 days

pull request commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

@devsnek A measureMemory method could be added to the prototype of the Context class but that when the API does land, yes, but I think it's better to decouple the functionality of measuring the per-context memory from an API that has not landed yet, and this provides the functionality for contextified objects which is something that do exist in the wild.

joyeecheung

comment created time in 4 days

pull request commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

@devsnek That sounds interesting but seems orthogonal to what this PR does?

joyeecheung

comment created time in 5 days

issue commentnodejs/llnode

Introducing bison as a dependency

How powerful should the grammar of the expression we support be? If we only support the dot and bracket access operators it seems to be a somewhat overkill to introduce bison. But again if it turns out to require, say, > 200 lines to parse this then including bison sounds fine to me.

mmarchini

comment created time in 5 days

issue commentnodejs/llnode

PSA: repository tracking V8 postmortem changes

I believe currently when LLNODE_DEBUG=true is set the failures can be grepped from stderr when the tests are run?

mmarchini

comment created time in 5 days

issue commentnodejs/node

Empty string for class.name property

Looks like a duplicate of https://github.com/nodejs/node/issues/31830 please follow https://bugs.chromium.org/p/v8/issues/detail?id=9646 (it was marked fixed but the fix was reverted)

stelescuraul

comment created time in 5 days

issue commentnodejs/node

Experimental-exports feature doesn't work

cc @nodejs/modules-active-members

Interestingly I don't see any tests being changed in https://github.com/nodejs/node/pull/29867 Is the exports field covered by our tests?

niba

comment created time in 5 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 the `process.nextTick()` and `queueMicrotask()` functions. This issue occurs because all contexts share the same microtask and nextTick queues. +## `vm.constants`+<!-- YAML+added: REPLACEME+-->++* {Object} An object containing commonly used constants for the vm module.++### `vm.constants.measureMemory`

hm, I guess using string constants do make more sense here, as with exported constants even if one store them in a variable first they'd still need to type it every time they make the call, which is probably a pair of quotes less compared to string constants.

joyeecheung

comment created time in 5 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

+'use strict';+const common = require('../common');+const assert = require('assert');+const vm = require('vm');+const {+  SUMMARY,+  DETAILED+} = vm.constants.measureMemory.mode;++common.expectWarning('ExperimentalWarning',+                     'vm.measureMemory is an experimental feature. ' ++                     'This feature could change at any time');++// Test measuring memory of the current context+{+  vm.measureMemory(undefined)+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({})+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: SUMMARY })+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: DETAILED })+    .then((result) => {+      assert(result instanceof Object);+    });++  assert.throws(() => vm.measureMemory(null), {+    code: 'ERR_INVALID_ARG_TYPE'+  });+  assert.throws(() => vm.measureMemory('summary'), {+    code: 'ERR_INVALID_ARG_TYPE'+  });+  assert.throws(() => vm.measureMemory({ mode: -1 }), {+    code: 'ERR_OUT_OF_RANGE'+  });+}++// Test measuring memory of the sandbox+{+  const sandbox = vm.createContext();

I am not sure how I could create such a race?

joyeecheung

comment created time in 5 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

+'use strict';+const common = require('../common');+const assert = require('assert');+const vm = require('vm');+const {+  SUMMARY,+  DETAILED+} = vm.constants.measureMemory.mode;++common.expectWarning('ExperimentalWarning',+                     'vm.measureMemory is an experimental feature. ' ++                     'This feature could change at any time');++// Test measuring memory of the current context+{+  vm.measureMemory(undefined)+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({})+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: SUMMARY })+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: DETAILED })+    .then((result) => {+      assert(result instanceof Object);+    });

I prefer not to simplify tests with loops and keep them as dumb as possible in general as that would make it more difficult to debug from logs

joyeecheung

comment created time in 5 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

+'use strict';+const common = require('../common');+const assert = require('assert');+const vm = require('vm');+const {+  SUMMARY,+  DETAILED+} = vm.constants.measureMemory.mode;++common.expectWarning('ExperimentalWarning',+                     'vm.measureMemory is an experimental feature. ' ++                     'This feature could change at any time');++// Test measuring memory of the current context+{+  vm.measureMemory(undefined)+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({})+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: SUMMARY })+    .then((result) => {+      assert(result instanceof Object);+    });++  vm.measureMemory({ mode: DETAILED })+    .then((result) => {+      assert(result instanceof Object);+    });

I originally did that but on second thought, this might break as we update V8, which seems undesirable?

joyeecheung

comment created time in 5 days

Pull request review commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

 static void WatchdogHasPendingSigint(const FunctionCallbackInfo<Value>& args) {   args.GetReturnValue().Set(ret); } +static void MeasureMemory(const FunctionCallbackInfo<Value>& args) {+  CHECK(args[0]->IsInt32());+  int32_t mode = args[0].As<v8::Int32>()->Value();+  Isolate* isolate = args.GetIsolate();+  Environment* env = Environment::GetCurrent(args);+  Local<Context> context;+  if (args[1]->IsUndefined()) {+    context = isolate->GetCurrentContext();+  } else {+    ContextifyContext* sandbox =+        ContextifyContext::ContextFromContextifiedSandbox(env,+                                                          args[1].As<Object>());+    CHECK_NOT_NULL(sandbox);+    context = sandbox->context();+    if (context.IsEmpty()) {  // Not yet fully initilaized+      return;

I guess a rejection makes sense here (but returning from the JS land would be preferable as we could instantiate errors more easily there)

joyeecheung

comment created time in 5 days

Pull request review commentnodejs/node

util: inspecting private fields

 function stripVTControlCharacters(str) {   return str.replace(ansi, ''); } +function getPrivatePropertyPreviews(ctx, target) {+  const preview = previewValue(target);+  if (preview == null) {+    return undefined;+  }+  const { privateProperties } = preview;+  if (privateProperties == null) {+    return undefined;+  }+  return privateProperties.map((it) => formatPrivatePropertyPreview(ctx, it));+}++function previewPrelude() {+  if (privateInspectionSession == null) {+    inspector = require('inspector');+    privateInspectionSession = new inspector.SyncSession();+    privateInspectionSession.connect();+  }+}++function previewValue(/** used */target) {+  previewPrelude();+  let previews;+  privateInspectionSession.post('Runtime.enable');+  privateInspectionSession.post('Debugger.enable');+  privateInspectionSession.once('Debugger.paused', (event) => {+    const invokeFrame = event.params.callFrames[2];

As mentioned in https://github.com/nodejs/node/pull/27110#issuecomment-480522524 these events only happen to be synchronous so that currently the listeners can be invoked before util.inspect returns. I guess we either need to mention the risk about that this can be broken in a future v8 update in the doc, or communicate with the V8 team to make this synchronicity part of the protocol (which seems difficult though).

cc @nodejs/v8

legendecas

comment created time in 7 days

pull request commentnodejs/node

vm: implement vm.measureMemory() for per-context memory measurement

Is there a reason we don't want to expose this on performance instead?

@devsnek This is currently different from the API proposed in https://github.com/ulan/performance-measure-memory in that an options argument gives the user more control over how the memory can be measured and it supports cross-context measurement for contexts created with vm.createContext(). For Web compat, a performance API could be eventually built on top of vm but I think it's useful to provide a more powerful API for user to experiment with.

joyeecheung

comment created time in 6 days

push eventjoyeecheung/node

Joyee Cheung

commit sha 6c04e3c7f6b29f57567c30fa12a495a72b083d61

vm: implement vm.measureMemory() for per-context memory measurement This patch implements `vm.measureMemory()` with the new `v8::Isolate::MeasureMemory()` API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update.

view details

push time in 6 days

push eventjoyeecheung/node

Joyee Cheung

commit sha bc6f5fe44b2c1606b926c8680d9b2b5a5569ff78

vm: implement vm.measureMemory() for per-context memory measurement This patch implements `vm.measureMemory()` with the new `v8::Isolate::MeasureMemory()` API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update.

view details

push time in 6 days

push eventjoyeecheung/node

Joyee Cheung

commit sha ba8d46b00526308cfc1c3921ef80c8cc5bfc280b

vm: implement vm.measureMemory() for per-context memory measurement This patch implements `vm.measureMemory()` with the new `v8::Isolate::MeasureMemory()` API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update.

view details

push time in 6 days

PR opened nodejs/node

vm: implement vm.measureMemory() for per-context memory measurement vm

This patch implements vm.measureMemory() with the new v8::Isolate::MeasureMemory() API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update.

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+210 -5

0 comment

6 changed files

pr created time in 6 days

push eventjoyeecheung/node

Joyee Cheung

commit sha 683df987955ece159e190102281fc43f3c3f057f

vm: implement vm.measureMemory() for per-context memory measurement This patch implements `vm.measureMemory()` with the new `v8::Isolate::MeasureMemory()` API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update.

view details

push time in 6 days

push eventjoyeecheung/node

Rich Trott

commit sha 9a1c19bb28c7aca25a6554f3c28f06ca5017873f

test: mark test-fs-stat-bigint flaky on FreeBSD Refs: https://github.com/nodejs/node/issues/31727 PR-URL: https://github.com/nodejs/node/pull/31728 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Robert Nagy

commit sha 087583741716969edf12874d4f1f1774de581f50

stream: fix async iterator destroyed error order There was an edge case where if _destroy calls the error callback later than one tick the iterator would complete early and not propgate the error. PR-URL: https://github.com/nodejs/node/pull/31314 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/31700 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Robert Nagy

commit sha 0c7ff7fcfb221310f5b560202ff0f256c5a9781f

stream: simplify Writable.write Slightly refactors Writable.write for minor perf and readability improvements. PR-URL: https://github.com/nodejs/node/pull/31146 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Robert Nagy

commit sha df1592d2e9935305539c909fecabcb96e3dd8aee

test: async iterate destroyed stream PR-URL: https://github.com/nodejs/node/pull/28995 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>

view details

legendecas

commit sha 75311dbc2f5fbd1c81dbab94e1372b55e0dbb1ac

async_hooks: ensure event after been emitted on runInAsyncScope The exception handler user-defined will not automatically emit after for the async resource. Also removes a duplicated case `test-emit-after-uncaught-exception-runInAsyncScope.js` which is identical to test-emit-after-uncaught-exception.js. Refs: https://github.com/nodejs/node/pull/30965 PR-URL: https://github.com/nodejs/node/pull/31784 Fixes: https://github.com/nodejs/node/issues/31783 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Anna Henningsen

commit sha e460f8cf43863a5a8d73273ce311135ad3245699

src: keep main-thread Isolate attached to platform during Dispose This works around a situation in which the V8 WASM code calls into the platform while the Isolate is being disposed. This goes against the V8 API constract for `v8::Platform`. In lieu of a proper fix, it should be okay to keep the Isolate registered; the race condition fixed by 25447d82d cannot occur for the `NodeMainInstance`’s Isolate, as it is the last one to exit in any given Node.js process. This partially reverts 25447d82d. Refs: https://github.com/nodejs/node/pull/30909 Refs: https://github.com/nodejs/node/issues/31752 PR-URL: https://github.com/nodejs/node/pull/31795 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Shelley Vohr

commit sha 3a2254959b9e8c5177289ab1c1259f18ceaf9449

src: use hex not decimal in IsArrayIndex PR-URL: https://github.com/nodejs/node/pull/31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Michael Dawson

commit sha 79296dc2d02c0b9872bbfcbb89148ea036a546d0

doc: guide - using valgrind to debug memory leaks Add doc for using valgrind to debug native memory leaks. Started writing this up as part of an effort in the Diagnostic WG but think it's better to have it in the core guides and then be referenced by the docs in the Diagnostic WG repo. For more details on the Diagnostic WG effort see https://github.com/nodejs/diagnostics/issues/254#issuecomment-538853390 This guide is related to `/step3 - using_native_tools.md` PR-URL: https://github.com/nodejs/node/pull/31501 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Anna Henningsen

commit sha a7c523e26df468782691c7e16b2e033c6256beb3

src: prefer 3-argument Array::New() This is nicer, because: 1. It reduces overall code size, 2. It’s faster, because `Object::Set()` calls are relatively slow, and 3. It helps avoid invalid `.Check()`/`.FromJust()` calls. PR-URL: https://github.com/nodejs/node/pull/31775 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Robert Nagy

commit sha c776a37791007e0d570355b731647e58ea5885be

http: end with data can cause write after end Calling end() with data while ending should trigger a write after end error. PR-URL: https://github.com/nodejs/node/pull/28666 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Robert Nagy

commit sha 568fdfb1658bfcaa7832759e03661f2cb958c155

fs: fix WriteStream autoClose order WriteStream autoClose was implemented by manually calling .destroy() instead of using autoDestroy and callback. This caused some invariants related to order of events to be broken. Fixes: https://github.com/nodejs/node/issues/31776 PR-URL: https://github.com/nodejs/node/pull/31790 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Samuel Attard

commit sha 093639614fa1cea7a1bc3493d28119a924c97bc9

doc: claim ABI version 82 for Electron 10 PR-URL: https://github.com/nodejs/node/pull/31778 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Anna Henningsen

commit sha 26e49d83323c78e89b2664b6eeaee90757d52868

worker: unroll file extension regexp Refs: https://github.com/nodejs/node/pull/31662#discussion_r377016190 PR-URL: https://github.com/nodejs/node/pull/31779 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Jeff

commit sha e028ea0291b845e4bec3c7cff7319a027b8c815e

doc: fix typos in doc/api/https.md PR-URL: https://github.com/nodejs/node/pull/31793 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

Jeremiah Senkpiel

commit sha 4d6c861800cc6ac1dc6a0fd9d3a8b0053baec62a

doc: move @Fishrock123 to a previous releaser I have not done a release in well over a year, maybe even two. I also don't really plan to do more, as Node.js releases are very tedious. PR-URL: https://github.com/nodejs/node/pull/31725 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Jeremiah Senkpiel

commit sha 928c210a611fb6b4575843708e7cb921f311ebde

doc: move @Fishrock123 to TSC Emeriti It was a good run. Almost 5 years. I haven't really been involved in the last 3+? months though, so it's time I call it and 'retire'. I think it is unlikely that I'll be on the TSC again, as node is unfortunately becoming increasingly disinteresting (& frustrating) to me. (So long and thanks for all the fish!) PR-URL: https://github.com/nodejs/node/pull/31725 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Jeremiah Senkpiel

commit sha 30e6049c75590dec8d5edbf033edbc20e79efcb7

doc: pronouns for @Fishrock123 might as well while I'm at it feels a bit weird being the first person on this list with '/they' but I guess someone's gota do it PR-URL: https://github.com/nodejs/node/pull/31725 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Gireesh Punathil

commit sha 4c746a6cfda980c1cd0de6246781c0083d9e416c

doc: move gireeshpunathil to TSC emeritus PR-URL: https://github.com/nodejs/node/pull/31770 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Joyee Cheung

commit sha c11c42bd3d44dd787fe580cdea2f98d524f2a846

vm: implement vm.measureMemory() This patch implements `vm.measureMemory()` with the new `v8::Isolate::MeasureMemory()` API to measure per-context memory usage. This should be experimental, since detailed memory measurement requires further integration with the V8 API that should be available in a future V8 update.

view details

push time in 6 days

push eventjoyeecheung/v8

Georg Neis

commit sha 8c8af291e19d3e0b1da809ce9004667a8cba26e7

[api] Add comment on assumptions about SetWeak callback argument Bug: v8:10101 Change-Id: If833324b1acebcde8a3bce8888d86c598ed14249 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037442 Auto-Submit: Georg Neis <neis@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#66135}

view details

Clemens Backes

commit sha b2733d755a738cec0ce49a5007c0eb7c0acb25ae

[wasm] Implement i32 to tagged conversion in GraphAssembler This makes the code more readable, and allows for easier future performance optimizations. R=jkummerow@chromium.org Bug: v8:10123, v8:10070 Change-Id: Ifd27f0c888da21bb7f5729c550e8993e793ae7d2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037438 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66136}

view details

Michael Lippautz

commit sha 562c15d6529a89d7632a389e6d3637828d4cb44c

Reland "heap: Delay completing marking" Delay completing marking (and thus the atomic GC pause) during JS executions, increasing the chance to finalize the garbage collection from a task. This is beneficial as it avoids stack scanning which is expensive and can keep alive outdated objects in case of unified heap. Completing will be delayed at most by some overshoot factor (10%). In addition, the GC keeps the weighted average of previously recorded time to incremental marking task invocations and bails out if the task is expected to arrive too late. Reland: Do not schedule a delayed task when marking has already been finalized. This reverts commit 1775684e86cc28e373900395cf5e20e052fd9dd0. Bug: chromium:1044630, v8:10178 Change-Id: Ic46e9504ce7c200bd1d37ee8d0190fb8727a3f96 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037436 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#66137}

view details

Milad Farazmand

commit sha d1edf08d5b2b1b030fccc39d1d157b07d80ba96d

PPC/s390: [wasm] Add builtin and runtime function for debug breaks Port 59bda1967638822fe33172e4b7edb1e8af22c69f Original Commit Message: This CL adds the "WasmDebugBreak" builtin for x64, ia32, arm and arm64. It stores all wasm parameter registers to the stack and calls the respective runtime function. The runtime function does not do anything yet, but the inspector/debugger/wasm-set-breakpoint-liftoff test will already execute both the builtin and the runtime function. R=clemensb@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com BUG= LOG=N Change-Id: I881a22f1e7c8f9c0714caaa0de75e00177da51e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2038136 Reviewed-by: Junliang Yan <jyan@ca.ibm.com> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com> Cr-Commit-Position: refs/heads/master@{#66138}

view details

Andreas Haas

commit sha 15d9575a1682253b7ee2e90563ce3b972049683f

[wasm] Update spec tests R=thibaudm@chromium.org Change-Id: I68688e9613a9af4091963175b041df82410bddc4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037446 Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#66139}

view details

Frank Tang

commit sha 44380f804da46fb265ab290ed97ee5352a39917a

Fix SEGMAP_ERR by rolling ICU? Fix Intl.ListFormat long strings cause SEGMAP_ERR Add slow regression test. Bug: chromium:1044570 Change-Id: I20e3523832ac3c69e88c11bd530122bbe782ad01 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2032712 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/master@{#66140}

view details

Clemens Backes

commit sha d6dd4a8d7c79265f6e29c56a7262fb952bb4ce46

Revert "Fix SEGMAP_ERR by rolling ICU?" This reverts commit 44380f804da46fb265ab290ed97ee5352a39917a. Reason for revert: Breaks tsan, msan and ubsan, e.g. https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/30187 Original change's description: > Fix SEGMAP_ERR by rolling ICU? > > Fix Intl.ListFormat long strings cause SEGMAP_ERR > Add slow regression test. > > Bug: chromium:1044570 > Change-Id: I20e3523832ac3c69e88c11bd530122bbe782ad01 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2032712 > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Michael Achenbach <machenbach@chromium.org> > Commit-Queue: Frank Tang <ftang@chromium.org> > Cr-Commit-Position: refs/heads/master@{#66140} TBR=machenbach@chromium.org,ftang@chromium.org,syg@chromium.org Change-Id: I079a675b754b413398d327c44bfeded9c7406333 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:1044570 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039355 Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66141}

view details

v8-ci-autoroll-builder

commit sha f854b46a55529a28b19697bc79ad29cade55d151

Update V8 DEPS. Rolling v8/base/trace_event/common: https://chromium.googlesource.com/chromium/src/base/trace_event/common/+log/bd79231..dab187b Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/7dffbb7..111e7f9 Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2e4a40a..f72ef2d Rolling v8/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/e931018..fff0fe4 Rolling v8/tools/clang: https://chromium.googlesource.com/chromium/src/tools/clang/+log/847296c..4f24c2a Rolling v8/tools/luci-go: git_revision:8c17d4a7b01d6257e927c629cc623ebc6a6b3711..git_revision:bbda6f0d563b25ce0a25b147dec46e5815da5601 Rolling v8/tools/luci-go: git_revision:8c17d4a7b01d6257e927c629cc623ebc6a6b3711..git_revision:bbda6f0d563b25ce0a25b147dec46e5815da5601 Rolling v8/tools/luci-go: git_revision:8c17d4a7b01d6257e927c629cc623ebc6a6b3711..git_revision:bbda6f0d563b25ce0a25b147dec46e5815da5601 TBR=machenbach@chromium.org,tmrts@chromium.org Change-Id: Ib36bbd2f1cb29c461b2aea9a0ed59582a59c94af Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2040930 Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#66142}

view details

Yu Yin

commit sha 6b842b41f6ee6bb68e28130e0a07340102e3c15c

[MIPS64] Add missing elf_machine field. also correct elf_machine for mips. Change-Id: I261d5bf54ec7ac88290141a4b4ec12e203c34155 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2035515 Auto-Submit: Yu Yin <xwafish@gmail.com> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#66143}

view details

Clemens Backes

commit sha eded54ad88e09e0ecde35d511e1554d7f1ce7c38

[wasm] Use GraphAssembler for loads and stores This rewrites the macros to use the GraphAssembler directly. As a next step we should explore if the macros are still worth having, or if they should be inlined everywhere. R=jkummerow@chromium.org Bug: v8:10123 Change-Id: Ia700e00af6a617c4d5a9e34f5be6cab098cd576a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037449 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66144}

view details

Tobias Tebbi

commit sha 58b45cca2f91fd3ae25715c20406d01a50722918

[profiler] fix 4 bugs in --prof/linux-tick-processor - In log.cc, we used InstructionStart() for code create events, but the Code object address for code move events. Change to use InstructionStart() for both. - The symbol table contains some kind of virtual address, not file offsets. They happened to be identical in the past but are no longer, probably due to toolchain changes. Now we use objdump to figure out the difference between virtual addresses and file offsets. - When a new code object happened to be created at the same address as a previous one, we wouldn't update it. This is indeed wrong, as predicted in a TODO by Jaro. - For 64bit addresses, using >>> is wrong, now replaced with division. Change-Id: Ib23114ed736f98bfc33c65004a039a3fd04d3c49 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2016586 Reviewed-by: Michael Stanton <mvstanton@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#66145}

view details

Yu Yin

commit sha f5f15871f5e5152425e46db811738cc225f5579f

[mips][wasm] Add builtin and runtime function for debug breaks port 59bda19 https://crrev.com/c/2036082 Original Commit Message: This CL adds the "WasmDebugBreak" builtin for x64, ia32, arm and arm64. It stores all wasm parameter registers to the stack and calls the respective runtime function. The runtime function does not do anything yet, but the inspector/debugger/wasm-set-breakpoint-liftoff test will already execute both the builtin and the runtime function. Change-Id: I7e74116f711d9d2599f6f1a6d47b972bad101f8c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041214 Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Yu Yin <xwafish@gmail.com> Cr-Commit-Position: refs/heads/master@{#66146}

view details

Steve Blackburn

commit sha bd414037e98c0d697fd887342668b0bb46d45b8d

Fix incorrect use of ptr by TPH Bug: v8:9533 Change-Id: I8c8f6d7e2fddae13a9a01a77ac26b1f2ad338889 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039430 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Steve Blackburn <steveblackburn@google.com> Cr-Commit-Position: refs/heads/master@{#66147}

view details

v8-ci-autoroll-builder

commit sha 37913a2f759907aaf3c7a45de6ec79204a46e7c0

Update V8 DEPS. Rolling v8/build: https://chromium.googlesource.com/chromium/src/build/+log/111e7f9..c80cd76 Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f72ef2d..1ffa053 Rolling v8/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/fff0fe4..e868546 TBR=machenbach@chromium.org,tmrts@chromium.org Change-Id: If36c8015d0dba083c0bfafd5ee8139bfb1989b19 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041394 Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#66148}

view details

Clemens Backes

commit sha 2eb3b53d9360493a75e2909561bd11c4e3ade751

[wasm] Inline two simple macros The LOAD_RAW and LOAD_RAW_NODE_OFFSET macros just call method on the GraphAssembler now, hence we can remove the macros and just do the calls directly. This reduces code complexity. R=jkummerow@chromium.org, tebbi@chromium.org Bug: v8:10123 Change-Id: I1d779969a14a52256eecb33007564eb190bdcff2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039051 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#66149}

view details

Steve Blackburn

commit sha e4a4c81e153f6d8604cb5d061d932cacd719671c

Move check before TPH alloc These two checks should occur regardless of which allocator we're using, so move them above the TPH check. The check immediately following is V8-specific, so stays where it is. Bug: v8:9533 Change-Id: I127e39969f4aa39ef09ff7b0fdb5ed52b535ad43 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039434 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Steve Blackburn <steveblackburn@google.com> Cr-Commit-Position: refs/heads/master@{#66150}

view details

Steve Blackburn

commit sha d3eabf79bec34a50c885f53ae9abf2fce710563a

TPH no longer uses V8 heap. Simple correction over prior commit since TPH no longer needs to depend on V8 read only heap. Bug: v8:9533 Change-Id: Icc72cdbb58fb3d9dc79573548cd9fe9cc88b2684 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039350 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Steve Blackburn <steveblackburn@google.com> Cr-Commit-Position: refs/heads/master@{#66151}

view details

Steve Blackburn

commit sha 700665b65db1784ff0f50d22098eaf749556d0a2

Refactor code ranges for TPH Code ranges are currently accessed from outside the heap via an internal structure of the heap. This change lifts the accessor function a level higher. This should have no cost, but will maintain abstraction better and allow the TPH interface to work more readily. Bug: v8:9533 Change-Id: I154d93ce46f5137b3e3b7ecc6bed7e5b8b0343a6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2039351 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Steve Blackburn <steveblackburn@google.com> Cr-Commit-Position: refs/heads/master@{#66152}

view details

Michael Lippautz

commit sha 12fb997a379da788ce894b4a316770dcb1460b54

heap: Simplify helping embedder tracing Instead of alternating V8 and embedder steps and trying to find a fixed point where both are empty, just run two phases and check whether both have been observed as empty individually. Bug: chromium:1044630, chromium:1049084 Change-Id: I7ffdca3086f1e7f772303272e370c4a6c1f83f24 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041437 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#66153}

view details

Steve Blackburn

commit sha 1d2c043aaa4d33296d6bba38d9ffdc3425e4508f

Serialization without heap assumptions. Currently back references to regular objects are encoded in terms of a relative address, index by chunk index and chunk offset. This approach has the advantage of avoiding the need for a table of back-references at deserialization time, but makes strong assumptions about the way objects are organized in memory (for example, this will not work if the allocator uses a free list rather than a bump pointer). I did some quick measurements and found that the absolute number of objects and back-references is low, suggesting that simply indexing objects would work with little (or no) observable impact on peak memory use during deserialization. Indexing only back referenced objects is not implemented in this simple CL, but could fairly easily be added. Given that the existing mechanism will remain in place, I have implemented the object index by simply making chunk size one, so every object lives on its own chunk (with offset zero). This is the moral equivalent to indexing each object but is a more minimal change. Directly encoding an object index will be more efficient, the trade off made here is just to keep the change absolutely minimal. If using an object index becomes the default, this can be optimized first by only using an index for each object that is actually back- referenced (about half of all objects in my measurements), and more aggressively, a technique like register allocation could be used at serialization time to limit the number of indices to the maximum number of outstanding back-references at any time (basically a live- range analysis of back-references). Bug: v8:9533 Change-Id: I1b7ae87e954f67f6405c2bbdf3b4a4f385af8579 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030742 Commit-Queue: Steve Blackburn <steveblackburn@google.com> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#66154}

view details

push time in 8 days

push eventjoyeecheung/node

Beth Griggs

commit sha f0f2583c912d4c7abf6fb5a9ccd380976f1ab092

2020-02-06, Version 13.8.0 (Current) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/196

view details

Beth Griggs

commit sha e65ae4278578e51761bf9253a7c68ade0f9b897c

2020-02-06, Version 12.15.0 'Erbium' (LTS) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/197

view details

Beth Griggs

commit sha d602e586bf2baf5889586bde8e072e556db2b273

2020-02-06, Version 10.19.0 'Dubnium' (LTS) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/198

view details

James M Snell

commit sha e001710219906b45bb5ac94d7e9cb4b56a83c134

meta: fix collaborator list errors in README.md Add missing `-` characters in the list. PR-URL: https://github.com/nodejs/node/pull/31655 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha 06a43d4dcacc0c39506b8a3a1bb77411add6d9d7

test: fix flaky test-http2-stream-destroy-event-order Alternative to https://github.com/nodejs/node/pull/31590. It appears that the issue here is that the test falsely assumed that closing the client (which also currently destroys the socket rather than gracefully shutting down the connection) would still leave enough time for the server side to receive the stream error. Address that by explicitly waiting for the server side to receive the stream error before closing the client and the connection with it. Refs: https://github.com/nodejs/node/pull/31590 Refs: https://github.com/nodejs/node/issues/20750 PR-URL: https://github.com/nodejs/node/pull/31610 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Sam Roberts

commit sha f8e75512951b5060409b0c80e246ffc81ee9e72e

benchmark: support optional headers with wrk wrk did not support sending optional headers, they were silently ignored. This appears to be an oversight, they were supported for autocannon. PR-URL: https://github.com/nodejs-private/node-private/pull/189 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Sam Roberts

commit sha fe3975783cc4fdba47c2e25442ca891aab31e805

http: strip trailing OWS from header values HTTP header values can have trailing OWS, but it should be stripped. It is not semantically part of the header's value, and if treated as part of the value, it can cause spurious inequality between expected and actual header values. Note that a single SPC of leading OWS is common before the field-value, and it is already handled by the HTTP parser by stripping all leading OWS. It is only the trailing OWS that must be stripped by the parser user. header-field = field-name ":" OWS field-value OWS ; https://tools.ietf.org/html/rfc7230#section-3.2 OWS = *( SP / HTAB ) ; https://tools.ietf.org/html/rfc7230#section-3.2.3 Fixes: https://hackerone.com/reports/730779 PR-URL: https://github.com/nodejs-private/node-private/pull/189 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Fedor Indutny

commit sha 861d3f7a61f543c253337cfc1a967fa84f96c653

crypto: fix assertion caused by unsupported ext `X509V3_EXT_print` can return value different from `1` if the X509 extension does not support printing to a buffer. Instead of failing with an unrecoverable assertion - replace the relevant value in the hashmap with a JS null value. Fixes: https://hackerone.com/reports/746733 PR-URL: https://github.com/nodejs-private/node-private/pull/175 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Beth Griggs

commit sha 4c5b8dd7d80b6010c4d3e914f7e8c61cc297a1ad

deps: update llhttp to 2.0.4 PR-URL: https://github.com/nodejs-private/node-private/pull/199 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Sam Roberts

commit sha efd5a6b2eda54dd846d2bdf34f64d34701411d0e

test: using TE to smuggle reqs is not possible See: https://hackerone.com/reports/735748 PR-URL: https://github.com/nodejs-private/node-private/pull/199 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Rich Trott

commit sha a9e26268f5b464f508a033129c1ffaa694e5d361

doc,assert: rename "mode" to "assertion mode" Rename "strict mode" in the assert module to "strict assertion mode". This is to avoid confusion with the more typical meaning of "strict mode" in ECMAScript. This necessitates a corresponding change of "legacy mode" to "legacy assertion mode". PR-URL: https://github.com/nodejs/node/pull/31635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Gabriel Schulhof

commit sha 884e287199901853a30781a0b398e6c3e4a07eb1

n-api: free instance data as reference Instance data associated with a `napi_env` is no longer stored on the env itself but is instead rendered as a reference. Since `v8impl::Reference` is tied to a JS object, this modification factors out the `v8impl::Reference` refcounting and the deletion process into a base class for `v8impl::Reference`, called `v8impl::RefBase`. The instance data is then stored as a `v8impl::RefBase`, along with other references, preventing a segfault that arises from the fact that, up until now, upon `napi_env` destruction, the instance data was freed after all references had already been forcefully freed. If the addon freed a reference during the `napi_set_instance_data` finalizer callback, such a reference had already been freed during environment teardown, causing a double free. Re: https://github.com/nodejs/node-addon-api/pull/663 PR-URL: https://github.com/nodejs/node/pull/31638 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Richard Lau

commit sha d213f21c72f77da6f66f2723b300da27740a0a90

tools: unify make-v8.sh for ppc64le and s390x Refactor `tools/make-v8.sh` to minimise differences between the `ppc64le` and `s390x` paths to allow us to enable `ccache` on the `ppc64le` machines in the CI. PR-URL: https://github.com/nodejs/node/pull/31628 Refs: https://github.com/nodejs/build/pull/1927 Refs: https://github.com/nodejs/build/issues/1940 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Rich Trott

commit sha 1d369a2031700d0b4ac94a6233ab51846ca59b80

test: add test-dns-promises-lookupService This adds covereage for the onlookupservice() callback in lib/internal/dns/promises.js. Because of stubbing in other tests, it is not currently covered. This test works on my local development machine with the network turned off, so I'm putting it in parallel. If CI proves more challenging, it can be moved to the internet directory instead. PR-URL: https://github.com/nodejs/node/pull/31640 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

tsabolov

commit sha 10d378e947565d4aa786f9f5bd69f55c208faf0f

doc: correct getting an ArrayBuffer's length `ArrayBuffer` instances do not have `.length` property. Instead they have `.byteLength` property. Fixed that in the description of `new Buffer(arrayBuffer[, byteOffset[, length]])` and `Buffer.from(arrayBuffer[, byteOffset[, length]])`. PR-URL: https://github.com/nodejs/node/pull/31632 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Ruben Bridgewater

commit sha f9a27ea510c6b89f8d4791b2eb51e359297ac193

readline: make tab size configurable This adds the `tabSize` option to readline to allow different tab sizes. PR-URL: https://github.com/nodejs/node/pull/31318 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Swagat Konchada

commit sha a733c18e2854eac4afbb3d82e451b0ddac871d15

doc: add note in BUILDING.md about running `make distclean` Fixes: https://github.com/nodejs/node/issues/28675 PR-URL: https://github.com/nodejs/node/pull/31542 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Joyee Cheung

commit sha e2a3a87060af4c48b2551d20dfede33183b1931d

doc: remove .github/ISSUE_TEMPLATE.md in favor of the template folder This removes the obsolete issue template file since we already have the issue template folder which is the one currently in effect. PR-URL: https://github.com/nodejs/node/pull/31656 Refs: https://github.com/nodejs/node/pull/31611 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha a555be2e45b283a201de21350c0115680a7d4e7c

worker: improve MessagePort performance Use a JS function as the single entry point for emitting `.onmessage()` calls, avoiding the overhead of manually constructing each message event object in C++. confidence improvement accuracy (*) (**) (***) worker/echo.js n=100000 sendsPerBroadcast=1 payload='object' workers=1 *** 16.34 % ±1.16% ±1.54% ±1.99% worker/echo.js n=100000 sendsPerBroadcast=1 payload='string' workers=1 *** 24.41 % ±1.50% ±1.99% ±2.58% worker/echo.js n=100000 sendsPerBroadcast=10 payload='object' workers=1 *** 26.66 % ±1.54% ±2.05% ±2.65% worker/echo.js n=100000 sendsPerBroadcast=10 payload='string' workers=1 *** 32.72 % ±1.60% ±2.11% ±2.73% worker/messageport.js n=1000000 payload='object' *** 40.28 % ±1.48% ±1.95% ±2.52% worker/messageport.js n=1000000 payload='string' *** 76.95 % ±2.19% ±2.90% ±3.75% Also fix handling exceptions returned from `MessagePort::New`. PR-URL: https://github.com/nodejs/node/pull/31605 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Tobias Nießen

commit sha 2db1c8df25db40a909a8ada75ae6da4caa34ed46

doc: update TSC name in "Release Process" PR-URL: https://github.com/nodejs/node/pull/31652 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

push time in 9 days

create barnchjoyeecheung/v8

branch : flags2-test

created branch time in 9 days

Pull request review commentnodejs/node

vm: lazily initialize primordials for vm contexts

 MaybeLocal<Object> GetPerContextExports(Local<Context> context) {     return handle_scope.Escape(existing_value.As<Object>());    Local<Object> exports = Object::New(isolate);-  if (context->Global()->SetPrivate(context, key, exports).IsNothing())+  if (context->Global()->SetPrivate(context, key, exports).IsNothing() ||+      !InitializePrimordials(context))

Oops, forgot to handle the return value of InitializePrimordials in the initial commit, fixed.

joyeecheung

comment created time in 11 days

push eventjoyeecheung/node

Joyee Cheung

commit sha 2c796330f0f93d64fe47ff36427c93c2d71a9940

fixup! vm: lazily initialize primordials for vm contexts

view details

push time in 11 days

pull request commentnodejs/node

vm: lazily initialize primordials for vm contexts

Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/522/

joyeecheung

comment created time in 11 days

Pull request review commentnodejs/node

vm: lazily initialize primordials for vm contexts

 MaybeLocal<Object> GetPerContextExports(Local<Context> context) {   Local<Object> exports = Object::New(isolate);   if (context->Global()->SetPrivate(context, key, exports).IsNothing())     return MaybeLocal<Object>();+  InitializePrimordials(context);

This is only hit for vm contexts and main contexts created without snapshot support

joyeecheung

comment created time in 11 days

Pull request review commentnodejs/node

vm: lazily initialize primordials for vm contexts

 bool InitializeContextForSnapshot(Local<Context> context) {    context->SetEmbedderData(ContextEmbedderIndex::kAllowWasmCodeGeneration,                            True(isolate));+  return InitializePrimordials(context);+}++bool InitializePrimordials(Local<Context> context) {

This block contains only indentation change

joyeecheung

comment created time in 11 days

PR opened nodejs/node

vm: lazily initialize primordials for vm contexts

Lazily initialize primordials when cross-context support for builtins is needed to fix the performance regression in context creation.

Fixes: https://github.com/nodejs/node/issues/29842

local benchmark results

                            confidence improvement accuracy (*)    (**)   (***)
 vm/create-context.js n=100        ***    485.26 %      ±15.48% ±21.32% ±29.29%

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+48 -42

0 comment

3 changed files

pr created time in 11 days

create barnchjoyeecheung/node

branch : no-primordials-for-context

created branch time in 11 days

issue commentnodejs/node

Significant slowdown of createContext and runInContext

It seems rather difficult to make a toggle for the primordials togglable at configure-time at this point, but another idea would be to lazily initialize the primoridals only when they are necessary for vm contexts - in most cases, there should be no need because it's used by builtin modules that probably will have their own set of primordials when being passed into a context. I am still looking into whether this is safe to do - it does impose some requirements for cross-context support (e.g. worker_threads.moveMessagePortToContext()) which @addaleax is working on.

yrsh

comment created time in 11 days

create barnchjoyeecheung/v8

branch : flags2

created branch time in 11 days

create barnchjoyeecheung/node

branch : measure-memory

created branch time in 15 days

pull request commentnodejs/node

doc: ask more questions in the bug report template

Just noticed that this change is not in effect because it changed the obsolete .github/ISSUE_TEMPLATE.md while the file in effect is .github/ISSUE_TEMPLATE/1-bug-report.md. Opened https://github.com/nodejs/node/pull/31656

joyeecheung

comment created time in 17 days

PR opened nodejs/node

doc: remove .github/ISSUE_TEMPLATE.md in favor of the template folder

This removes the obsolete issue template file since we already have the issue template folder which is the one currently in effect.

Refs: https://github.com/nodejs/node/pull/31611

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [ ] 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

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+34 -52

0 comment

2 changed files

pr created time in 17 days

create barnchjoyeecheung/node

branch : fix-template

created branch time in 17 days

PR closed nodejs/node

doc: ask more questions in the bug report template meta

Inspired by the defect report template of the V8 issue tracker

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [ ] 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

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+26 -4

1 comment

1 changed file

joyeecheung

pr closed time in 17 days

pull request commentnodejs/node

doc: ask more questions in the bug report template

Landed in 0effc98

joyeecheung

comment created time in 17 days

push eventnodejs/node

Joyee Cheung

commit sha 0effc9845f74e7351487644cbd1691196000b93e

doc: ask more questions in the bug report template Inspired by the defect report template of the V8 issue tracker PR-URL: https://github.com/nodejs/node/pull/31611 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

push time in 17 days

issue commentnodejs/build

node-www out of space?

Do we have backup for these? I guess we could save them somewhere else and bring them back when we have more space? (Or ideally put these nightlies in some cloud storage?)

BethGriggs

comment created time in 17 days

issue commentnodejs/TSC

Node.js future directions - any interest in online or in person summit?

For this topic I think an online summit or an in-person summit colocated with a Node.js/OpenJS event would be nicer so that we can have more people chiming in.

mhdawson

comment created time in 18 days

push eventjoyeecheung/node

Joyee Cheung

commit sha 4042875aa11f17a9b380a2fab53811bd37b08364

Update .github/ISSUE_TEMPLATE.md Co-Authored-By: Rich Trott <rtrott@gmail.com>

view details

push time in 20 days

PR opened nodejs/node

doc: ask more questions in the bug report template

Inspired by the defect report template of the V8 issue tracker

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [ ] 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

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+22 -4

0 comment

1 changed file

pr created time in 21 days

push eventjoyeecheung/node

Joyee Cheung

commit sha fda37e25c98ca629622443b73b56249306e5fb5d

doc: ask more questions in the bug report template Inspired by the defect report template of the V8 issue tracker

view details

push time in 21 days

create barnchjoyeecheung/node

branch : template

created branch time in 21 days

Pull request review commentnodejs/node

src: deprecate errname method at runtime

 void Initialize(Local<Object> target,                   ->GetFunction(env->context())                   .ToLocalChecked()).Check(); -  // TODO(joyeecheung): This should be deprecated in user land in favor of

The behavior change here is moving process.binding('uv').errname() from --pending-deprecation to unconditional deprecation which is still a TODO so I don't think this needs to be closed. But this comment is not talking about that so it should not be removed.

juanarbol

comment created time in 22 days

Pull request review commentnodejs/node

module: prevent builtins from resolving from disk

 class NativeModule {     return mod && mod.canBeRequiredByUsers;   } +  static isPartOfNamespace(specifier) {

This is not used anywhere else other than in the CJS loader, so I think it makes more sense to just inline it there instead of requiring another jump in the source when one needs to grok it.

devsnek

comment created time in 22 days

Pull request review commentnodejs/node

src: deprecate errname method at runtime

 void Initialize(Local<Object> target,                   ->GetFunction(env->context())                   .ToLocalChecked()).Check(); -  // TODO(joyeecheung): This should be deprecated in user land in favor of

This is actually talking about process.binding('uv').UV_* constants, not process.binding('uv').errname().

juanarbol

comment created time in 22 days

push eventjoyeecheung/v8

Johannes Henkel

commit sha ab1b0ed8d5e5775ea8d5a9141d283282ccc5d413

[DevTools] Roll inspector_protocol. Fixes edge cases for parsing / serializing codepoint 0xffff in JSON with UTF16. New Rev: 0213a8545f6362cd1cd5091cedf29747736552e8 Change-Id: I48b174cf1bd9263ace002996094f7143a1248766 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2020502 Auto-Submit: Johannes Henkel <johannes@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#65985}

view details

Joyee Cheung

commit sha 4dffdbb61bf2a3fd5bc7eb2b43113faa2d754781

try passing the information without using SFI bits

view details

Joyee Cheung

commit sha df906f0cb6d07d97fa01cb7821595817cb3d0395

add print

view details

Joyee Cheung

commit sha a78e3f78100075986754d11de60399b797cdf501

test

view details

Joyee Cheung

commit sha cf4a416760120d28fcfdf90db63ad63b4efb42a8

test 2

view details

Joyee Cheung

commit sha a113e0a9527ee5a7195e1784cdef12c3df721022

add flags to UncompiledData

view details

Joyee Cheung

commit sha 66bb07d56c456f92b8bbe504174b00cf70dd5f04

works

view details

push time in 24 days

push eventjoyeecheung/v8

Deepti Gandluri

commit sha 8d511cbd209e90448f3f9197b2ac49757cd32ca5

[wasm] Growing memory should always allocate a new JS buffer The UpdateSharedWasmMemoryObjects function only creates a new JSArrayBuffer when the the legths of old/new ArrayBuffer objects are unequal, but the CHECK in the Grow() funciton assumes that a new object is always created. Fix so that a new ArrayBuffer is always allocated. Bug: v8:10044, chromium:1040325 Change-Id: I66912bdc091e65a57e5b50f4ed63b0da5492dcc4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1999603 Reviewed-by: Ben Smith <binji@chromium.org> Commit-Queue: Deepti Gandluri <gdeepti@chromium.org> Cr-Commit-Position: refs/heads/master@{#65742}

view details

Zhou, Zhiguo

commit sha 4648b83c7a177add28f06d9fd88676d90863f440

[wasm-simd] Implement load extend with 4 and 8 lanes on IA32 This CL implements 4 of the 6 load extend operations. The added opcodes include: I16x8Load8x8S, I16x8Load8x8U, I32x4Load16x4S, I32x4Load16x4U. Bug: v8:9886 Change-Id: I9961f97325168e3a0036e1b282b769cc65b06ffb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981329 Commit-Queue: Zhiguo Zhou <zhiguo.zhou@intel.com> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org> Reviewed-by: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#65743}

view details

v8-ci-autoroll-builder

commit sha 4135c2205389d18124a5673192c7867fa2ee73b2

Update V8 DEPS. Rolling v8/buildtools/linux64: git_revision:a5bcbd726ac7bd342ca6ee3e3a006478fd1f00b5..git_revision:0c5557d173ce217cea095086a9c9610068123503 Rolling v8/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools/+log/7a8bf94..a1266b6 TBR=machenbach@chromium.org,tmrts@chromium.org Change-Id: Id7d531f24a9f1becd4c0d03fc09d747c2d1a9dda Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1999804 Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#65744}

view details

Dominik Inführ

commit sha 9ab99f2903099c3358fa83174fcc308a4e1ba8ab

[heap] Round max_semi_space_size_ again to power-of-2 Removing this caused performance regressions. Bug: chromium:1036514 Change-Id: If24826874c45c21670a59f9dbbe57dacd44ae5fc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1998080 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#65745}

view details

Simon Zünd

commit sha 75eab984f5abc4a1414961cfbf1215a3b0036ef4

Throw OOM when allocating uninitialized FixedArrays with negative length This CL fixes a negative capacity check up the call-chain to fix an issue found a clusterfuzz. This is temporary since mid-term we want to change the interface of allocation functions to take an unsigned C++ type, so implicit conversion errors like this one, can't happen. Fixed: chromium:1041240 Change-Id: Ib344e5738d2648fbf9a2951ca943ff566ddd5f09 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000134 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#65746}

view details

Maya Lekova

commit sha 2f820780dadc14cc5c95b95a942574fd34185b12

Revert "[parser] Fix caching dynamic vars on wrong scope" This reverts commit 304e97d33429095333ca94c9f5387e7817115637. Reason for revert: Last roll is failing - https://ci.chromium.org/p/chromium/builders/try/linux-rel/282356 Original change's description: > [parser] Fix caching dynamic vars on wrong scope > > When looking up a variable in a deserialized WITH scope, we were > unconditionally passing in the cache scope to the lookup, even if the > with was inside the cache scope. This would lead to and outer scope of > the with holding the generated dynamic variable. If the cache scope was > the SCRIPT scope, the dynamic variable would be interpreted as a global > object property. > > Now, we only store the WITH scope dynamic variables in the cache scope > if it is an inner scope of the WITH scope, same as we do for 'normal' > scope lookups. > > Fixed: chromium:1041210 > Change-Id: I4e8eb25bbb8ea58311355d13a9c7c97bf2fa3ec7 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997135 > Reviewed-by: Toon Verwaest <verwaest@chromium.org> > Commit-Queue: Toon Verwaest <verwaest@chromium.org> > Auto-Submit: Leszek Swirski <leszeks@chromium.org> > Cr-Commit-Position: refs/heads/master@{#65732} TBR=leszeks@chromium.org,verwaest@chromium.org Change-Id: I7b6d77d03b603152a9a47541db466934f46b1176 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000140 Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#65747}

view details

Georg Neis

commit sha f28cc37980ab050f0aefe25614bcaf1a654950e9

Fix SyntheticModule body descriptor It was missing the name field. Bug: chromium:1036641 Change-Id: I686a46adfccfd656422cddef340ded58b7a9c9b1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000135 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#65748}

view details

Clemens Backes

commit sha 7ddc3f66b6f0c8bf59e65ce91e14ed4241815d3c

[Liftoff] Include static frame offset in spill offsets This saves the addition when accessing the stack slot, and (more importantly) will make it easier to access the stack slot for debugging, since there is no platform-specific constant to be added any more. R=zhin@chromium.org Bug: v8:10019 Change-Id: I3eaf1838b78c2b7b343a435d7c8a32e7e71508ed Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1998082 Reviewed-by: Zhi An Ng <zhin@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65749}

view details

Jakob Kummerow

commit sha 356470b043eda62e73978cebdae58fd6d1504218

[test] Make Multi-Mapped Mock Allocator threadsafe TSan complains in "isolates" tests otherwise. Also further reduce virtual memory requirements of the sample test to address flaky allocation failures on 32-bit platforms. Change-Id: I26c9a59965009d7083876b4ff4836ee879d33350 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000138 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65750}

view details

Clemens Backes

commit sha 4d69c548fd3e28fe054fb56190c546ed24a9dcda

[wasm][debug] Fix index-named locals This fixes local names that are the string representation of a valid element index. Even though both the Liftoff and the interpreter-based test are changed, only the latter needs to be fixed right now since Liftoff does not use the names currently. Modifying the test just ensures that we implement this correctly once we use the name. R=jkummerow@chromium.org Bug: v8:10019 Change-Id: Ib7f7d6e244a344a85ab540b6c2c67f98b1f3078e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1998079 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#65751}

view details

Michael Lippautz

commit sha 1a4b5990543088e9771cdfacab7a1ccc22072861

api: Remove deprecated RegisterEmbedderReference method Change-Id: I5889da6b5bb916639d00c450d06c35040c34a9a0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997130 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#65752}

view details

Clemens Backes

commit sha 72f7fe1ba3c62614b34246959e83d1889a8af1de

[wasm] Remove unused enum marker Just a cleanup to remove an unused enum marker. R=ahaas@chromium.org Change-Id: I7b40f2389796f43d82d06eb161569ecea7892ef6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000145 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65753}

view details

Leszek Swirski

commit sha a85d74a36b8258bdeac714a61def64d4553dd724

[parser] Fix cache scope recursion for `with` The fix in https://crrev.com/c/1997135 didn't properly recurse the cache scope after a with scope, passing the current scope rather than the original cache scope up the recursion. Now the "use external cache" check is done in LookupWith (and, analogously, LookupSloppyEval) while passing the given cache scope through the Lookup recursion. Fixed: chromium:1041210 Fixed: chromium:1041616 Change-Id: I5ac9ddc6c16d63b59aa034721fccec2f7781c4f8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000133 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#65754}

view details

Ulan Degenbaev

commit sha 00cd6e0d0ee8069abcb0934b20a52773737b20ef

[heap] Reset on-hold linear allocation area at the start of marking Currently the on-hold area is reset on incremental marking steps. At the start of marking we conservatively assume that the on-hold area spans the initially allocated linear allocation area, which may be large. Bug: chromium:973627 Change-Id: I83f2d0e38a2a255c1e8d48549352e9303be89920 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000737 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#65755}

view details

Seth Brenith

commit sha 1077308c39794b3d2e73c1e8446f8acfb3016dbe

[cleanup] Make PropertyDescriptorObject inherit from Struct There is no particular reason that PropertyDescriptorObject should be a subclass of FixedArray. By using a separate struct type, we get better generated accessor functions, automatic verification, and runtime type info, plus we save four bytes per instance. Change-Id: If076782832aa9398806794e4ee6d019aea2f92b7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1999463 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#65756}

view details

Michael Lippautz

commit sha 26ca6abd2eec76b79871ffad9365b884ec3adca6

api,handles: Support for on-stack TracedReference - Introduces a API to set top of the stack through EmbedderHeapTracer::SetStackTop. - Introduces a new API to inform V8 about an empty embedder stack. - Switch internal representation of TracedReference for on-stack handles to a proper stack that considers all contained handles as roots. - Handle garbage is avoided by cleaning up on handle creation or GC. Design doc: https://bit.ly/on-stack-traced-reference Bug: chromium:1040038 Change-Id: I927ef0abb268fdb5853c9e17b1bc96e2491cf101 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993973 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#65757}

view details

Milad Farazmand

commit sha 83c84c444f67ce3baa3eb21a5782467dfebb28b9

PPC/s390: [wasm-simd] Implement load extend with 4 and 8 lanes on IA32 Port 4648b83c7a177add28f06d9fd88676d90863f440 Original Commit Message: This CL implements 4 of the 6 load extend operations. The added opcodes include: I16x8Load8x8S, I16x8Load8x8U, I32x4Load16x4S, I32x4Load16x4U. R=zhiguo.zhou@intel.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com BUG= LOG=N Change-Id: I3a3308522a69dba78c7a8d6b3ff4b25d25f2e569 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1999492 Reviewed-by: Junliang Yan <jyan@ca.ibm.com> Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com> Cr-Commit-Position: refs/heads/master@{#65758}

view details

Clemens Backes

commit sha 3e8407cef1a9ccccfd18c87c1985de378e83ceb2

Add --perf-prof-delete-file flag Tests which set the --perf-prof flag leave behind a file in the current working directory every time they execute. In order to avoid this, this CL introduces a --perf-prof-delete-file flag, which removes this file right after creating it. This still allows the process to write to it via the open handle, but the file will be gone afterwards, even if the process crashes or gets killed while executing. R=ahaas@chromium.org Bug: v8:10121 Change-Id: I99b159bb6d94255f77095ac78d98ba55106e94fc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000738 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65759}

view details

Clemens Backes

commit sha a711a82ed8a9ecc0332883c1d15b2dc495c1f412

Statically disable --perf-prof-unwinding-info if not supported This just removes the flag if it is not supported anyway. This avoids fuzzers trapping over this. The same was done for the --perf-prof flag in https://crrev.com/c/1993969. R=ahaas@chromium.org Bug: chromium:1035233 Change-Id: I7b4b8fdd141df717cc62d795534f30435f7b38c1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1998083 Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#65760}

view details

Santiago Aboy Solanes

commit sha 1dfa292c681cc4986e63cfc735bef136101058ec

[cleanup] MakeOlder DCHECK fix The DCHECK was not correct in pointer compression mode. Change-Id: Ifc00478df10962a8114f2d9cd1596ddaedc60d97 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2000742 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#65761}

view details

push time in a month

more