Skip to content

Commit 0fa1546

Browse files
committed
fix: improve scope handling (step 10)
1 parent 8614520 commit 0fa1546

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ public Scriptable getParentScope() {
154154
* {@inheritDoc}
155155
*/
156156
@Override
157-
public void setParentScope(final Scriptable parent) {
158-
wrapped_.setParentScope(parent);
157+
public void setParentScope(final Scriptable scope) {
158+
wrapped_.setParentScope(scope);
159159
}
160160

161161
/**

src/main/java/org/htmlunit/javascript/host/intl/Locale.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public Locale maximize() {
308308
.build();
309309

310310
final Locale l = new Locale(locale);
311-
l.setParentScope(getWindow(this));
311+
l.setParentScope(getTopLevelScope(this));
312312
l.setPrototype(this.getPrototype());
313313
return l;
314314
}
@@ -325,7 +325,7 @@ public Locale minimize() {
325325
.build();
326326

327327
final Locale l = new Locale(locale);
328-
l.setParentScope(getWindow(this));
328+
l.setParentScope(getTopLevelScope(this));
329329
l.setPrototype(this.getPrototype());
330330
return l;
331331
}

0 commit comments

Comments
 (0)