Skip to content

Commit 3986783

Browse files
committed
start working on better scope handling
1 parent 093ec29 commit 3986783

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/htmlunit/javascript/JavaScriptEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private void init(final WebWindow webWindow, final Page page, final Context cont
210210
final Window jsWindowScope = new Window();
211211
jsWindowScope.setClassName("Window");
212212

213-
context.initSafeStandardObjects(jsWindowScope);
213+
final Scriptable scope = context.initSafeStandardObjects(jsWindowScope);
214214
configureRhino(webClient, browserVersion, jsWindowScope);
215215

216216
final Map<Class<? extends Scriptable>, Scriptable> prototypes = new HashMap<>();

src/main/java/org/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void jsConstructor() {
125125

126126
final BrowserVersion browserVersion = webClient.getBrowserVersion();
127127

128-
context.initSafeStandardObjects(this);
128+
final Scriptable scope = context.initSafeStandardObjects(this);
129129
JavaScriptEngine.configureRhino(webClient, browserVersion, this);
130130

131131
final WorkerJavaScriptConfiguration jsConfig = WorkerJavaScriptConfiguration.getInstance(browserVersion);

0 commit comments

Comments
 (0)