Bug 717611 - Add nsConsoleService::ResetWindow to clear messages for a given window id; r=baku.

This will allow devtools to clear cached error messages, like
we already can with ConsoleAPI messages.

Differential Revision: https://phabricator.services.mozilla.com/D21693

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Chevobbe 2019-03-04 10:01:01 +00:00
Родитель 58536c524e
Коммит b874ef387a
2 изменённых файлов: 13 добавлений и 0 удалений

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

@ -452,6 +452,14 @@ nsConsoleService::Reset() {
return NS_OK;
}
NS_IMETHODIMP
nsConsoleService::ResetWindow(uint64_t windowInnerId) {
MOZ_RELEASE_ASSERT(NS_IsMainThread());
ClearMessagesForWindowID(windowInnerId);
return NS_OK;
}
NS_IMETHODIMP
nsConsoleService::Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData) {

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

@ -44,6 +44,11 @@ interface nsIConsoleService : nsISupports
* Clear the message buffer (e.g. for privacy reasons).
*/
void reset();
/**
* Clear the message buffer for a given window.
*/
void resetWindow(in uint64_t windowInnerId);
};