Fix bug 33841.

This commit is contained in:
norris%netscape.com 2000-04-12 17:30:32 +00:00
parent 2535df76ae
commit 144d256be4

View File

@ -144,6 +144,13 @@ public class DynamicScopes {
// We can share the scope.
Scriptable threadScope = cx.newObject(scope);
threadScope.setPrototype(scope);
// We want "threadScope" to be a new top-level
// scope, so set its parent scope to null. This
// means that any variables created by assignments
// will be properties of "threadScope".
threadScope.setParentScope(null);
// Create a JavaScript property of the thread scope named
// 'x' and save a value for it.
threadScope.put("x", threadScope, x);