View | Details | Raw Unified | Return to bug 205569 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/dlkt/javascript/dom/support/internal/DOMResolver.java (-6 / +14 lines)
Lines 148-161 Link Here
148
		return mp;
148
		return mp;
149
	}
149
	}
150
150
151
	private Object[] fillMap(HashMap mp, ScriptableObject resolveTopLevelScope) {
151
	private Object[] fillMap(HashMap mp, Scriptable resolveTopLevelScope) {
152
		Scriptable prototype = resolveTopLevelScope.getPrototype();
152
		Scriptable prototype = resolveTopLevelScope.getPrototype();
153
		if (prototype != null) {
153
		if (prototype != null) {
154
			if (prototype instanceof ScriptableObject) {
154
			if (prototype instanceof Scriptable) {
155
				fillMap(mp, (ScriptableObject) prototype);
155
				fillMap(mp, prototype);
156
			}
156
			}
157
		}
157
		}
158
		Object[] allIds = resolveTopLevelScope.getAllIds();
158
		Object[] allIds = null;
159
		if (resolveTopLevelScope instanceof ScriptableObject && false)
160
		{
161
			allIds = ((ScriptableObject)resolveTopLevelScope).getAllIds();
162
		}
163
		else
164
		{
165
			allIds = resolveTopLevelScope.getIds();
166
		}
159
		for (int b = 0; b < allIds.length; b++) {
167
		for (int b = 0; b < allIds.length; b++) {
160
			String key = allIds[b].toString();
168
			String key = allIds[b].toString();
161
			try {
169
			try {
Lines 203-210 Link Here
203
		} else {
211
		} else {
204
			while (pos != -1) {
212
			while (pos != -1) {
205
				Object object = globals.get(key);
213
				Object object = globals.get(key);
206
				if (object instanceof ScriptableObject) {
214
				if (object instanceof Scriptable) {
207
					ScriptableObject sc = (ScriptableObject) object;
215
					Scriptable sc = (Scriptable) object;
208
					globals.clear();
216
					globals.clear();
209
					fillMap(globals, sc);
217
					fillMap(globals, sc);
210
				}
218
				}

Return to bug 205569