From 9532d2395e19cf3902188e359a1ec57137a83e6b Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Wed, 27 Jul 2016 03:10:19 -0500 Subject: [PATCH] revert bugsnag error reporting related changes --- data/lightdm-webkit2-greeter.conf | 12 +++++------- src/lightdm-webkit2-greeter-ext.c | 21 +-------------------- themes/_vendor/js/bugsnag-2.5.0.min.js | 1 - 3 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 themes/_vendor/js/bugsnag-2.5.0.min.js diff --git a/data/lightdm-webkit2-greeter.conf b/data/lightdm-webkit2-greeter.conf index 3ad1823..3f85ad5 100644 --- a/data/lightdm-webkit2-greeter.conf +++ b/data/lightdm-webkit2-greeter.conf @@ -1,22 +1,20 @@ # # [greeter] -# webkit-theme = Webkit theme to use. (Default: antergos) -# debug_mode = Greeter theme debug mode. (Default: false) -# screensaver-timeout = Blank the screen after this many seconds of inactivity. (Default: 300) -# report-errors = Automatically report errors to the developers--anonymously. (Default: true) +# webkit-theme = Webkit theme to use. +# debug_mode = Greeter theme debug mode. +# screensaver-timeout = Blank the screen after this many seconds of inactivity. # [greeter] webkit-theme = antergos debug_mode = false screensaver-timeout = 300 -report-errors = false # # [branding] # logo = Path to logo image for use by greeter themes. -# user_image = Default user image/avatar. This is used by greeter themes for users that have no .face image. -# background_images = Path to directory that contains background images for use by greeter themes. +# user_image = Default user image/avatar. This is used by themes for users that have no .face image. +# background_images = Path to directory that contains background images for use by themes. # [branding] diff --git a/src/lightdm-webkit2-greeter-ext.c b/src/lightdm-webkit2-greeter-ext.c index 4f368c3..d3a0c9e 100644 --- a/src/lightdm-webkit2-greeter-ext.c +++ b/src/lightdm-webkit2-greeter-ext.c @@ -1452,7 +1452,6 @@ window_object_cleared_callback(WebKitScriptWorld *world, JSStringRef command; gboolean report_errors; gchar *message = "LockHint"; - gchar *theme, *bugsnag, *string;; jsContext = webkit_frame_get_javascript_context_for_script_world(frame, world); globalObject = JSContextGetGlobalObject(jsContext); @@ -1498,6 +1497,7 @@ window_object_cleared_callback(WebKitScriptWorld *world, kJSPropertyAttributeNone, NULL); + /* If the greeter was started as a lock-screen, send message to our UI process. */ if (lightdm_greeter_get_lock_hint(greeter)) { dom_document = webkit_web_page_get_dom_document(web_page); @@ -1510,25 +1510,6 @@ window_object_cleared_callback(WebKitScriptWorld *world, } } - /* If the default theme is active & error reporting is enabled, inject bugsnag script */ - theme = g_key_file_get_string(keyfile, "greeter", "theme", NULL); - report_errors = g_key_file_get_boolean(keyfile, "greeter", "report-errors", NULL); - - if (report_errors && strcmp("antergos", theme) == 0) { - bugsnag = "4ea62a82" - "03b5b1af" - "7c33da0d" - "c2f6a60f"; - - string = g_strdup_printf("window._inject_bugsnag('%s', '%s');", bugsnag, GREETER_VERSION); - command = JSStringCreateWithUTF8CString(string); - - JSEvaluateScript(jsContext, command, NULL, NULL, 0, NULL); - g_free(bugsnag); - g_free(string); - } - - g_free(theme); } diff --git a/themes/_vendor/js/bugsnag-2.5.0.min.js b/themes/_vendor/js/bugsnag-2.5.0.min.js deleted file mode 100644 index 2c87875..0000000 --- a/themes/_vendor/js/bugsnag-2.5.0.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b){function c(a,b){try{if("function"!=typeof a)return a;if(!a.bugsnag){var c=e();a.bugsnag=function(d){if(b&&b.eventHandler&&(u=d),v=c,!y){var e=a.apply(this,arguments);return v=null,e}try{return a.apply(this,arguments)}catch(f){throw l("autoNotify",!0)&&(x.notifyException(f,null,null,"error"),s()),f}finally{v=null}},a.bugsnag.bugsnag=a.bugsnag}return a.bugsnag}catch(d){return a}}function d(){B=!1}function e(){var a=document.currentScript||v;if(!a&&B){var b=document.scripts||document.getElementsByTagName("script");a=b[b.length-1]}return a}function f(a){var b=e();b&&(a.script={src:b.src,content:l("inlineScript",!0)?b.innerHTML:""})}function g(b){var c=l("disableLog"),d=a.console;void 0===d||void 0===d.log||c||d.log("[Bugsnag] "+b)}function h(b,c,d){if(d>=5)return encodeURIComponent(c)+"=[RECURSIVE]";d=d+1||1;try{if(a.Node&&b instanceof a.Node)return encodeURIComponent(c)+"="+encodeURIComponent(r(b));var e=[];for(var f in b)if(b.hasOwnProperty(f)&&null!=f&&null!=b[f]){var g=c?c+"["+f+"]":f,i=b[f];e.push("object"==typeof i?h(i,g,d):encodeURIComponent(g)+"="+encodeURIComponent(i))}return e.join("&")}catch(j){return encodeURIComponent(c)+"="+encodeURIComponent(""+j)}}function i(a,b){if(null==b)return a;a=a||{};for(var c in b)if(b.hasOwnProperty(c))try{a[c]=b[c].constructor===Object?i(a[c],b[c]):b[c]}catch(d){a[c]=b[c]}return a}function j(a,b){a+="?"+h(b)+"&ct=img&cb="+(new Date).getTime();var c=new Image;c.src=a}function k(a){var b={},c=/^data\-([\w\-]+)$/;if(a)for(var d=a.attributes,e=0;e\n";var f=[];try{for(var h=arguments.callee.caller.caller;h&&f.length"}return a.nodeName}}function s(){z+=1,a.setTimeout(function(){z-=1})}function t(a,b,c){var d=a[b],e=c(d);a[b]=e}var u,v,w,x={},y=!0,z=0,A=10;x.noConflict=function(){return a.Bugsnag=b,x},x.refresh=function(){A=10},x.notifyException=function(a,b,c,d){b&&"string"!=typeof b&&(c=b,b=void 0),c||(c={}),f(c),n({name:b||a.name,message:a.message||a.description,stacktrace:p(a)||o(),file:a.fileName||a.sourceURL,lineNumber:a.lineNumber||a.line,columnNumber:a.columnNumber?a.columnNumber+1:void 0,severity:d||"warning"},c)},x.notify=function(b,c,d,e){n({name:b,message:c,stacktrace:o(),file:a.location.toString(),lineNumber:1,severity:e||"warning"},d)};var B="complete"!==document.readyState;document.addEventListener?(document.addEventListener("DOMContentLoaded",d,!0),a.addEventListener("load",d,!0)):a.attachEvent("onload",d);var C,D=/^[0-9a-f]{32}$/i,E=/function\s*([\w\-$]+)?\s*\(/i,F="https://notify.bugsnag.com/",G=F+"js",H="2.4.8",I=document.getElementsByTagName("script"),J=I[I.length-1];if(a.atob){if(a.ErrorEvent)try{0===new a.ErrorEvent("test").colno&&(y=!1)}catch(K){}}else y=!1;if(l("autoNotify",!0)){t(a,"onerror",function(b){return function(c,d,e,g,h){var i=l("autoNotify",!0),j={};!g&&a.event&&(g=a.event.errorCharacter),f(j),v=null,i&&!z&&n({name:h&&h.name||"window.onerror",message:c,file:d,lineNumber:e,columnNumber:g,stacktrace:h&&p(h)||o(),severity:"error"},j),b&&b(c,d,e,g,h)}});var L=function(a){return function(b,d){if("function"==typeof b){b=c(b);var e=Array.prototype.slice.call(arguments,2);return a(function(){b.apply(this,e)},d)}return a(b,d)}};t(a,"setTimeout",L),t(a,"setInterval",L),a.requestAnimationFrame&&t(a,"requestAnimationFrame",function(a){return function(b){return a(c(b))}}),a.setImmediate&&t(a,"setImmediate",function(a){return function(){var b=Array.prototype.slice.call(arguments);return b[0]=c(b[0]),a.apply(this,b)}}),"EventTarget Window Node ApplicationCache AudioTrackList ChannelMergerNode CryptoOperation EventSource FileReader HTMLUnknownElement IDBDatabase IDBRequest IDBTransaction KeyOperation MediaController MessagePort ModalWindow Notification SVGElementInstance Screen TextTrack TextTrackCue TextTrackList WebSocket WebSocketWorker Worker XMLHttpRequest XMLHttpRequestEventTarget XMLHttpRequestUpload".replace(/\w+/g,function(b){var d=a[b]&&a[b].prototype;d&&d.hasOwnProperty&&d.hasOwnProperty("addEventListener")&&(t(d,"addEventListener",function(a){return function(b,d,e,f){try{d&&d.handleEvent&&(d.handleEvent=c(d.handleEvent,{eventHandler:!0}))}catch(h){g(h)}return a.call(this,b,c(d,{eventHandler:!0}),e,f)}}),t(d,"removeEventListener",function(a){return function(b,d,e,f){return a.call(this,b,d,e,f),a.call(this,b,c(d),e,f)}}))})}a.Bugsnag=x,"function"==typeof define&&define.amd?define([],function(){return x}):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=x)}(window,window.Bugsnag);