in the Function.apply() context selector, only add one-level of call strings when an ApplyContext is also being used
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4474 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
a34b8967e1
commit
fcf0aa824d
|
@ -31,7 +31,7 @@ public abstract class TestMediawikiCallGraphShape extends TestJSCallGraphShape {
|
|||
@Test public void testSwineFlu() throws IOException, IllegalArgumentException, CancelException {
|
||||
URL url = new URL("http://en.wikipedia.org/wiki/2009_swine_flu_outbreak");
|
||||
// don't handle call / apply; it makes things blow up
|
||||
CallGraph CG = Util.makeHTMLCG(url, false);
|
||||
CallGraph CG = Util.makeHTMLCG(url);
|
||||
verifyGraphAssertions(CG, assertionsForSwineFlu);
|
||||
}
|
||||
|
||||
|
|
|
@ -143,8 +143,6 @@ public class JavaScriptFunctionApplyContextSelector implements ContextSelector {
|
|||
IClass declaringClass = callee.getDeclaringClass();
|
||||
IMethod method = declaringClass.getMethod(AstMethodReference.fnSelector);
|
||||
Context baseCtxt = base.getCalleeTarget(caller, site, callee, receiver);
|
||||
if(USE_ONE_LEVEL_CALLSTRING)
|
||||
baseCtxt = new DelegatingContext(oneLevel.getCalleeTarget(caller, site, callee, receiver), baseCtxt);
|
||||
if (method != null) {
|
||||
String s = method.getReference().getDeclaringClass().getName().toString();
|
||||
if (s.equals("Lprologue.js/functionApply")) {
|
||||
|
@ -155,6 +153,8 @@ public class JavaScriptFunctionApplyContextSelector implements ContextSelector {
|
|||
isNonNullArray = true;
|
||||
}
|
||||
}
|
||||
if (USE_ONE_LEVEL_CALLSTRING)
|
||||
baseCtxt = new DelegatingContext(oneLevel.getCalleeTarget(caller, site, callee, receiver), baseCtxt);
|
||||
return new ApplyContext(baseCtxt, isNonNullArray);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue