diff options
author | 2023-07-11 12:48:46 -0700 | |
---|---|---|
committer | 2023-07-11 12:48:46 -0700 | |
commit | 5c8726d602fe73e49d027194fef65b9432872c8b (patch) | |
tree | f0ee8944aed349aee715820053fae4ca4aa16688 /src/bun.js/bindings/ScriptExecutionContext.h | |
parent | ae7bc37e94185726196a9cf77850379390904d4a (diff) | |
download | bun-5c8726d602fe73e49d027194fef65b9432872c8b.tar.gz bun-5c8726d602fe73e49d027194fef65b9432872c8b.tar.zst bun-5c8726d602fe73e49d027194fef65b9432872c8b.zip |
process signal events (#3569)
* signal events
* simple tests
* ignore SIGSTOP
* better tests
* use `EventEmitter`
* use `Bun__getDefaultGlobal`
* progress
* don't use 'Bun__getDefaultGlobal`
* fix tests
* remove signals from map
* update tests
* don't overwrite event emitter methods
* avoid two lookups
* use `std::once`
* releaseEarly()
* Remove signal handler after use
* Update call-raise.js
* Create process-signal-handler.fixture.js
* Don't register duplicates
* Add missing lock
* another test
* update test
* revert some changes
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/ScriptExecutionContext.h')
-rw-r--r-- | src/bun.js/bindings/ScriptExecutionContext.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bun.js/bindings/ScriptExecutionContext.h b/src/bun.js/bindings/ScriptExecutionContext.h index 5f6c56a90..aed7977a5 100644 --- a/src/bun.js/bindings/ScriptExecutionContext.h +++ b/src/bun.js/bindings/ScriptExecutionContext.h @@ -96,7 +96,12 @@ public: } } - const WTF::URL& url() const { return m_url; } + static ScriptExecutionContext* getScriptExecutionContext(ScriptExecutionContextIdentifier identifier); + + const WTF::URL& url() const + { + return m_url; + } bool activeDOMObjectsAreSuspended() { return false; } bool activeDOMObjectsAreStopped() { return false; } bool isContextThread() { return true; } @@ -141,6 +146,7 @@ public: auto* task = new EventLoopTask(WTFMove(lambda)); postTaskOnTimeout(task, timeout); } + template<typename... Arguments> void postCrossThreadTask(Arguments&&... arguments) { |