mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1202186 - use nsISensitiveInfoHidden for console methods, r=baku
This commit is contained in:
parent
5273fa7881
commit
916a108255
@ -18,6 +18,7 @@
|
||||
#include "nsDOMNavigationTiming.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsPerformance.h"
|
||||
#include "ScriptSettings.h"
|
||||
#include "WorkerPrivate.h"
|
||||
@ -34,6 +35,7 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsILoadContext.h"
|
||||
#include "nsIProgrammingLanguage.h"
|
||||
#include "nsISensitiveInfoHiddenURI.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
@ -1210,6 +1212,19 @@ Console::ProcessCallData(ConsoleCallData* aData)
|
||||
|
||||
event.mLevel = aData->mMethodString;
|
||||
event.mFilename = frame.mFilename;
|
||||
|
||||
nsCOMPtr<nsIURI> filenameURI;
|
||||
nsAutoCString pass;
|
||||
if (NS_SUCCEEDED(NS_NewURI(getter_AddRefs(filenameURI), frame.mFilename)) &&
|
||||
NS_SUCCEEDED(filenameURI->GetPassword(pass)) && !pass.IsEmpty()) {
|
||||
nsCOMPtr<nsISensitiveInfoHiddenURI> safeURI = do_QueryInterface(filenameURI);
|
||||
nsAutoCString spec;
|
||||
if (safeURI &&
|
||||
NS_SUCCEEDED(safeURI->GetSensitiveInfoHiddenSpec(spec))) {
|
||||
CopyUTF8toUTF16(spec, event.mFilename);
|
||||
}
|
||||
}
|
||||
|
||||
event.mLineNumber = frame.mLineNumber;
|
||||
event.mColumnNumber = frame.mColumnNumber;
|
||||
event.mFunctionName = frame.mFunctionName;
|
||||
|
Loading…
Reference in New Issue
Block a user