зеркало из https://github.com/mozilla/pjs.git
Patch from Hannes Wallnoefer to fix regression with jsGet_ and jsSet_.
See https://bugzilla.mozilla.org/show_bug.cgi?id=404211#c3.
This commit is contained in:
Родитель
6ffae12985
Коммит
5949d5547c
|
@ -1149,9 +1149,9 @@ public abstract class ScriptableObject implements Scriptable, Serializable,
|
|||
}
|
||||
} else if (name.startsWith(getterPrefix)) {
|
||||
prefix = getterPrefix;
|
||||
} else if (name.startsWith(setterPrefix)) {
|
||||
prefix = setterPrefix;
|
||||
} else {
|
||||
// note that setterPrefix is among the unhandled names here -
|
||||
// we deal with that when we see the getter
|
||||
continue;
|
||||
}
|
||||
String propName = name.substring(prefix.length());
|
||||
|
@ -1161,8 +1161,6 @@ public abstract class ScriptableObject implements Scriptable, Serializable,
|
|||
}
|
||||
names.add(propName);
|
||||
name = name.substring(prefix.length());
|
||||
if (prefix == setterPrefix)
|
||||
continue; // deal with set when we see get
|
||||
if (prefix == getterPrefix) {
|
||||
if (!(proto instanceof ScriptableObject)) {
|
||||
throw Context.reportRuntimeError2(
|
||||
|
|
Загрузка…
Ссылка в новой задаче