Jacek Caban : jscript: Don't use break in finally block on pre-IE8 jscript.
Alexandre Julliard
julliard at winehq.org
Thu Jan 12 13:19:24 CST 2012
Module: wine
Branch: master
Commit: e7bb8813a9ed674e2b40163966abd96f9c525c69
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e7bb8813a9ed674e2b40163966abd96f9c525c69
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jan 12 13:43:25 2012 +0100
jscript: Don't use break in finally block on pre-IE8 jscript.
---
dlls/jscript/tests/lang.js | 51 +++++++++++++++++++++++--------------------
1 files changed, 27 insertions(+), 24 deletions(-)
diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js
index 58d4599..a035ebe 100644
--- a/dlls/jscript/tests/lang.js
+++ b/dlls/jscript/tests/lang.js
@@ -842,34 +842,37 @@ ok(!("nonexistent" in obj1), "nonexistent added to obj1 by for..in loop");
var i, j;
-tmp = "";
-i = 0;
-while(true) {
- tmp += "1";
- for(i = 1; i < 3; i++) {
- switch(i) {
- case 1:
- tmp += "2";
- continue;
- case 2:
- tmp += "3";
- try {
- throw null;
- }finally {
- tmp += "4";
- break;
+/* Previous versions have broken finally block implementation */
+if(ScriptEngineMinorVersion() >= 8) {
+ tmp = "";
+ i = 0;
+ while(true) {
+ tmp += "1";
+ for(i = 1; i < 3; i++) {
+ switch(i) {
+ case 1:
+ tmp += "2";
+ continue;
+ case 2:
+ tmp += "3";
+ try {
+ throw null;
+ }finally {
+ tmp += "4";
+ break;
+ }
+ default:
+ ok(false, "unexpected state");
}
- default:
- ok(false, "unexpected state");
+ tmp += "5";
+ }
+ with({prop: "6"}) {
+ tmp += prop;
+ break;
}
- tmp += "5";
- }
- with({prop: "6"}) {
- tmp += prop;
- break;
}
+ ok(tmp === "123456", "tmp = " + tmp);
}
-ok(tmp === "123456", "tmp = " + tmp);
tmp = "";
i = 0;
More information about the wine-cvs
mailing list