Backed out bug 1430810 - wrong bug ID in the patch
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 17 Jan 2018 16:02:03 +0100
changeset 453964 113a0bd831c456821b7e0dc5801e07b2c4adeaf1
parent 453963 4626fa6c2331ce2f2d2fc13e6725085720d9b29f
child 453965 056265a8a2ff7f830fcfb852610cbc00e7c1104b
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1430810
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out bug 1430810 - wrong bug ID in the patch
dom/console/Console.cpp
dom/console/Console.h
dom/console/ConsoleInstance.cpp
dom/console/tests/test_jsm.xul
dom/webidl/Console.webidl
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -1532,17 +1532,16 @@ Console::PopulateConsoleNotificationInTh
     // mConsoleEventNotifier.
     event.mID.Value().SetAsUnsignedLongLong() = 0;
     event.mInnerID.Value().SetAsUnsignedLongLong() = 0;
   }
 
   event.mConsoleID = mConsoleID;
   event.mLevel = aData->mMethodString;
   event.mFilename = frame.mFilename;
-  event.mPrefix = mPrefix;
 
   nsCOMPtr<nsIURI> filenameURI;
   nsAutoCString pass;
   if (NS_IsMainThread() &&
       NS_SUCCEEDED(NS_NewURI(getter_AddRefs(filenameURI), frame.mFilename)) &&
       NS_SUCCEEDED(filenameURI->GetPassword(pass)) && !pass.IsEmpty()) {
     nsCOMPtr<nsISensitiveInfoHiddenURI> safeURI = do_QueryInterface(filenameURI);
     nsAutoCString spec;
@@ -2598,18 +2597,18 @@ Console::MaybeExecuteDumpFunction(JSCont
     return;
   }
 
   nsAutoString message;
   message.AssignLiteral("console.");
   message.Append(aMethodName);
   message.AppendLiteral(": ");
 
-  if (!mPrefix.IsEmpty()) {
-    message.Append(mPrefix);
+  if (!mDumpPrefix.IsEmpty()) {
+    message.Append(mDumpPrefix);
     message.AppendLiteral(": ");
   }
 
   for (uint32_t i = 0; i < aData.Length(); ++i) {
     JS::Rooted<JS::Value> v(aCx, aData[i]);
     JS::Rooted<JSString*> jsString(aCx, JS_ValueToSource(aCx, v));
     if (!jsString) {
       continue;
@@ -2636,18 +2635,18 @@ Console::MaybeExecuteDumpFunctionForTrac
 {
   if (!aStack || (!mDumpFunction && !mDumpToStdout)) {
     return;
   }
 
   nsAutoString message;
   message.AssignLiteral("console.trace:\n");
 
-  if (!mPrefix.IsEmpty()) {
-    message.Append(mPrefix);
+  if (!mDumpPrefix.IsEmpty()) {
+    message.Append(mDumpPrefix);
     message.AppendLiteral(": ");
   }
 
   nsCOMPtr<nsIStackFrame> stack(aStack);
 
   while (stack) {
     nsAutoString filename;
     nsresult rv = stack->GetFilename(aCx, filename);
--- a/dom/console/Console.h
+++ b/dom/console/Console.h
@@ -439,17 +439,17 @@ private:
   uint64_t mOuterID;
   uint64_t mInnerID;
 
   // Set only by ConsoleInstance:
   nsString mConsoleID;
   nsString mPassedInnerID;
   RefPtr<ConsoleInstanceDumpCallback> mDumpFunction;
   bool mDumpToStdout;
-  nsString mPrefix;
+  nsString mDumpPrefix;
   bool mChromeInstance;
   ConsoleLogLevel mMaxLogLevel;
 
   enum {
     eUnknown,
     eInitialized,
     eShuttingDown
   } mStatus;
--- a/dom/console/ConsoleInstance.cpp
+++ b/dom/console/ConsoleInstance.cpp
@@ -74,17 +74,17 @@ ConsoleInstance::ConsoleInstance(const C
 
   if (aOptions.mDump.WasPassed()) {
     mConsole->mDumpFunction = &aOptions.mDump.Value();
   } else {
     // For historical reasons, ConsoleInstance prints messages on stdout.
     mConsole->mDumpToStdout = true;
   }
 
-  mConsole->mPrefix = aOptions.mPrefix;
+  mConsole->mDumpPrefix = aOptions.mPrefix;
 
   // Let's inform that this is a custom instance.
   mConsole->mChromeInstance = true;
 
   if (aOptions.mMaxLogLevel.WasPassed()) {
     mConsole->mMaxLogLevel = aOptions.mMaxLogLevel.Value();
   }
 
--- a/dom/console/tests/test_jsm.xul
+++ b/dom/console/tests/test_jsm.xul
@@ -33,32 +33,29 @@ consoleListener.prototype  = {
 
   observe: function(aSubject, aTopic, aData) {
     if (aTopic == "console-api-log-event") {
       var obj = aSubject.wrappedJSObject;
       if (obj.innerID == JSM) {
         is(obj.ID, "jsm", "ID and InnerID are correctly set.");
         is(obj.arguments[0], "Hello world!", "Message matches");
         is(obj.consoleID, "", "No consoleID for console API");
-        is(obj.prefix, "", "prefix is empty by default");
 
         // We want to see 2 messages from this innerID, the first is generated
         // by console.log, the second one from createInstance().log();
         ++this.count;
       } else if (obj.innerID == "CUSTOM INNER") {
         is(obj.ID, "jsm", "ID and InnerID are correctly set.");
         is(obj.arguments[0], "Hello world!", "Message matches");
         is(obj.consoleID, "wow", "consoleID is set by consoleInstance");
-        is(obj.prefix, "_PREFIX_", "prefix is set by consoleInstance");
         ++this.count;
       } else if (obj.innerID == "LEVEL") {
         // Nothing special... just we don't want to see 'invisible' messages.
         is(obj.ID, "jsm", "ID and InnerID are correctly set.");
         is(obj.arguments[0], "Hello world!", "Message matches");
-        is(obj.prefix, "", "prefix is empty by default");
         ++this.count;
       }
 
       if (this.count == 4) {
         is(dumpCalled, 2, "Dump has been called!");
         SpecialPowers.removeObserver(this, "console-api-log-event");
         SimpleTest.finish();
       }
--- a/dom/webidl/Console.webidl
+++ b/dom/webidl/Console.webidl
@@ -73,17 +73,16 @@ dictionary ConsoleEvent {
   // lazily.  Note that we're not making this whole thing an interface because
   // consumers expect to see own properties on it, which would mean making the
   // props unforgeable, which means lots of JSFunction allocations.  Maybe we
   // should fix those consumers, of course....
   // sequence<ConsoleStackEntry> stacktrace;
   DOMString groupName = "";
   any timer = null;
   any counter = null;
-  DOMString prefix = "";
 };
 
 // Event for profile operations
 dictionary ConsoleProfileEvent {
   DOMString action = "";
   sequence<any> arguments;
 };