aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ScriptExecutionContext.h
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-07-11 12:48:46 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-11 12:48:46 -0700
commit5c8726d602fe73e49d027194fef65b9432872c8b (patch)
treef0ee8944aed349aee715820053fae4ca4aa16688 /src/bun.js/bindings/ScriptExecutionContext.h
parentae7bc37e94185726196a9cf77850379390904d4a (diff)
downloadbun-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.h8
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)
{