Skip to content

Commit 0a6072d

Browse files
author
zhourenjian
committed
Support multiple scripts loading for Opera 9.6+
1 parent 6d34e27 commit 0a6072d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sources/net.sf.j2s.java.core/src/java/lang/ClassLoader.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ ClazzLoader.isGecko = (ClazzLoader.userAgent.indexOf ("gecko") != -1);
203203
*/
204204
if (ClazzLoader.isOpera) {
205205
ClazzLoader.maxLoadingThreads = 1;
206+
var index = ClazzLoader.userAgent.indexOf ("opera/");
207+
if (index != -1) {
208+
var verNumber = 9.0;
209+
try {
210+
verNumber = parseFloat(ClazzLoader.userAgent.subString (index + 6));
211+
} catch (e) {}
212+
if (verNumber >= 9.6) {
213+
ClazzLoader.maxLoadingThreads = 6;
214+
}
215+
}
206216
}
207217

208218
/**

0 commit comments

Comments
 (0)