diff --git a/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java b/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java index 855088128e..23b5379804 100644 --- a/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java +++ b/src/main/java/org/htmlunit/javascript/JavaScriptEngine.java @@ -239,7 +239,7 @@ private void init(final WebWindow webWindow, final Page page, final Context cont configureConstantsPropertiesAndFunctions(windowConfig, window); - final HtmlUnitScriptable windowPrototype = configureClass(windowConfig, window, browserVersion); + final HtmlUnitScriptable windowPrototype = configureClass(windowConfig, window); window.setPrototype(windowPrototype); prototypes.put(windowConfig.getHostClass(), windowPrototype); prototypesPerJSName.put(windowConfig.getClassName(), windowPrototype); @@ -247,7 +247,7 @@ private void init(final WebWindow webWindow, final Page page, final Context cont // setup the prototypes for (final ClassConfiguration config : jsConfig_.getAll()) { if (windowConfig != config) { - final HtmlUnitScriptable prototype = configureClass(config, window, browserVersion); + final HtmlUnitScriptable prototype = configureClass(config, window); if (config.isJsObject()) { // Place object with prototype property in Window scope final HtmlUnitScriptable obj = config.getHostClass().getDeclaredConstructor().newInstance(); @@ -520,7 +520,6 @@ private static void removePrototypeProperties(final Scriptable scope, final Stri * Configures the specified class for access via JavaScript. * @param config the configuration settings for the class to be configured * @param window the scope within which to configure the class - * @param browserVersion the browser version * @throws InstantiationException if the new class cannot be instantiated * @throws IllegalAccessException if we don't have access to create the new instance * @return the created prototype @@ -529,8 +528,7 @@ private static void removePrototypeProperties(final Scriptable scope, final Stri * @throws InvocationTargetException * @throws IllegalArgumentException */ - public static HtmlUnitScriptable configureClass(final ClassConfiguration config, final Scriptable window, - final BrowserVersion browserVersion) + public static HtmlUnitScriptable configureClass(final ClassConfiguration config, final Scriptable window) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { final HtmlUnitScriptable prototype = config.getHostClass().getDeclaredConstructor().newInstance(); diff --git a/src/main/java/org/htmlunit/javascript/host/intl/Intl.java b/src/main/java/org/htmlunit/javascript/host/intl/Intl.java index 3fad3ce55a..b6611ef09d 100644 --- a/src/main/java/org/htmlunit/javascript/host/intl/Intl.java +++ b/src/main/java/org/htmlunit/javascript/host/intl/Intl.java @@ -48,7 +48,7 @@ public void defineProperties(final BrowserVersion browserVersion) { private void define(final Class c, final BrowserVersion browserVersion) { try { final ClassConfiguration config = AbstractJavaScriptConfiguration.getClassConfiguration(c, browserVersion); - final HtmlUnitScriptable prototype = JavaScriptEngine.configureClass(config, this, browserVersion); + final HtmlUnitScriptable prototype = JavaScriptEngine.configureClass(config, this); final FunctionObject functionObject = new RecursiveFunctionObject(config.getJsConstructor().getKey(), config.getJsConstructor().getValue(), this, browserVersion); diff --git a/src/main/java/org/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java b/src/main/java/org/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java index 55d2e767c6..940f162483 100644 --- a/src/main/java/org/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java +++ b/src/main/java/org/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java @@ -124,11 +124,11 @@ public void jsConstructor() { ClassConfiguration config = AbstractJavaScriptConfiguration.getClassConfiguration( (Class) DedicatedWorkerGlobalScope.class.getSuperclass(), browserVersion); - final HtmlUnitScriptable parentPrototype = JavaScriptEngine.configureClass(config, this, browserVersion); + final HtmlUnitScriptable parentPrototype = JavaScriptEngine.configureClass(config, this); config = AbstractJavaScriptConfiguration.getClassConfiguration( DedicatedWorkerGlobalScope.class, browserVersion); - final HtmlUnitScriptable prototype = JavaScriptEngine.configureClass(config, this, browserVersion); + final HtmlUnitScriptable prototype = JavaScriptEngine.configureClass(config, this); prototype.setPrototype(parentPrototype); setPrototype(prototype);