Title: [194427] trunk/Source/WebInspectorUI
Revision
194427
Author
[email protected]
Date
2015-12-27 19:01:04 -0800 (Sun, 27 Dec 2015)

Log Message

Web Inspector: improve pre-filled bugzilla link on Uncaught Exception reporter sheet
https://bugs.webkit.org/show_bug.cgi?id=152402

Reviewed by Joseph Pecoraro.

Include the UA string, inspected page URL, and a template that includes
steps to reproduce and notes. Other common headings (regression, expected,
results, summary) are omitted because they are unlikely to be known when
an uncaught exception occurs, or are obvious ("shouldn't throw exception").

* UserInterface/Debug/UncaughtExceptionReporter.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (194426 => 194427)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-12-27 22:56:57 UTC (rev 194426)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-12-28 03:01:04 UTC (rev 194427)
@@ -1,3 +1,17 @@
+2015-12-27  Brian Burg  <[email protected]>
+
+        Web Inspector: improve pre-filled bugzilla link on Uncaught Exception reporter sheet
+        https://bugs.webkit.org/show_bug.cgi?id=152402
+
+        Reviewed by Joseph Pecoraro.
+
+        Include the UA string, inspected page URL, and a template that includes
+        steps to reproduce and notes. Other common headings (regression, expected,
+        results, summary) are omitted because they are unlikely to be known when
+        an uncaught exception occurs, or are obvious ("shouldn't throw exception").
+
+        * UserInterface/Debug/UncaughtExceptionReporter.js:
+
 2015-12-21  Nikita Vasilyev  <[email protected]>
 
         WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function

Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js (194426 => 194427)


--- trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js	2015-12-27 22:56:57 UTC (rev 194426)
+++ trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js	2015-12-28 03:01:04 UTC (rev 194427)
@@ -136,9 +136,30 @@
             dismissErrorSheet();
     }
 
+    let inspectedPageURL = "(unknown)";
+    try {
+        inspectedPageURL = WebInspector.frameResourceManager.mainFrame.url;
+    } catch (e) { }
+
     let formattedErrorDetails = window.__uncaughtExceptions.map((entry) => `${entry.message} (at ${entry.url}:${entry.lineNumber}:${entry.columnNumber})`);
     let detailsForBugReport = formattedErrorDetails.map((line) => ` - ${line}`).join("\n");
-    let encodedBugDescription = encodeURIComponent(`Loading completed: ${loadCompleted ? "true" : "false"}\nUncaught exceptions:\n${detailsForBugReport}`);
+    let encodedBugDescription = encodeURIComponent(`-------
+Auto-generated details:
+
+Inspected URL:        ${inspectedPageURL}
+Loading completed:    ${!!loadCompleted}
+Frontend User Agent:  ${window.navigator.userAgent}
+Uncaught exceptions:
+${detailsForBugReport}
+-------
+
+* STEPS TO REPRODUCE
+1. What were you doing? Include setup or other preparations to reproduce the exception.
+2. Include explicit, accurate, and minimal steps taken. Do not include extraneous or irrelevant steps.
+
+* NOTES
+Document any additional information that might be useful in resolving the problem, such as screen shots or other included attachments.
+`);
     let encodedBugTitle = encodeURIComponent(`Uncaught Exception: ${firstException.message}`);
     let prefilledBugReportLink = `https://bugs.webkit.org/enter_bug.cgi?alias=&assigned_to=webkit-unassigned%40lists.webkit.org&attach_text=&blocked=&bug_file_loc=http%3A%2F%2F&bug_severity=Normal&bug_status=NEW&comment=${encodedBugDescription}&component=Web%20Inspector&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=""
     let detailsForHTML = formattedErrorDetails.map((line) => `<li>${insertWordBreakCharacters(line)}</li>`).join("\n");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to