From 1f7a7a5a7c94adfe6014034e7c7b7d4c1b6f75bf Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sat, 8 Jun 2019 18:54:17 -0400 Subject: 1320408 - Part 2: Change JSFunction::getOrCreateScript to static method. --- js/src/jsopcode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'js/src/jsopcode.cpp') diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index 6adb5401ea..b6897908b9 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -2214,6 +2214,7 @@ GenerateLcovInfo(JSContext* cx, JSCompartment* comp, GenericPrinter& out) return false; RootedScript script(cx); + RootedFunction fun(cx); do { script = queue.popCopy(); compCover.collectCodeCoverageInfo(comp, script->sourceObject(), script); @@ -2231,15 +2232,15 @@ GenerateLcovInfo(JSContext* cx, JSCompartment* comp, GenericPrinter& out) // Only continue on JSFunction objects. if (!obj->is()) continue; - JSFunction& fun = obj->as(); + fun = &obj->as(); // Let's skip wasm for now. - if (!fun.isInterpreted()) + if (!fun->isInterpreted()) continue; // Queue the script in the list of script associated to the // current source. - JSScript* childScript = fun.getOrCreateScript(cx); + JSScript* childScript = JSFunction::getOrCreateScript(cx, fun); if (!childScript || !queue.append(childScript)) return false; } -- cgit v1.2.3