diff --git a/js/src/vm/JSContext-inl.h b/js/src/vm/JSContext-inl.h index 1d3bb19be94c..4005f7ad0961 100644 --- a/js/src/vm/JSContext-inl.h +++ b/js/src/vm/JSContext-inl.h @@ -155,10 +155,9 @@ class ContextChecks void check(JSScript* script, int argIndex) { MOZ_ASSERT(JS::CellIsNotGray(script)); if (script) - check(script->compartment(), argIndex); + check(script->realm(), argIndex); } - void check(InterpreterFrame* fp, int argIndex); void check(AbstractFramePtr frame, int argIndex); void check(Handle desc, int argIndex) { diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp index faac53ad3274..ffb7f4c6b2bd 100644 --- a/js/src/vm/JSContext.cpp +++ b/js/src/vm/JSContext.cpp @@ -1561,18 +1561,11 @@ JS::AutoCheckRequestDepth::~AutoCheckRequestDepth() #endif #ifdef JS_CRASH_DIAGNOSTICS -void -ContextChecks::check(InterpreterFrame* fp, int argIndex) -{ - if (fp) - check(fp->environmentChain(), argIndex); -} - void ContextChecks::check(AbstractFramePtr frame, int argIndex) { if (frame) - check(frame.environmentChain(), argIndex); + check(frame.realm(), argIndex); } #endif