8000 Adding XML to the optional excluded name · repos-javascript-compilers/rhino@f7b3f13 · GitHub
[go: up one dir, main page]

Skip to content

Commit f7b3f13

Browse files
committed
Adding XML to the optional excluded name
1 parent 33d49a9 commit f7b3f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/org/mozilla/javascript/serialize/ScriptableOutputStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public ScriptableOutputStream(OutputStream out, Scriptable scope)
9090
*/
9191
public void addOptionalExcludedName(String name) {
9292
Object obj = lookupQualifiedName(scope, name);
93-
if(obj != null) {
93+
if(obj != null && obj != UniqueTag.NOT_FOUND) {
9494
if (!(obj instanceof Scriptable)) {
9595
throw new IllegalArgumentException(
9696
"Object for excluded name " + name +
@@ -149,13 +149,13 @@ public void excludeStandardObjectNames() {
149149
"RegExp", "RegExp.prototype",
150150
"Script", "Script.prototype",
151151
"Continuation", "Continuation.prototype",
152-
"XML", "XML.prototype",
153152
};
154153
for (int i=0; i < names.length; i++) {
155154
addExcludedName(names[i]);
156155
}
157156

158157
String[] optionalNames = {
158+
"XML", "XML.prototype",
159159
"XMLList", "XMLList.prototype",
160160
};
161161
for (int i=0; i < optionalNames.length; i++) {

0 commit comments

Comments
 (0)
0