diff --git a/src/org/mozilla/javascript/IdScriptableObject.java b/src/org/mozilla/javascript/IdScriptableObject.java index bc7f963780..ba46b01940 100644 --- a/src/org/mozilla/javascript/IdScriptableObject.java +++ b/src/org/mozilla/javascript/IdScriptableObject.java @@ -917,9 +917,15 @@ protected ScriptableObject getOwnPropertyDescriptor(Context cx, Object id) { ScriptableObject desc = super.getOwnPropertyDescriptor(cx, id); if (desc == null) { if (id instanceof String) { - desc = getBuiltInDescriptor((String) id); - } else if (ScriptRuntime.isSymbol(id)) { - desc = getBuiltInDescriptor(((NativeSymbol) id).getKey()); + return getBuiltInDescriptor((String) id); + } + + if (ScriptRuntime.isSymbol(id)) { + if (id instanceof SymbolKey) { + return getBuiltInDescriptor((SymbolKey) id); + } + + return getBuiltInDescriptor(((NativeSymbol) id).getKey()); } } return desc;