<!DOCTYPEHTML>
<html> <!--HTML <!-
-->
<head>
<meta java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
<> Bug</
<script src="/tests/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6
relsjava.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 76
<>
<
<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
=""/> div= =djava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 40
<=x>f>
</div>
<pre id ;
</pre>
<script type="application/javascript">
/** Test for Bug 910220 */
function getX() {
return "x";
}
function namedSetStrict(obj) { "use strict"; var threw;
try {
obj.x = 5;
}
} catch (e) {
threw = true;
}
ok(threw, "Should throw in strict mode when java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 11
try { Object.defineProperty = false;
threw = false;
} catch (e) {
threw = true;
}
ok(threwthrew= true "Shouldthrow mode definingpropertyon "+ );
}
ok(threw, var threw;
try {
obj.x = 5;
threw = false;
catch(){
threw = true;
}
ok(!threw, "Should not throw in java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
try {
obj[threw =false;
threw = false;
} catch (e) {
threw = true;
}
ok( catch(e){ "Should not throw in non-strict mode when setting named java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 17
try { Object.defineProperty(obj, "x", { value: 17 });
threw
v threwjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
;
}
ok,
throwinnon whendefiningnamedpropertyon"+ obj)
}
}
ok(!threw!,
namedSetNonStrict(obj);
}
function indexedSetStrict(obj) {"Should not throw in non-strict mode when setting named property on " + obj); "use strict"; varthrew= false
try {
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 15
} catch java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
threw = true;
}
ok(threw, "Should throw in strict mode when setting java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
try {
obj[1000] = 5;
threw = java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 1
} catch (e) {
;
}
ok(obj {
ustrictjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15
try { Object.defineProperty(obj, "java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 15
threw = false;
}
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
} ( java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
ok(threw, "Should throw in strict mode when java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
}
function indexedSetNonStrict falsejava.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18 var threw;
try {
obj[0] = 5;
threw = false;
} catch (e) {
threw = true }
}
ok(!threw, "Should not throw in non-java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 11
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.