[Pkg-javascript-commits] [dojo] 08/88: Fix arguments for "done" event. refs #15854

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


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

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

commit 2c88983c37534a70f1057b5c901f8a5764f08d21
Author: Bryan Forbes <bryan at reigndropsfall.net>
Date:   Wed Aug 15 21:20:08 2012 +0000

    Fix arguments for "done" event. refs #15854
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@29488 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 request/notify.js         | 5 +++--
 tests/request/notify.html | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/request/notify.js b/request/notify.js
index 86bc73b..8392cb5 100644
--- a/request/notify.js
+++ b/request/notify.js
@@ -16,7 +16,8 @@ define(['../Evented', '../_base/lang', './util'], function(Evented, lang, util){
 	//		|     }
 	//		| );
 
-	var pubCount = 0;
+	var pubCount = 0,
+		slice = [].slice;
 
 	var hub = lang.mixin(new Evented, {
 		onsend: function(data){
@@ -42,7 +43,7 @@ define(['../Evented', '../_base/lang', './util'], function(Evented, lang, util){
 
 			// After all event handlers have run, run _on* handler
 			if(this['_on' + type]){
-				this['_on' + type].apply(this, arguments);
+				this['_on' + type].apply(this, slice.call(arguments, 1));
 			}
 			return result;
 		}
diff --git a/tests/request/notify.html b/tests/request/notify.html
index 8426b85..dca94bf 100644
--- a/tests/request/notify.html
+++ b/tests/request/notify.html
@@ -102,9 +102,10 @@
 
 					var doneFired = 0;
 					t.remove = remover(
-						notify('done', function(response){
+						notify('done', d.getTestErrback(function(data){
 							doneFired = 1;
-						}),
+							t.t(data instanceof Error);
+						})),
 						notify('error', d.getTestErrback(function(data){
 							t.t(data instanceof Error);
 							t.f(doneFired, "'error' should have fired before 'done'");

-- 
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