[Pkg-javascript-commits] [dojo] 31/87: backport #14115 fixes; !strict; refs #14115

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.7.5
in repository dojo.

commit ac02998fb82c10b3b94994e9fe997d04275e4717
Author: Rawld Gill <rgill at altoviso.com>
Date:   Fri Feb 10 17:12:17 2012 +0000

    backport #14115 fixes; !strict; refs #14115
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.7/dojo@27838 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 dojo.js | 74 ++++++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 39 insertions(+), 35 deletions(-)

diff --git a/dojo.js b/dojo.js
index 710b930..7be87f3 100644
--- a/dojo.js
+++ b/dojo.js
@@ -688,43 +688,43 @@
 			if(isArray(a1)){
 				// signature is (requestList [,callback])
 
-				syntheticMid = "require*" + uid();
+					syntheticMid = "require*" + uid();
 
-				// resolve the request list with respect to the reference module
-				for(var mid, deps = [], i = 0; i < a1.length;){
-					mid = a1[i++];
-					if(mid in {exports:1, module:1}){
-						throw makeError("illegalModuleId", mid);
+					// resolve the request list with respect to the reference module
+					for(var mid, deps = [], i = 0; i < a1.length;){
+						mid = a1[i++];
+						if(mid in {exports:1, module:1}){
+							throw makeError("illegalModuleId", mid);
+						}
+						deps.push(getModule(mid, referenceModule));
 					}
-					deps.push(getModule(mid, referenceModule));
-				}
 
-				// construct a synthetic module to control execution of the requestList, and, optionally, callback
-				module = mix(makeModuleInfo("", syntheticMid, 0, ""), {
-					injected: arrived,
-					deps: deps,
-					def: a2 || noop,
-					require: referenceModule ? referenceModule.require : req
-				});
-				modules[module.mid] = module;
-
-				// checkComplete!=0 holds the idle signal; we're not idle if we're injecting dependencies
-				injectDependencies(module);
-
-				// try to immediately execute
-				// if already traversing a factory tree, then strict causes circular dependency to abort the execution; maybe
-				// it's possible to execute this require later after the current traversal completes and avoid the circular dependency.
-				// ...but *always* insist on immediate in synch mode
-				var strict = checkCompleteGuard && req.async;
-				checkCompleteGuard++;
-				execModule(module, strict);
-				checkIdle();
-				if(!module.executed){
-					// some deps weren't on board or circular dependency detected and strict; therefore, push into the execQ
-					execQ.push(module);
+					// construct a synthetic module to control execution of the requestList, and, optionally, callback
+					module = mix(makeModuleInfo("", syntheticMid, 0, ""), {
+						injected: arrived,
+						deps: deps,
+						def: a2 || noop,
+						require: referenceModule ? referenceModule.require : req
+					});
+					modules[module.mid] = module;
+
+					// checkComplete!=0 holds the idle signal; we're not idle if we're injecting dependencies
+					injectDependencies(module);
+
+					// try to immediately execute
+					// if already traversing a factory tree, then strict causes circular dependency to abort the execution; maybe
+					// it's possible to execute this require later after the current traversal completes and avoid the circular dependency.
+					// ...but *always* insist on immediate in synch mode
+					var strict = checkCompleteGuard && req.async;
+					checkCompleteGuard++;
+					execModule(module, strict);
+					checkIdle();
+					if(!module.executed){
+						// some deps weren't on board or circular dependency detected and strict; therefore, push into the execQ
+						execQ.push(module);
+					}
+					checkComplete();
 				}
-				checkComplete();
-			}
 			return contextRequire;
 		},
 
@@ -1181,6 +1181,10 @@
 	}
 
 	if(has("dojo-inject-api")){
+		if(has("dojo-loader-eval-hint-url")===undefined){
+			has.add("dojo-loader-eval-hint-url", 1);
+		}
+
 		var fixupUrl= function(url){
 				url += ""; // make sure url is a Javascript string (some paths may be a Java string)
 				return url + (cacheBust ? ((/\?/.test(url) ? "&" : "?") + cacheBust) : "");
@@ -1243,7 +1247,7 @@
 						if(text===cached){
 							cached.call(null);
 						}else{
-							req.eval(text, module.mid);
+							req.eval(text, has("dojo-loader-eval-hint-url") ? module.url : module.mid);
 						}
 					}catch(e){
 						signal(error, makeError("evalModuleThrew", module));
@@ -1252,7 +1256,7 @@
 					if(text===cached){
 						cached.call(null);
 					}else{
-						req.eval(text, module.mid);
+						req.eval(text, has("dojo-loader-eval-hint-url") ? module.url : module.mid);
 					}
 				}
 				injectingCachedModule = 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list