-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
report: add support for Workers #31386
Commits on Jan 21, 2020
-
src: better encapsulate native immediate list
Refactor for clarity and reusability. Make it more obvious that the list is a FIFO queue.
Configuration menu - View commit details
-
Copy full SHA for cf9939f - Browse repository at this point
Copy the full SHA cf9939fView commit details -
src: exclude C++ SetImmediate() from count
There is no real reason to manage a count manually, given that checking whether there are C++ callbacks is a single pointer comparison. This makes it easier to add other kinds of native C++ callbacks that are managed in a similar way.
Configuration menu - View commit details
-
Copy full SHA for c7ef27b - Browse repository at this point
Copy the full SHA c7ef27bView commit details -
src: add a threadsafe variant of SetImmediate()
Add a variant of `SetImmediate()` that can be called from any thread. This allows removing the `AsyncRequest` abstraction and replaces it with a more generic mechanism.
Configuration menu - View commit details
-
Copy full SHA for ed57a14 - Browse repository at this point
Copy the full SHA ed57a14View commit details -
Remove `AsyncRequest` from the source code, and replace its usage with threadsafe `SetImmediate()` calls. This has the advantage of being able to pass in any function, rather than one that is defined when the `AsyncRequest` is “installed”. This necessitates two changes: - The stopping flag (which was only used in one case and ignored in the other) is now a direct member of the `Environment` class. - Workers no longer have their own libuv handles, requiring manual management of their libuv ref count. As a drive-by fix, the `can_call_into_js` variable was turned into an atomic variable. While there have been no bug reports, the flag is set from `Stop(env)` calls, which are supposed to be possible from any thread.
Configuration menu - View commit details
-
Copy full SHA for 026aa74 - Browse repository at this point
Copy the full SHA 026aa74View commit details -
src: add interrupts to Environments/Workers
Allow doing what V8’s `v8::Isolate::RequestInterrupt()` does for V8. This also works when there is no JS code currently executing.
Configuration menu - View commit details
-
Copy full SHA for c01410a - Browse repository at this point
Copy the full SHA c01410aView commit details -
src: move MemoryInfo() for worker code to .cc files
This is a) the right thing to do anyway because these functions can not be inlined by the compiler and b) avoids compilation warnings in the following commit.
Configuration menu - View commit details
-
Copy full SHA for 1b3e183 - Browse repository at this point
Copy the full SHA 1b3e183View commit details -
report: add support for Workers
Include a report for each sub-Worker of the current Node.js instance. This adds a feature that is necessary for eventually making the report feature stable, as was discussed during the last collaborator summit. Refs: openjs-foundation/summit#240
Configuration menu - View commit details
-
Copy full SHA for 9de09f3 - Browse repository at this point
Copy the full SHA 9de09f3View commit details