Bug 1265458 - Use nsAutoString in ConsoleListener::Observer(). r=baku
authorAndrew McCreight <continuation@gmail.com>
Tue, 19 Apr 2016 06:59:03 -0700
changeset 317657 4506d6d426d3ee9c780918b8f25ae311f483e43d
parent 317656 0c83c41da3fdc4f0a75e077c03ed3cf60e6ff370
child 317658 051663050bad3fd03cb3878e8e3d666a2ed4db8b
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1265458
milestone48.0a1
Bug 1265458 - Use nsAutoString in ConsoleListener::Observer(). r=baku
dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -442,17 +442,17 @@ NS_IMETHODIMP
 ConsoleListener::Observe(nsIConsoleMessage* aMessage)
 {
   if (!mChild) {
     return NS_OK;
   }
 
   nsCOMPtr<nsIScriptError> scriptError = do_QueryInterface(aMessage);
   if (scriptError) {
-    nsString msg, sourceName, sourceLine;
+    nsAutoString msg, sourceName, sourceLine;
     nsXPIDLCString category;
     uint32_t lineNum, colNum, flags;
 
     nsresult rv = scriptError->GetErrorMessage(msg);
     NS_ENSURE_SUCCESS(rv, rv);
     TruncateString(msg);
     rv = scriptError->GetSourceName(sourceName);
     NS_ENSURE_SUCCESS(rv, rv);