Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15096 closed defect (fixed)

Opera 11.62 bug

Reported by: sallyx Owned by: Rawld Gill
Priority: undecided Milestone: 1.8
Component: Loader Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Dojo not work in a new Opera version 11.62 (Linux):

Uncaught exception: Error: WRONG_THIS_ERR
Error thrown at line 15, column 1316 in <anonymous function: req.has>(_19) in /js/dojo-release-1.7.2/dojo/dojo.js:
    return _1a[_19]=_6(_1a[_19])?_1a[_19](_17,doc,_18):_1a[_19];
called from line 15, column 32154 in <anonymous function>(_fe, _ff, _100, _101) in /js/dojo-release-1.7.2/dojo/dojo.js:
    if(!has("ie-event-behavior"))
called from line 15, column 16056 in <anonymous function>(_1, _2) in /js/dojo-release-1.7.2/dojo/dojo.js:
    var _fd=function(_fe,_ff,_100,_101){if(!has("ie-event-behavior")){_fe.addEventListener(_ff,_101,false);return function(){_fe.removeEventListener(_ff,_101,false);};}else{_fe.attachEvent(_100,_101);return function(){_fe.detachEvent(_100,_101);};}},_102=_fd(window,"load","onload",function(){req.pageLoaded=1;doc.readyState!="complete"&&(doc.readyState="complete");_102();});
called from line 15, column 0 in /js/dojo-release-1.7.2/dojo/dojo.js:
    (function(_1,_2){var _3=function(){},_4=function(it){for(var p in it){return 0;}return 1;},_5={}.toString,_6=function(it){return _5.call(it)=="[object Function]";},_7=function(it){return _5.call(it)=="[object String]";},_8=function(it){return _5.call(it)=="[object Array]";},_9=function(_a,_b){if(_a){for(var i=0;i<_a.length;){_b(_a[i++]);}}},_c=function(_d,_e){for(var p in _e){_d[p]=_e[p];}return _d;},_f=function(_10,_11){return _c(new Error(_10),{src:"dojoLoader",info:_11});},_12=1,uid=function(){return "_"+_12++;},req=function(_13,_14,_15){return _16(_13,_14,_15,0,req);},_17=this,doc=_17.document,_18=doc&&doc.createElement("DiV"),has=req.has=function(_19){return _1a[_19]=_6(_1a[_19])?_1a[_19](_17,doc,_18):_1a[_19];},_1a=has.cache=_2.hasCache;has.add=function(_1b,_1c,now,_1d){(_1a[_1b]===undefined||_1d)&&(_1a[_1b]=_1c);return now&&has(_1b);};false&&has.add("host-node",typeof process=="object"&&/node(\.exe)?$/.test(process.execPath));if(0){require("./_base/configNode.js").config(_2);_2.loaderPatch.nodeRequire=require;}false&&has.add("host-rhino",typeof load=="function"&&(typeof Packages=="function"||typeof Packages=="object"));if(0){for(var _1e=_1.baseUrl||".",arg,_1f=this.arguments,i=0;i<_1f.length;){arg=(_1f[i++]+"").split("=");if(arg[0]=="baseUrl"){_1e=arg[1];break;}}load(_1e+"/_base/configRhino.js");rhinoDojoConfig(_2,_1e,_1f);}for(var p in _1.has){has.add(p,_1.has[p],0,1);}var _20=1,_21=2,_22=3,_23=4,_24=5;if(0){_20="requested";_21="arrived";_22="not-a-module";_23="executing";_24="executed";}var _25=0,_26="sync",xd="xd",_27=[],_28=0,_29=_3,_2a=_3,_2b;if(1){req.isXdUrl=_3;req.initSyncLoader=function(_2c,_2d,_2e){if(!_28){_28=_2c;_29=_2d;_2a=_2e;}return {sync:_26,xd:xd,arrived:_21,nonmodule:_22,executing:_23,executed:_24,syncExecStack:_27,modules:_2f,execQ:_30,getModule:_31,injectModule:_32,setArrived:_33,signal:_34,finishExec:_35,execModule:_36,dojoRequirePlugin:_28,getLegacyMode:function(){return _25;},holdIdle:function(){_73++;},releaseIdle:function(){_37();}};};if(1){var _38=location.protocol,_39=location.host,_3a=!_39;req.isXdUrl=function(url){if(_3a||/^\./.test(url)){return false;}if(/^\/\//.test(url)){return true;}var _3b=url.match(/^([^\/\:]+\:)\/\/([^\/]+)/);return _3b&&(_3b[1]!=_38||_3b[2]!=_39);};true||has.add("dojo-xhr-factory",1);has.add("dojo-force-activex-xhr",1&&!doc.addEventListener&&window.location.protocol=="file:");has.add("native-xhr",typeof XMLHttpRequest!="undefined");if(has("native-xhr")&&!has("dojo-force-activex-xhr")){_2b=function(){return new XMLHttpRequest();};}else{for(var _3c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],_3d,i=0;i<3;){try{_3d=_3c[i++];if(new ActiveXObject(_3d)){break;}}catch(e){}}_2b=function(){return new ActiveXObject(_3d);};}req.getXhr=_2b;has.add("dojo-gettext-api",1);req.getText=function(url,_3e,_3f){var xhr=_2b();xhr.open("GET",_40(url),false);xhr.send(null);if(xhr.status==200||(!location.host&&!xhr.status)){if(_3f){_3f(xhr.responseText,_3e);}}else{throw _f("xhrFailed",xhr.status);}return xhr.responseText;};}}else{req.async=1;}var _41=new Function("__text","return eval(__text);");req.eval=function(_42,_43){return _41(_42+"\r\n////@ sourceURL="+_43);};var _44={},_45="error",_34=req.signal=function(_46,_47){var _48=_44[_46];_9(_48&&_48.slice(0),function(_49){_49.apply(null,_8(_47)?_47:[_47]);});},on=req.on=function(_4a,_4b){var _4c=_44[_4a]||(_44[_4a]=[]);_4c.push(_4b);return {remove:function(){for(var i=0;i<_4c.length;i++){if(_4c[i]===_4b){_4c.splice(i,1);return;}}}};};var _4d=[],_4e={},_4f=[],_50={},_51={},_52=[],_2f={},_53="",_54={},_55={},_56={};if(1){var _57=function(_58){for(var p in _55){var _59=p.match(/^url\:(.+)/);if(_59){_54[_5a(_59[1],_58)]=_55[p];}else{if(p!="*noref"){_54[_5b(p,_58).mid]=_55[p];}}}_55={};},_5c=function(map,_5d,_5e){_5d.splice(0,_5d.length);var p,i,_5f,_60=0;for(p in map){_5d.push([p,map[p]]);if(map[p]==_5e){_60=p;}}_5d.sort(function(lhs,rhs){return rhs[0].length-lhs[0].length;});for(i=0;i<_5d.length;){_5f=_5d[i++];_5f[2]=new RegExp("^"+_5f[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){return "\\"+c;})+"(/|$)");_5f[3]=_5f[0].length+1;}return _60;},_61=function(_62,_63){var _64=_62.name;if(!_64){_64=_62;_62={name:_64};}_62=_c({main:"main",mapProg:[]},_62);_62.location=(_63||"")+(_62.location?_62.location:_64);_62.reverseName=_5c(_62.packageMap,_62.mapProg,_64);if(!_62.main.indexOf("./")){_62.main=_62.main.substring(2);}_c(_4e,_62.paths);_50[_64]=_62;_51[_64]=_64;},_65=function(_66,_67){for(var p in _66){if(p=="waitSeconds"){req.waitms=(_66[p]||0)*1000;}if(p=="cacheBust"){_53=_66[p]?(_7(_66[p])?_66[p]:(new Date()).getTime()+""):"";}if(p=="baseUrl"||p=="combo"){req[p]=_66[p];}if(1&&p=="async"){var _68=_66[p];req.legacyMode=_25=(_7(_68)&&/sync|legacyAsync/.test(_68)?_68:(!_68?"sync":false));req.async=!_25;}if(_66[p]!==_1a){req.rawConfig[p]=_66[p];p!="has"&&has.add("config-"+p,_66[p],0,_67);}}if(!req.baseUrl){req.baseUrl="./";}if(!/\/$/.test(req.baseUrl)){req.baseUrl+="/";}for(p in _66.has){has.add(p,_66.has[p],0,_67);}_9(_66.packages,_61);for(_1e in _66.packagePaths){_9(_66.packagePaths[_1e],function(_69){_61(_69,_1e+"/");});}_5c(_c(_4e,_66.paths),_4f);_9(_66.aliases,function(_6a){if(_7(_6a[0])){_6a[0]=new RegExp("^"+_6a[0].replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){return "\\"+c;})+"$");}_4d.push(_6a);});_5c(_c(_51,_66.packageMap),_52);if(_66.cache){_57();_55=_66.cache;if(_66.cache["*noref"]){_57();}}_34("config",[_66,req.rawConfig]);};if(1){for(var src,_6b,_6c=doc.getElementsByTagName("script"),i=0;i<_6c.length&&!_6b;i++){if((src=_6c[i].getAttribute("src"))&&(_6b=src.match(/(.*)\/?dojo\.js(\W|$)/i))){_1.baseUrl=_1.baseUrl||_2.baseUrl||_6b[1];src=(_6c[i].getAttribute("data-dojo-config")||_6c[i].getAttribute("djConfig"));if(src){_56=req.eval("({ "+src+" })","data-dojo-config");}if(0){var _6d=_6c[i].getAttribute("data-main");if(_6d){_56.deps=_56.deps||[_6d];}}}}}if(0){try{if(window.parent!=window&&window.parent.require){var doh=window.parent.require("doh");doh&&_c(_56,doh.testConfig);}}catch(e){}}req.rawConfig={};_65(_2,1);_65(_1,1);_65(_56,1);}else{_4e=_2.paths;_4f=_2.pathsMapProg;_50=_2.packs;_4d=_2.aliases;_51=_2.packageMap;_52=_2.packageMapProg;_2f=_2.modules;_54=_2.cache;_53=_2.cacheBust;req.rawConfig=_2;}if(0){req.combo=req.combo||{add:_3};var _6e=0,_6f=[],_70=null;}var _71=function(_72){_73++;_9(_72.deps,_32);if(0&&_6e&&!_70){_70=setTimeout(function(){_6e=0;_70=null;req.combo.done(function(_74,url){var _75=function(){_76(0,_74);_77();};_6f.push(_74);_78=_74;req.injectUrl(url,_75,_74);_78=0;},req);},0);}_37();},_16=function(a1,a2,a3,_79,_7a){var _7b,_7c;if(_7(a1)){_7b=_31(a1,_79,true);if(_7b&&_7b.executed){return _7b.result;}throw _f("undefinedModule",a1);}if(!_8(a1)){_65(a1);a1=a2;a2=a3;}if(_8(a1)){_7c="require*"+uid();for(var mid,_7d=[],i=0;i<a1.length;){mid=a1[i++];if(mid in {exports:1,module:1}){throw _f("illegalModuleId",mid);}_7d.push(_31(mid,_79));}_7b=_c(_7e("",_7c,0,""),{injected:_21,deps:_7d,def:a2||_3,require:_79?_79.require:req});_2f[_7b.mid]=_7b;_71(_7b);var _7f=_73&&req.async;_73++;_36(_7b,_7f);_37();if(!_7b.executed){_30.push(_7b);}_77();}return _7a;},_80=function(_81){if(!_81){return req;}var _82=_81.require;if(!_82){_82=function(a1,a2,a3){return _16(a1,a2,a3,_81,_82);};_81.require=_c(_82,req);_82.module=_81;_82.toUrl=function(_83){return _5a(_83,_81);};_82.toAbsMid=function(mid){return _ae(mid,_81);};if(0){_82.undef=function(mid){req.undef(mid,_81);};}}return _82;},_30=[],_84=[],_85={},_86=function(_87){_87.injected=_20;_85[_87.mid]=1;if(_87.url){_85[_87.url]=_87.pack||1;}},_33=function(_88){_88.injected=_21;delete _85[_88.mid];if(_88.url){delete _85[_88.url];}if(_4(_85)){_89();1&&_25==xd&&(_25=_26);}},_8a=req.idle=function(){return !_84.length&&_4(_85)&&!_30.length&&!_73;},_8b=function(_8c,map){for(var i=0;i<map.length;i++){if(map[i][2].test(_8c)){return map[i];}}return 0;},_8d=function(_8e){var _8f=[],_90,_91;_8e=_8e.replace(/\\/g,"/").split("/");while(_8e.length){_90=_8e.shift();if(_90==".."&&_8f.length&&_91!=".."){_8f.pop();_91=_8f[_8f.length-1];}else{if(_90!="."){_8f.push(_91=_90);}}}return _8f.join("/");},_7e=function(pid,mid,_92,url,_93){if(1){var xd=req.isXdUrl(url);return {pid:pid,mid:mid,pack:_92,url:url,executed:0,def:0,isXd:xd,isAmd:!!(xd||(_50[pid]&&_50[pid].isAmd)),cacheId:_93};}else{return {pid:pid,mid:mid,pack:_92,url:url,executed:0,def:0,cacheId:_93};}},_94=function(mid,_95,_96,_97,_98,_99,_9a,_9b){var pid,_9c,_9d,_9e,_9f,_a0,url,_a1,_a2,_a3,_a4=0;_a3=mid;_a2=/^\./.test(mid);if(/(^\/)|(\:)|(\.js$)/.test(mid)||(_a2&&!_95)){return _7e(0,mid,0,mid);}else{mid=_8d(_a2?(_95.mid+"/../"+mid):mid);if(/^\./.test(mid)){throw _f("irrationalPath",mid);}_9e=_95&&_95.pack&&_95.pack.mapProg;_9f=(_9e&&_8b(mid,_9e))||_8b(mid,_99);if(_9f){pid=_9f[1];mid=mid.substring(_9f[3]);_9c=_96[pid];if(!mid){mid=_9c.main;}_9d=mid;_a4=_9c.reverseName+"/"+mid;mid=pid+"/"+mid;}else{pid="";}var _a5=0,_a6=0;_9(_4d,function(_a7){var _a8=mid.match(_a7[0]);if(_a8&&_a8.length>_a5){_a6=_6(_a7[1])?mid.replace(_a7[0],_a7[1]):_a7[1];}});if(_a6){return _94(_a6,0,_96,_97,_98,_99,_9a,_9b);}_a1=_97[mid];if(_a1){return _9b?_7e(_a1.pid,_a1.mid,_a1.pack,_a1.url,_a4):_97[mid];}}_9f=_8b(mid,_9a);if(_9f){url=_9f[1]+mid.substring(_9f[3]-1);}else{if(pid){url=_9c.location+"/"+_9d;}else{if(has("config-tlmSiblingOfDojo")){url="../"+mid;}else{url=mid;}}}if(!(/(^\/)|(\:)/.test(url))){url=_98+url;}url+=".js";return _7e(pid,mid,_9c,_8d(url),_a4);},_5b=function(mid,_a9){return _94(mid,_a9,_50,_2f,req.baseUrl,_52,_4f);},_aa=function(_ab,_ac,_ad){return _ab.normalize?_ab.normalize(_ac,function(mid){return _ae(mid,_ad);}):_ae(_ac,_ad);},_af=0,_31=function(mid,_b0,_b1){var _b2,_b3,_b4,_b5;_b2=mid.match(/^(.+?)\!(.*)$/);if(_b2){_b3=_31(_b2[1],_b0,_b1);if(1&&_25==_26&&!_b3.executed){_32(_b3);if(_b3.injected===_21&&!_b3.executed){_73++;_36(_b3);_37();}if(_b3.executed){_b6(_b3);}else{_30.unshift(_b3);}}if(_b3.executed===_24&&!_b3.load){_b6(_b3);}if(_b3.load){_b4=_aa(_b3,_b2[2],_b0);mid=(_b3.mid+"!"+(_b3.dynamic?++_af+"!":"")+_b4);}else{_b4=_b2[2];mid=_b3.mid+"!"+(++_af)+"!waitingForPlugin";}_b5={plugin:_b3,mid:mid,req:_80(_b0),prid:_b4};}else{_b5=_5b(mid,_b0);}return _2f[_b5.mid]||(!_b1&&(_2f[_b5.mid]=_b5));},_ae=req.toAbsMid=function(mid,_b7){return _5b(mid,_b7).mid;},_5a=req.toUrl=function(_b8,_b9){var _ba=_b8.match(/(.+)(\.[^\/\.]+?)$/),_bb=(_ba&&_ba[1])||_b8,ext=(_ba&&_ba[2])||"",_bc=_5b(_bb,_b9),url=_bc.url;url=typeof _bc.pid=="string"?url.substring(0,url.length-3):url;return _40(url+ext);},_bd={injected:_21,executed:_24,def:_22,result:_22},_be=function(mid){return _2f[mid]=_c({mid:mid},_bd);},_bf=_be("require"),_c0=_be("exports"),_c1=_be("module"),_c2=function(_c3,_c4){req.trace("loader-run-factory",[_c3.mid]);var _c5=_c3.def,_c6;1&&_27.unshift(_c3);if(has("config-dojo-loader-catches")){try{_c6=_6(_c5)?_c5.apply(null,_c4):_c5;}catch(e){_34(_45,_c3.result=_f("factoryThrew",[_c3,e]));}}else{_c6=_6(_c5)?_c5.apply(null,_c4):_c5;}_c3.result=_c6===undefined&&_c3.cjs?_c3.cjs.exports:_c6;1&&_27.shift(_c3);},_c7={},_c8=0,_b6=function(_c9){var _ca=_c9.result;_c9.dynamic=_ca.dynamic;_c9.normalize=_ca.normalize;_c9.load=_ca.load;return _c9;},_cb=function(_cc){var map={};_9(_cc.loadQ,function(_cd){var _ce=_cd.mid,_cf=_aa(_cc,_cd.prid,_cd.req.module),mid=_cc.dynamic?_cd.mid.replace(/waitingForPlugin$/,_cf):(_cc.mid+"!"+_cf),_d0=_c(_c({},_cd),{mid:mid,prid:_cf,injected:0});if(!_2f[mid]){_e1(_2f[mid]=_d0);}map[_cd.mid]=_2f[mid];_33(_cd);delete _2f[_cd.mid];});_cc.loadQ=0;var _d1=function(_d2){for(var _d3,_d4=_d2.deps||[],i=0;i<_d4.length;i++){_d3=map[_d4[i].mid];if(_d3){_d4[i]=_d3;}}};for(var p in _2f){_d1(_2f[p]);}_9(_30,_d1);},_35=function(_d5){req.trace("loader-finish-exec",[_d5.mid]);_d5.executed=_24;_d5.defOrder=_c8++;1&&_9(_d5.provides,function(cb){cb();});if(_d5.loadQ){_b6(_d5);_cb(_d5);}for(i=0;i<_30.length;){if(_30[i]===_d5){_30.splice(i,1);}else{i++;}}},_d6=[],_36=function(_d7,_d8){if(_d7.executed===_23){req.trace("loader-circular-dependency",[_d6.concat(mid).join("->")]);return (!_d7.def||_d8)?_c7:(_d7.cjs&&_d7.cjs.exports);}if(!_d7.executed){if(!_d7.def){return _c7;}var mid=_d7.mid,_d9=_d7.deps||[],arg,_da,_db=[],i=0;if(0){_d6.push(mid);req.trace("loader-exec-module",["exec",_d6.length,mid]);}_d7.executed=_23;while(i<_d9.length){arg=_d9[i++];_da=((arg===_bf)?_80(_d7):((arg===_c0)?_d7.cjs.exports:((arg===_c1)?_d7.cjs:_36(arg,_d8))));if(_da===_c7){_d7.executed=0;req.trace("loader-exec-module",["abort",mid]);0&&_d6.pop();return _c7;}_db.push(_da);}_c2(_d7,_db);_35(_d7);}0&&_d6.pop();return _d7.result;},_73=0,_77=function(){if(_73){return;}_73++;_29();for(var _dc,_dd,i=0;i<_30.length;){_dc=_c8;_dd=_30[i];_36(_dd);if(_dc!=_c8){_29();i=0;}else{i++;}}_37();},_37=function(){_73--;if(_8a()){_34("idle",[]);}};if(0){req.undef=function(_de,_df){var _e0=_31(_de,_df);_33(_e0);delete _2f[_e0.mid];};}if(1){var _40=function(url){url+="";return url+(_53?((/\?/.test(url)?"&":"?")+_53):"");},_e1=function(_e2){var _e3=_e2.plugin;if(_e3.executed===_24&&!_e3.load){_b6(_e3);}var _e4=function(def){_e2.result=def;_33(_e2);_35(_e2);_77();};_86(_e2);if(_e3.load){_e3.load(_e2.prid,_e2.req,_e4);}else{if(_e3.loadQ){_e3.loadQ.push(_e2);}else{_30.unshift(_e3);_32(_e3);if(_e3.load){_e3.load(_e2.prid,_e2.req,_e4);}else{_e3.loadQ=[_e2];}}}},_e5=0,_78=0,_e6=0,_e7=function(_e8,_e9){_e6=1;if(has("config-dojo-loader-catches")){try{if(_e8===_e5){_e5.call(null);}else{req.eval(_e8,_e9.mid);}}catch(e){_34(_45,_f("evalModuleThrew",_e9));}}else{if(_e8===_e5){_e5.call(null);}else{req.eval(_e8,_e9.mid);}}_e6=0;},_32=function(_ea){var mid=_ea.mid,url=_ea.url;if(_ea.executed||_ea.injected||_85[mid]||(_ea.url&&((_ea.pack&&_85[_ea.url]===_ea.pack)||_85[_ea.url]==1))){return;}if(0){var _eb=0;if(_ea.plugin&&_ea.plugin.isCombo){req.combo.add(_ea.plugin.mid,_ea.prid,0,req);_eb=1;}else{if(!_ea.plugin){_eb=req.combo.add(0,_ea.mid,_ea.url,req);}}if(_eb){_86(_ea);_6e=1;return;}}if(_ea.plugin){_e1(_ea);return;}_86(_ea);var _ec=function(){_76(_ea);if(_ea.injected!==_21){_33(_ea);_c(_ea,_bd);}if(1&&_25){!_27.length&&_77();}else{_77();}};_e5=_54[mid]||_54[_ea.cacheId];if(_e5){req.trace("loader-inject",["cache",_ea.mid,url]);_e7(_e5,_ea);_ec();return;}if(1&&_25){if(_ea.isXd){_25==_26&&(_25=xd);}else{if(_ea.isAmd&&_25!=_26){}else{var _ed=function(_ee){if(_25==_26){_27.unshift(_ea);_e7(_ee,_ea);_27.shift();_76(_ea);if(!_ea.cjs){_33(_ea);_35(_ea);}if(_ea.finish){var _ef=mid+"*finish",_f0=_ea.finish;delete _ea.finish;def(_ef,["dojo",("dojo/require!"+_f0.join(",")).replace(/\./g,"/")],function(_f1){_9(_f0,function(mid){_f1.require(mid);});});_30.unshift(_31(_ef));}_ec();}else{_ee=_2a(_ea,_ee);if(_ee){_e7(_ee,_ea);_ec();}else{_78=_ea;req.injectUrl(_40(url),_ec,_ea);_78=0;}}};req.trace("loader-inject",["xhr",_ea.mid,url,_25!=_26]);if(has("config-dojo-loader-catches")){try{req.getText(url,_25!=_26,_ed);}catch(e){_34(_45,_f("xhrInjectFailed",[_ea,e]));}}else{req.getText(url,_25!=_26,_ed);}return;}}}req.trace("loader-inject",["script",_ea.mid,url]);_78=_ea;req.injectUrl(_40(url),_ec,_ea);_78=0;},_f2=function(_f3,_f4,def){req.trace("loader-define-module",[_f3.mid,_f4]);if(0&&_f3.plugin&&_f3.plugin.isCombo){_f3.result=_6(def)?def():def;_33(_f3);_35(_f3);return _f3;}var mid=_f3.mid;if(_f3.injected===_21){_34(_45,_f("multipleDefine",_f3));return _f3;}_c(_f3,{deps:_f4,def:def,cjs:{id:_f3.mid,uri:_f3.url,exports:(_f3.result={}),setExports:function(_f5){_f3.cjs.exports=_f5;}}});for(var i=0;i<_f4.length;i++){_f4[i]=_31(_f4[i],_f3);}if(1&&_25&&!_85[mid]){_71(_f3);_30.push(_f3);_77();}_33(_f3);if(!_6(def)&&!_f4.length){_f3.result=def;_35(_f3);}return _f3;},_76=function(_f6,_f7){_57(_f6);var _f8=[],_f9,_fa;while(_84.length){_fa=_84.shift();_f7&&(_fa[0]=_f7.shift());_f9=_fa[0]&&_31(_fa[0])||_f6;_f8.push(_f2(_f9,_fa[1],_fa[2]));}_9(_f8,_71);};}var _fb=0,_89=_3,_fc=_3;if(1){_89=function(){_fb&&clearTimeout(_fb);_fb=0;},_fc=function(){_89();req.waitms&&(_fb=setTimeout(function(){_89();_34(_45,_f("timeout",_85));},req.waitms));};}if(1){has.add("ie-event-behavior",doc.attachEvent&&(typeof opera==="undefined"||opera.toString()!="[object Opera]"));}if(1&&(1||1)){var _fd=function(_fe,_ff,_100,_101){if(!has("ie-event-behavior")){_fe.addEventListener(_ff,_101,false);return function(){_fe.removeEventListener(_ff,_101,false);};}else{_fe.attachEvent(_100,_101);return function(){_fe.detachEvent(_100,_101);};}},_102=_fd(window,"load","onload",function(){req.pageLoaded=1;doc.readyState!="complete"&&(doc.readyState="complete");_102();});if(1){var _103=doc.getElementsByTagName("script")[0],_104=_103.parentNode;req.injectUrl=function(url,_105,_106){_fc();var node=_106.node=doc.createElement("script"),_107=function(e){e=e||window.event;var node=e.target||e.srcElement;if(e.type==="load"||/complete|loaded/.test(node.readyState)){_108();_105&&_105();}},_108=_fd(node,"load","onreadystatechange",_107);node.type="text/javascript";node.charset="utf-8";node.src=url;_104.insertBefore(node,_103);return node;};}}if(1){req.log=function(){try{for(var i=0;i<arguments.length;i++){}}catch(e){}};}else{req.log=_3;}if(0){var _109=req.trace=function(_10a,args){if(_109.on&&_109.group[_10a]){_34("trace",[_10a,args]);for(var arg,dump=[],text="trace:"+_10a+(args.length?(":"+args[0]):""),i=1;i<args.length;){arg=args[i++];if(_7(arg)){text+=", "+arg;}else{dump.push(arg);}}req.log(text);dump.length&&dump.push(".");req.log.apply(req,dump);}};_c(_109,{on:1,group:{},set:function(_10b,_10c){if(_7(_10b)){_109.group[_10b]=_10c;}else{_c(_109.group,_10b);}}});_109.set(_c(_c(_c({},_2.trace),_1.trace),_56.trace));on("config",function(_10d){_10d.trace&&_109.set(_10d.trace);});}else{req.trace=_3;}var def=function(mid,_10e,_10f){var _110=arguments.length,args=0,_111=["require","exports","module"];if(0){if(_110==1&&_6(mid)){_10e=[];mid.toString().replace(/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,"").replace(/require\(["']([\w\!\-_\.\/]+)["']\)/g,function(_112,dep){_10e.push(dep);});args=[0,_111.concat(_10e),mid];}}if(!args){args=_110==1?[0,_111,mid]:(_110==2?(_8(mid)?[0,mid,_10e]:(_6(_10e)?[mid,_111,_10e]:[mid,[],_10e])):[mid,_10e,_10f]);}req.trace("loader-define",args.slice(0,2));var _113=args[0]&&_31(args[0]),_114;if(_113&&!_85[_113.mid]){_71(_f2(_113,args[1],args[2]));}else{if(!has("ie-event-behavior")||!1||_e6){_84.push(args);}else{_113=_113||_78;if(!_113){for(mid in _85){_114=_2f[mid];if(_114&&_114.node&&_114.node.readyState==="interactive"){_113=_114;break;}}if(0&&!_113){for(var i=0;i<_6f.length;i++){_113=_6f[i];if(_113.node&&_113.node.readyState==="interactive"){break;}_113=0;}}}if(0&&_8(_113)){_71(_f2(_113.shift(),args[1],args[2]));if(!_113.length){_6f.splice(i,1);}}else{if(_113){_57(_113);_71(_f2(_113,args[1],args[2]));}else{_34(_45,_f("ieDefineFailed",args[0]));}}_77();}}};def.amd={vendor:"dojotoolkit.org"};if(0){req.def=def;}_c(_c(req,_2.loaderPatch),_1.loaderPatch);on(_45,function(arg){try{console.error(arg);if(arg instanceof Error){for(var p in arg){}}}catch(e){}});_c(req,{uid:uid,cache:_54,packs:_50});if(0){_c(req,{paths:_4e,aliases:_4d,packageMap:_51,modules:_2f,legacyMode:_25,execQ:_30,defQ:_84,waiting:_85,pathsMapProg:_4f,packageMapProg:_52,listenerQueues:_44,computeMapProg:_5c,runMapProg:_8b,compactPath:_8d,getModuleInfo:_94});}if(_17.define){if(1){_34(_45,_f("defineAlreadyDefined",0));}}else{_17.define=def;_17.require=req;}if(0&&req.combo&&req.combo.plugins){var _115=req.combo.plugins,_116;for(_116 in _115){_c(_c(_31(_116),_115[_116]),{isCombo:1,executed:"executed",load:1});}}if(1){var _117=_2.deps||_1.deps||_56.deps,_118=_2.deps||_1.callback||_56.callback;req.boot=(_117||_118)?[_117||[],_118]:0;}if(!1){!req.async&&req(["dojo"]);req.boot&&req.apply(null,req.boot);}})(this.dojoConfig||this.djConfig||this.require||{},{async:0,hasCache:{"config-selectorEngine":"acme","dojo-built":1,"dojo-loader":1,dom:1,"host-browser":1},packages:[{location:"../dijit",name:"dijit"},{location:"../dojox",name:"dojox"},{location:".",name:"dojo"}]});

Attachments (2)

Test Dojo.html (250 bytes) - added by vital 7 years ago.
proper_test.html (325 bytes) - added by Aleksey Rechinskiy 7 years ago.
Must produce alert('loaded')

Download all attachments as: .zip

Change History (30)

comment:1 Changed 7 years ago by bill

Description: modified (diff)
Owner: set to sallyx
Status: newpending

You'll need to attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, ideally a single HTML file that we can load in the browser and use to reproduce then problem.

Then, give exact instructions on how to reproduce the problem using your attached test file. Thanks!

Changed 7 years ago by vital

Attachment: Test Dojo.html added

comment:2 Changed 7 years ago by Aleksey Rechinskiy

Experience the same problem with Opera 11.62 on WinXP. Here is the error message I get when linking to <script src='/js/dojo/dojo/dojo.js'></script> with uncompressed sources:

Inline script thread
Uncaught exception: Error: WRONG_THIS_ERR
Error thrown at line 135, column 3 in <anonymous function: req.has>(name) in http://test-site/js/dojo/dojo/dojo.js:
    return isFunction(hasCache[name]) ? (hasCache[name] = hasCache[name](global, doc, element)) : hasCache[name];
called from line 1513, column 4 in <anonymous function>(node, eventName, ieEventName, handler) in http://test-site/js/dojo/dojo/dojo.js:
    if(!has("ie-event-behavior"))
called from line 1510, column 2 in <anonymous function>(userConfig, defaultConfig) in http://test-site/js/dojo/dojo/dojo.js:
    var domOn = function(node, eventName, ieEventName, handler){
called from line 1, column 0 in http://test-site/js/dojo/dojo/dojo.js:
    (function(

Do you still need a test file?

comment:3 Changed 7 years ago by Aleksey Rechinskiy

Googling shows, that WRONG_THIS_ERR is related somehow to accessing object properties. Here is how the solution that work for me:

//change line 135 of dojo/dojo/dojo.js
//from this line:
//    return isFunction(hasCache[name]) ? (hasCache[name] = hasCache[name](global, doc, element)) : hasCache[name];

//to this.
return isFunction(
	( typeof hasCache.name != 'undefined' ? hasCache.name : 0 )
	) ? (hasCache[name] = hasCache[name](global, doc, element)) : hasCache[name];

Best regards!

(Arrrr!!!! Everytime since I started to work as a web developer when once in a year I start to think that Opera became a normal browser, it shows me that I'm deeply wrong. It looks like the Opera stole a lot of my money again! Worst browser in the history of mankind! I hate it!)

comment:4 Changed 7 years ago by bill

Component: GeneralLoader

Yes, I still need a test file. vital attached a test file, but it works fine for me on WinXP. Does it break for you?

Also, note that your original description that "Opera 11.62 bug" and "Dojo not work" is much too vague. It's like going the mechanic and saying "car broken", or going to the doctor and saying "body hurt". You need to be more specific.

Changed 7 years ago by Aleksey Rechinskiy

Attachment: proper_test.html added

Must produce alert('loaded')

comment:5 Changed 7 years ago by Aleksey Rechinskiy

Hi Bill. I don't speak English very well (too small active practice), so, please, don't be very strict to a grammar. I'll try to do my best to describe the problem.

The test case vital provided also does NOT work for me in WinXP in Opera 11.62 build 1347. I'm not sure if it really work for you either, because it is very unclear how to check if it works. I've uploaded a proper test case file - run it and expect it to produce alert('loaded') in every normal browser (Opera is not among them).

How to investigate the test case in Opera:

  1. clear browser cache by going to Ctrl+f12 / 'advanced' tab / 'history'. Then press "Empty Now" button
  2. open "error console": Ctrl+Shift+O. Press "clear" button if it is not empty
  3. navigate browser to the "proper_test.html" file

Now you should see at lease 2 errors in the console: the first one is the same as sallyx described and the second is about 'Undefined variable: dojo', because dojo.js had failed to load.

Do you get it?

If 'yes', I've posted the solution earlier. You may apply it to a local installation and check it if works. else lets think more about it ;)

Did I clarify things for you?

That's clearly next one Opera's fault. If you google for 'WRONG_THIS_ERR' term, you'll see there's a lot of different js code had been broken by that damn browser.

Cheers.

comment:6 Changed 7 years ago by bill

OK, definitely thanks for the test case and the detailed instructions. The "problem" is that the alert is showing up for me, and I have no errors in the console. My opera version (from the help menu) is:

About Opera
Version information
Version
11.61 
Build
1250 
Platform
Win32 
System
Windows XP 
XHTML+Voice
Plug-in not loaded 
Browser identification

Opera/9.80 (Windows NT 5.1; U; en) Presto/2.10.229 Version/11.61

(The cut/paste made it format strangely.) Same as you, right?

comment:7 Changed 7 years ago by Aleksey Rechinskiy

No, I wrote earlier, I use Opera 11.62 build 1347, not v11.61 b1250 as you do.

You should update to the latest version and try again.

ps: May be they'll fix that bug later. But it's absolutely not safe to rely on that hypothesis. It's safer to counter react and make that damn browser happy with proper code, because they may easily spawn that bug later (they really like to do such things, I have an experience).

comment:8 Changed 7 years ago by bill

Owner: changed from sallyx to Rawld Gill
Status: pendingassigned

Oops, my mistake, I see it now.

So it's failing on has("ie-event-behavior"), because hasCache["ie-event-behavior"] is the attachEvent() function, rather than a boolean. It's set from:

has.add("ie-event-behavior", doc.attachEvent && (typeof opera === "undefined" || opera.toString() != "[object Opera]"));

And we can see from the console that:

>>> doc.attachEvent && (typeof opera === "undefined" || opera.toString() != "[object Opera]")
function attachEvent() { [native code] }

Very bizarre! That expression should clearly evaluate to a boolean.

Version 0, edited 7 years ago by bill (next)

comment:9 Changed 7 years ago by Colin Snover

Opera is aware of this issue, it has been logged internally as DSK-360585. Please don’t check in a fix at least until I have heard more from them.

Last edited 7 years ago by Colin Snover (previous) (diff)

comment:10 Changed 7 years ago by Aleksey Rechinskiy

Replying to bill:

So it's failing on has("ie-event-behavior"), because hasCache["ie-event-behavior"] is the attachEvent() function, rather than a boolean.

I don't understand why you think it's the cause of the failure. But anyway, if that is true, how changing definition of has() function (see here) could have helped me to prevent the bug to appear? The only difference from original code is in argument of isFunction(). I changed it from hasCache[name] that refers to name attribute directly to ( typeof hasCache.name != 'undefined' ? hasCache.name : 0 ) that checks first whether the attribute exist. The fix removes the failure and it is completely unrelated to what you have said.

Last edited 7 years ago by Aleksey Rechinskiy (previous) (diff)

comment:11 Changed 7 years ago by bill

The way that has.add() works is in two forms:

has.add("foo", false) --> registers that has("foo") returns false
has.add("foo", func) --> has("foo") returns func()

So the fact that opera is calling has.add("ie-event-behavior", function) instead of has.add("ie-event-behavior", boolean) is bad.

I'm not sure why your change to has() worked but it looks a bit scary just to workaround an opera bug.

comment:12 Changed 7 years ago by Colin Snover

The vendor has confirmed this is a bug in their product. Their suggested workaround is to use typeof document.attachEvent != "undefined" instead, as this should avoid triggering the bug. However, I think this ticket should be WONTFIX as this issue will be fixed by the vendor shortly (before we can do a new release, anyway!).

comment:13 Changed 7 years ago by Bryan Forbes

Shouldn't we be testing has("dom-addeventlistener") instead of !has("ie-event-behavior")? It seems like that would be a more reliable test that is already defined instead of adding an extra has test (and a poorly named one) to the loader?

comment:14 in reply to:  13 Changed 7 years ago by Rawld Gill

Replying to BryanForbes:

Shouldn't we be testing has("dom-addeventlistener") instead of !has("ie-event-behavior")? It seems like that would be a more reliable test that is already defined instead of adding an extra has test (and a poorly named one) to the loader?

ie9 has addeventlistener but fires script loading events differently when script injecting, so dom-addeventlistener will not work. The loader is actually looking for a particular event behavior (as per the name) that is well-signaled (until now) by the test as provided.

comment:15 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

In [28273]:

rearrange boolean expr to accomodate opera bug; fixes #15096; !strict

comment:16 Changed 7 years ago by Colin Snover

I do not understand why this changeset was added. By the time we release Dojo 1.8, Opera will have long fixed this issue, so at best this is simply noise, and at worst it adds voodoo to our code.

If we were going to release a hot patch for this issue, I provided a workaround directly from their engineering team in comment:12 and am absolutely beside myself about why that advice was completely ignored. We are not cowboys, we live in a community, and we need to make sure we are being respectful to all involved parties.

comment:17 in reply to:  16 Changed 7 years ago by Rawld Gill

Replying to csnover:

I do not understand [snip]

Because it is trivial, JavaScript?-equivalent to what is already there (there is zero voodoo), and consequently harmless and may help other interested parties immediately.

comment:18 Changed 7 years ago by Rawld Gill

In [28274]:

improves [28273] to not break ie; thanks bill; refs #15096; !strict

comment:19 in reply to:  16 Changed 7 years ago by Tom Trenka

Replying to csnover:

I do not understand why this changeset was added. By the time we release Dojo 1.8, Opera will have long fixed this issue, so at best this is simply noise, and at worst it adds voodoo to our code.

If we were going to release a hot patch for this issue, I provided a workaround directly from their engineering team in comment:12 and am absolutely beside myself about why that advice was completely ignored. We are not cowboys, we live in a community, and we need to make sure we are being respectful to all involved parties.

The problem is that Opera released a fixed version (as in, a version of their browser with a full release number, not a version that "fixes" the problem) in 11.62; even though they are really good about responding to something like this, that version of Opera is still going to be out there for a while...and if DTK 1.7 release breaks in it, we *have* to address it.

I think its fantastic that you were able to get them to pay attention so quickly (imagine trying to get the IE team to do that!). At the same time, we still need to be somewhat defensive with something as critical as AMD loading. Hopefully things like this will be avoided in the future...

I did ask Rawld privately to back-port the fix to the 1.7 branch; I have a feeling that this is enough to warrant another point release =(

comment:20 Changed 7 years ago by miketaylr

Hi there -- Opera employee here. This bug is related to us making attachEvent/detachEvent/window.event hidden objects (like document.all) in 11.62.

We have a fix in code review right now, but it's unclear whether this will be released just in Opera 12 or if there will be a further 11.6X update at some point before then.

The workaround is simple: has.add("ie-event-behavior", (typeof doc.attachEvent != 'undefined') && (typeof opera === "undefined"
opera.toString() != "[object Opera]"));

comment:21 in reply to:  20 ; Changed 7 years ago by Rawld Gill

Replying to miketaylr:

Hi there -- Opera employee here.

Thanks for your great attention to this, miketaylr!

The workaround is simple: has.add("ie-event-behavior", (typeof doc.attachEvent != 'undefined') && (typeof opera === "undefined"
opera.toString() != "[object Opera]"));

Do you see any problems with the patch I made in [28274]?

comment:22 Changed 7 years ago by bill

#15158 is a duplicate of this ticket.

comment:23 in reply to:  21 ; Changed 7 years ago by miketaylr

Replying to rcgill:

The workaround is simple: has.add("ie-event-behavior", (typeof doc.attachEvent != 'undefined') && (typeof opera === "undefined"
opera.toString() != "[object Opera]"));

Do you see any problems with the patch I made in [28274]?

Nah, it looks good. Thanks for the quick workaround--it's appreciated. Since that fix is for trunk, we've shipped a browser.js patch to try to ensure 11.62 as shipped is compatible with Dojo 1.7.x on production sites. (blog post: http://my.opera.com/sitepatching/blog/2012/04/16/unbreak-dojo-1-7). Our core fix to Carakan should land in Opera Next pretty soon.

Thanks again!

comment:24 in reply to:  23 Changed 7 years ago by Tom Trenka

Replying to miketaylr:

For some reason Mike's link breaks in some email readers so here you go:

http://my.opera.com/sitepatching/blog/2012/04/16/unbreak-dojo-1-7

Replying to rcgill:

The workaround is simple: has.add("ie-event-behavior", (typeof doc.attachEvent != 'undefined') && (typeof opera === "undefined"
opera.toString() != "[object Opera]"));

Do you see any problems with the patch I made in [28274]?

Nah, it looks good. Thanks for the quick workaround--it's appreciated. Since that fix is for trunk, we've shipped a browser.js patch to try to ensure 11.62 as shipped is compatible with Dojo 1.7.x on production sites. (blog post: http://my.opera.com/sitepatching/blog/2012/04/16/unbreak-dojo-1-7). Our core fix to Carakan should land in Opera Next pretty soon.

Thanks again!

comment:25 Changed 7 years ago by bill

Milestone: tbd1.8

Bulk update for closed tickets marked as tbd/future. Presumably these should be marked as fixed in 1.8.

comment:26 Changed 7 years ago by Rawld Gill

In [28410]:

improve order of boolean expression to make meeting attendees happy; refs #15096; !strict

comment:27 Changed 7 years ago by Colin Snover

A new version of Opera has been released that fixes this issue, so the 1.7.2 code works fine now.

comment:28 Changed 7 years ago by bill

In [30155]:

No need for Windows 8 Store Apps to follow the IE specific code path for checking when scripts finish loading. At least according to my preliminary tests. (Likely no need for IE10 either.) Refs #16432 !strict.

Also removing Opera workaround that's no longer needed, refs #15096.

Note: See TracTickets for help on using tickets.