Bug 1088900 - Parse console.group/groupCollapse for custom styling. r=baku

Process the arguments of "MethodGroup" and "MethodGroupCollapsed"
Use the result of ProcessArguments to compute the groupName so we can get
rid of the "%c" parts.

MozReview-Commit-ID: 5B2jqG5RoRj

--HG--
extra : rebase_source : 256ef1ffc80157751cb202cc163cb2ca42c7397a
This commit is contained in:
nchevobbe 2017-04-11 15:14:40 +02:00
Родитель f54bcc5fef
Коммит e7354910af
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1560,6 +1560,9 @@ Console::PopulateConsoleNotificationInTheTargetScope(JSContext* aCx,
case MethodException:
case MethodDebug:
case MethodAssert:
case MethodGroup:
case MethodGroupCollapsed:
case MethodGroupEnd:
event.mArguments.Construct();
event.mStyles.Construct();
if (NS_WARN_IF(!ProcessArguments(aCx, aArguments,
@ -1581,7 +1584,7 @@ Console::PopulateConsoleNotificationInTheTargetScope(JSContext* aCx,
if (aData->mMethodName == MethodGroup ||
aData->mMethodName == MethodGroupCollapsed ||
aData->mMethodName == MethodGroupEnd) {
ComposeGroupName(aCx, aArguments, event.mGroupName);
ComposeGroupName(aCx, event.mArguments.Value(), event.mGroupName);
}
else if (aData->mMethodName == MethodTime && !aArguments.IsEmpty()) {