Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/utils.js

Issue 5166222576451584: Issue 2264 - Remove deprecated logic from Utils.runAsync() on Firefox (Closed)
Patch Set: Created April 2, 2015, 10:16 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/elemHideHitRegistration.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utils.js
===================================================================
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -213,21 +213,12 @@
/**
* Posts an action to the event queue of the current thread to run it
- * asynchronously. Any additional parameters to this function are passed
- * as parameters to the callback.
+ * asynchronously.
* @param {function} callback
- * @param {object} thisPtr
*/
- runAsync: function(callback, thisPtr)
+ runAsync: function(callback)
{
- let params = Array.prototype.slice.call(arguments, 2);
- let runnable = {
- run: function()
- {
- callback.apply(thisPtr, params);
- }
- };
- Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL);
+ Services.tm.currentThread.dispatch(callback, Ci.nsIEventTarget.DISPATCH_NORMAL);
},
/**
« no previous file with comments | « lib/elemHideHitRegistration.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld