mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Issue #80 - De-unify dom/security
Exception: CSPUtils relies on something in CSPContext, but on Windows it throws in an MSVC include which provides no hints.
This commit is contained in:
parent
96a88a9097
commit
b6d9a013c8
6 changed files with 47 additions and 3 deletions
|
|
@ -17,6 +17,10 @@
|
|||
#include "nsIURL.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsSandboxFlags.h"
|
||||
#include "nsString.h"
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
#define DEFAULT_PORT -1
|
||||
|
||||
|
|
@ -30,6 +34,29 @@ GetCspUtilsLog()
|
|||
#define CSPUTILSLOG(args) MOZ_LOG(GetCspUtilsLog(), mozilla::LogLevel::Debug, args)
|
||||
#define CSPUTILSLOGENABLED() MOZ_LOG_TEST(GetCspUtilsLog(), mozilla::LogLevel::Debug)
|
||||
|
||||
static const char16_t PERCENT_SIGN = '%';
|
||||
|
||||
static bool
|
||||
isCharacterToken(char16_t aSymbol)
|
||||
{
|
||||
return (aSymbol >= 'a' && aSymbol <= 'z') ||
|
||||
(aSymbol >= 'A' && aSymbol <= 'Z');
|
||||
}
|
||||
|
||||
static bool
|
||||
isNumberToken(char16_t aSymbol)
|
||||
{
|
||||
return (aSymbol >= '0' && aSymbol <= '9');
|
||||
}
|
||||
|
||||
static bool
|
||||
isValidHexDig(char16_t aHexDig)
|
||||
{
|
||||
return (isNumberToken(aHexDig) ||
|
||||
(aHexDig >= 'A' && aHexDig <= 'F') ||
|
||||
(aHexDig >= 'a' && aHexDig <= 'f'));
|
||||
}
|
||||
|
||||
void
|
||||
CSP_PercentDecodeStr(const nsAString& aEncStr, nsAString& outDecStr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue