|
42 | 42 | import org.htmlunit.corejs.javascript.Function; |
43 | 43 | import org.htmlunit.corejs.javascript.Script; |
44 | 44 | import org.htmlunit.corejs.javascript.Scriptable; |
| 45 | +import org.htmlunit.corejs.javascript.VarScope; |
45 | 46 | import org.htmlunit.html.DomNode; |
46 | 47 | import org.htmlunit.html.HtmlButtonInput; |
47 | 48 | import org.htmlunit.html.HtmlElement; |
@@ -859,22 +860,22 @@ protected CountingJavaScriptEngine(final WebClient client) { |
859 | 860 | /** {@inheritDoc} */ |
860 | 861 | @Override |
861 | 862 | public Object execute( |
862 | | - final HtmlPage page, final Scriptable scope, |
| 863 | + final HtmlPage page, final VarScope scope, |
863 | 864 | final String sourceCode, final String sourceName, final int startLine) { |
864 | 865 | scriptExecutionCount_++; |
865 | 866 | return super.execute(page, scope, sourceCode, sourceName, startLine); |
866 | 867 | } |
867 | 868 |
|
868 | 869 | /** {@inheritDoc} */ |
869 | 870 | @Override |
870 | | - public Object execute(final HtmlPage page, final Scriptable scope, final Script script) { |
| 871 | + public Object execute(final HtmlPage page, final VarScope scope, final Script script) { |
871 | 872 | scriptExecuteScriptCount_++; |
872 | 873 | return super.execute(page, scope, script); |
873 | 874 | } |
874 | 875 |
|
875 | 876 | /** {@inheritDoc} */ |
876 | 877 | @Override |
877 | | - public Script compile(final HtmlPage page, final Scriptable scope, |
| 878 | + public Script compile(final HtmlPage page, final VarScope scope, |
878 | 879 | final String sourceCode, final String sourceName, final int startLine) { |
879 | 880 | scriptCompileCount_++; |
880 | 881 | return super.compile(page, scope, sourceCode, sourceName, startLine); |
@@ -1029,7 +1030,7 @@ private HtmlPage loadPageAndCollectScripts(final String html, final List<String> |
1029 | 1030 | final WebClient client = getWebClient(); |
1030 | 1031 | client.setJavaScriptEngine(new JavaScriptEngine(client) { |
1031 | 1032 | @Override |
1032 | | - public Object execute(final HtmlPage htmlPage, final Scriptable scope, |
| 1033 | + public Object execute(final HtmlPage htmlPage, final VarScope scope, |
1033 | 1034 | final String sourceCode, final String sourceName, final int startLine) { |
1034 | 1035 | collectedScripts.add(sourceCode); |
1035 | 1036 | return null; |
|
0 commit comments