private List<Variable> calculateFunctionScopesVariable(JsObject jsObject) {
JsFunction asFunction = jsObject.asFunction();
if (asFunction == null) {
return null;
}
FunctionScopeExtension functionScopeExtension =
getConnectedData().getJavascriptVm().getFunctionScopeExtension();
if (functionScopeExtension == null) {
return null;
}
if (functionScopeExtension.getScopes(asFunction).isEmpty()) {
return null;
}
Variable functionScopesVariable =
Variable.forFunctionScopes(getEvaluateContext(), asFunction, functionScopeExtension);
if (functionScopesVariable == null) {