diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /js/src/vm/JSContext-inl.h | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/vm/JSContext-inl.h')
-rw-r--r-- | js/src/vm/JSContext-inl.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/js/src/vm/JSContext-inl.h b/js/src/vm/JSContext-inl.h index f20c4b3c7d..252fefd88d 100644 --- a/js/src/vm/JSContext-inl.h +++ b/js/src/vm/JSContext-inl.h @@ -352,52 +352,6 @@ inline void JSContext::setRealmForJitExceptionHandler(JS::Realm* realm) { realm_ = realm; } -inline JSScript* JSContext::currentScript( - jsbytecode** ppc, AllowCrossRealm allowCrossRealm) const { - if (ppc) { - *ppc = nullptr; - } - - js::Activation* act = activation(); - if (!act) { - return nullptr; - } - - MOZ_ASSERT(act->cx() == this); - - // Cross-compartment implies cross-realm. - if (allowCrossRealm == AllowCrossRealm::DontAllow && - act->compartment() != compartment()) { - return nullptr; - } - - JSScript* script = nullptr; - jsbytecode* pc = nullptr; - if (act->isJit()) { - if (act->hasWasmExitFP()) { - return nullptr; - } - js::jit::GetPcScript(const_cast<JSContext*>(this), &script, &pc); - } else { - js::InterpreterFrame* fp = act->asInterpreter()->current(); - MOZ_ASSERT(!fp->runningInJit()); - script = fp->script(); - pc = act->asInterpreter()->regs().pc; - } - - MOZ_ASSERT(script->containsPC(pc)); - - if (allowCrossRealm == AllowCrossRealm::DontAllow && - script->realm() != realm()) { - return nullptr; - } - - if (ppc) { - *ppc = pc; - } - return script; -} - inline js::RuntimeCaches& JSContext::caches() { return runtime()->caches(); } template <typename T, js::AllowGC allowGC, typename... Args> |