From a77525e56ac1a945d3cb2ef150191137d815fceb Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 22 Jun 2017 23:49:56 +0100 Subject: [PATCH] resourceloader: Backport jquery-migrate.js patch for exceptionHook jQuery Migrate has to monkey-patch jQuery.Deferred, but in doing so it also effectively disables exceptionHook, which means exceptions are no longer logged to the console. Bug: T168086 Change-Id: Id46abcc7fb5e65954532b114636bf0f1f000a551 --- resources/lib/jquery/jquery.migrate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/lib/jquery/jquery.migrate.js b/resources/lib/jquery/jquery.migrate.js index 05b1a803c2..879509f996 100644 --- a/resources/lib/jquery/jquery.migrate.js +++ b/resources/lib/jquery/jquery.migrate.js @@ -535,6 +535,8 @@ jQuery.Deferred = function( func ) { return deferred; }; +// Preserve handler of uncaught exceptions in promise chains +jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook; })( jQuery, window ); -- 2.20.1