From 00f236ed8684955d87a69206be1ffff9103e0eab Mon Sep 17 00:00:00 2001 From: Mike Conley Date: Sat, 17 May 2014 12:39:14 -0400 Subject: [PATCH] Bug 616134 - Content processes should annotate URLs for crashes. r=felipe. --- toolkit/content/browser-child.js | 10 ++++++++++ toolkit/content/jar.mn | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/toolkit/content/browser-child.js b/toolkit/content/browser-child.js index 324843930de..fffbb5200e2 100644 --- a/toolkit/content/browser-child.js +++ b/toolkit/content/browser-child.js @@ -11,6 +11,12 @@ Cu.import('resource://gre/modules/XPCOMUtils.jsm'); Cu.import("resource://gre/modules/RemoteAddonsChild.jsm"); Cu.import("resource://gre/modules/Timer.jsm"); +#ifdef MOZ_CRASHREPORTER +XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter", + "@mozilla.org/xre/app-info;1", + "nsICrashReporter"); +#endif + let FocusSyncHandler = { init: function() { sendAsyncMessage("SetSyncHandler", {}, {handler: this}); @@ -178,6 +184,10 @@ let WebNavigation = { }, loadURI: function(uri, flags) { +#ifdef MOZ_CRASHREPORTER + if (CrashReporter.enabled) + CrashReporter.annotateCrashReport("URL", uri); +#endif this._webNavigation.loadURI(uri, flags, null, null, null); }, diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index 7939efd8874..6cd3635d460 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -27,7 +27,7 @@ toolkit.jar: content/global/directionDetector.html content/global/plugins.html content/global/plugins.css - content/global/browser-child.js (browser-child.js) +* content/global/browser-child.js (browser-child.js) content/global/browser-content.js (browser-content.js) *+ content/global/buildconfig.html (buildconfig.html) * content/global/contentAreaUtils.js (contentAreaUtils.js)