summaryrefslogtreecommitdiffstats
path: root/js/src/jsarray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsarray.cpp')
-rw-r--r--js/src/jsarray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp
index ff581beec..d28f5cb8e 100644
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -1662,11 +1662,11 @@ MatchNumericComparator(JSContext* cx, const Value& v)
if (!obj.is<JSFunction>())
return Match_None;
- JSFunction* fun = &obj.as<JSFunction>();
+ RootedFunction fun(cx, &obj.as<JSFunction>());
if (!fun->isInterpreted() || fun->isClassConstructor())
return Match_None;
- JSScript* script = fun->getOrCreateScript(cx);
+ JSScript* script = JSFunction::getOrCreateScript(cx, fun);
if (!script)
return Match_Failure;