summaryrefslogtreecommitdiffstats
path: root/js/src/jsscriptinlines.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-10 11:39:27 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-10 11:39:27 +0100
commit974a481d12bf430891725bd3662876358e57e11a (patch)
treecad011151456251fef2f1b8d02ef4b4e45fad61a /js/src/jsscriptinlines.h
parent6bd66b1728eeddb058066edda740aaeb2ceaec23 (diff)
parent736d25cbec4541186ed46c935c117ce4d1c7f3bb (diff)
downloadUXP-974a481d12bf430891725bd3662876358e57e11a.tar
UXP-974a481d12bf430891725bd3662876358e57e11a.tar.gz
UXP-974a481d12bf430891725bd3662876358e57e11a.tar.lz
UXP-974a481d12bf430891725bd3662876358e57e11a.tar.xz
UXP-974a481d12bf430891725bd3662876358e57e11a.zip
Merge branch 'master' into js-modules
# Conflicts: # modules/libpref/init/all.js
Diffstat (limited to 'js/src/jsscriptinlines.h')
-rw-r--r--js/src/jsscriptinlines.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/jsscriptinlines.h b/js/src/jsscriptinlines.h
index da23804ac..e1052111b 100644
--- a/js/src/jsscriptinlines.h
+++ b/js/src/jsscriptinlines.h
@@ -74,13 +74,13 @@ void
SetFrameArgumentsObject(JSContext* cx, AbstractFramePtr frame,
HandleScript script, JSObject* argsobj);
-inline JSFunction*
-LazyScript::functionDelazifying(JSContext* cx) const
+/* static */ inline JSFunction*
+LazyScript::functionDelazifying(JSContext* cx, Handle<LazyScript*> script)
{
- Rooted<const LazyScript*> self(cx, this);
- if (self->function_ && !self->function_->getOrCreateScript(cx))
+ RootedFunction fun(cx, script->function_);
+ if (script->function_ && !JSFunction::getOrCreateScript(cx, fun))
return nullptr;
- return self->function_;
+ return script->function_;
}
} // namespace js
@@ -100,7 +100,7 @@ JSScript::functionDelazifying() const
}
inline void
-JSScript::ensureNonLazyCanonicalFunction(JSContext* cx)
+JSScript::ensureNonLazyCanonicalFunction()
{
// Infallibly delazify the canonical script.
JSFunction* fun = function();