mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-02-06 02:30:56 +00:00
commit
256479e9fc
@ -688,6 +688,34 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
|
||||
return NS_ERROR_DOM_BAD_URI;
|
||||
}
|
||||
|
||||
// See TenFourFox issue 607
|
||||
// determine if this is a script we want to block
|
||||
// Scripts that somehow hit hard limits should go in here
|
||||
if (!mIsTenFourFoxTroublesomeJsAllowed &&
|
||||
(targetScheme.EqualsLiteral("http") || targetScheme.EqualsLiteral("https"))) {
|
||||
nsAutoCString hostname;
|
||||
if (MOZ_LIKELY(NS_SUCCEEDED(targetBaseURI->GetHost(hostname)))) {
|
||||
ToLowerCase(hostname);
|
||||
#define BLOC(q) hostname.EqualsLiteral(q)
|
||||
if (0 ||
|
||||
|
||||
#ifdef __ppc__
|
||||
BLOC("static.twitchcdn.net") ||
|
||||
#endif // __ppc__
|
||||
|
||||
0) {
|
||||
#undef BLOC
|
||||
|
||||
#ifndef DEBUG
|
||||
if (mIsTenFourFoxTroublesomeJsLoggingEnabled)
|
||||
#endif
|
||||
fprintf(stderr, "Warning: TenFourFox blocking problematic script from %s.\n",
|
||||
hostname.get());
|
||||
return NS_ERROR_DOM_BAD_URI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TenFourFox issue 469
|
||||
// determine if this is a script we want to block
|
||||
if (mIsTenFourFoxAdBlockEnabled &&
|
||||
@ -1790,6 +1818,7 @@ static const char* kObservedPrefs[] = {
|
||||
sFileOriginPolicyPrefName,
|
||||
"capability.policy.",
|
||||
"tenfourfox.adblock.",
|
||||
"tenfourfox.troublesome-js.",
|
||||
nullptr
|
||||
};
|
||||
|
||||
@ -1810,6 +1839,8 @@ nsScriptSecurityManager::nsScriptSecurityManager(void)
|
||||
, mIsJavaScriptEnabled(false)
|
||||
, mIsTenFourFoxAdBlockEnabled(false)
|
||||
, mIsTenFourFoxAdBlockLoggingEnabled(false)
|
||||
, mIsTenFourFoxTroublesomeJsAllowed(false)
|
||||
, mIsTenFourFoxTroublesomeJsLoggingEnabled(false)
|
||||
{
|
||||
static_assert(sizeof(intptr_t) == sizeof(void*),
|
||||
"intptr_t and void* have different lengths on this platform. "
|
||||
@ -1950,6 +1981,12 @@ nsScriptSecurityManager::ScriptSecurityPrefChanged()
|
||||
Preferences::GetBool("tenfourfox.adblock.enabled", mIsTenFourFoxAdBlockEnabled);
|
||||
mIsTenFourFoxAdBlockLoggingEnabled =
|
||||
Preferences::GetBool("tenfourfox.adblock.logging.enabled", mIsTenFourFoxAdBlockLoggingEnabled);
|
||||
mIsTenFourFoxTroublesomeJsAllowed =
|
||||
Preferences::GetBool("tenfourfox.troublesome-js.allow",
|
||||
mIsTenFourFoxTroublesomeJsAllowed);
|
||||
mIsTenFourFoxTroublesomeJsLoggingEnabled =
|
||||
Preferences::GetBool("tenfourfox.troublesome-js.logging.enabled",
|
||||
mIsTenFourFoxTroublesomeJsLoggingEnabled);
|
||||
|
||||
//
|
||||
// Rebuild the set of principals for which we allow file:// URI loads. This
|
||||
|
@ -125,6 +125,8 @@ private:
|
||||
bool mIsJavaScriptEnabled;
|
||||
bool mIsTenFourFoxAdBlockEnabled;
|
||||
bool mIsTenFourFoxAdBlockLoggingEnabled;
|
||||
bool mIsTenFourFoxTroublesomeJsAllowed;
|
||||
bool mIsTenFourFoxTroublesomeJsLoggingEnabled;
|
||||
nsTArray<nsCOMPtr<nsIURI>> mFileURIWhitelist;
|
||||
|
||||
// This machinery controls new-style domain policies. The old-style
|
||||
|
@ -57,7 +57,7 @@ endif
|
||||
|
||||
# try to find autoconf 2.13 - discard errors from 'which'
|
||||
# MacOS X 10.4 sends "no autoconf*" errors to stdout, discard those via grep
|
||||
AUTOCONF ?= $(shell which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
|
||||
AUTOCONF ?= $(shell /usr/bin/which autoconf-2.13 autoconf2.13 autoconf213 2>/dev/null | grep -v '^no autoconf' | head -1)
|
||||
|
||||
# See if the autoconf package was installed through fink
|
||||
ifeq (,$(strip $(AUTOCONF)))
|
||||
|
11
config/external/nss/Makefile.in
vendored
11
config/external/nss/Makefile.in
vendored
@ -10,6 +10,17 @@ CXX_WRAPPER =
|
||||
|
||||
default::
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
# TenFourFox Intel fix
|
||||
# TO DO - pass the compiler in as an environment variable
|
||||
CC=clang-mp-3.4
|
||||
CC += -arch i386
|
||||
CC += -O3
|
||||
CCC=clang++-mp-3.4
|
||||
CCC += -arch i386
|
||||
CCC += -O3
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/makefiles/functions.mk
|
||||
|
||||
NSS_LIBS = \
|
||||
|
@ -272,8 +272,7 @@ void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
|
||||
int width);
|
||||
asm(
|
||||
".text\n"
|
||||
".global FastConvertYUVToRGB32Row_SSE\n"
|
||||
".type FastConvertYUVToRGB32Row_SSE, @function\n"
|
||||
".globl FastConvertYUVToRGB32Row_SSE\n"
|
||||
"FastConvertYUVToRGB32Row_SSE:\n"
|
||||
"pusha\n"
|
||||
"mov 0x24(%esp),%edx\n"
|
||||
@ -350,8 +349,7 @@ void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
|
||||
int source_dx);
|
||||
asm(
|
||||
".text\n"
|
||||
".global ScaleYUVToRGB32Row_SSE\n"
|
||||
".type ScaleYUVToRGB32Row_SSE, @function\n"
|
||||
".globl ScaleYUVToRGB32Row_SSE\n"
|
||||
"ScaleYUVToRGB32Row_SSE:\n"
|
||||
"pusha\n"
|
||||
"mov 0x24(%esp),%edx\n"
|
||||
@ -444,8 +442,7 @@ void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
|
||||
int source_dx);
|
||||
asm(
|
||||
".text\n"
|
||||
".global LinearScaleYUVToRGB32Row_SSE\n"
|
||||
".type LinearScaleYUVToRGB32Row_SSE, @function\n"
|
||||
".globl LinearScaleYUVToRGB32Row_SSE\n"
|
||||
"LinearScaleYUVToRGB32Row_SSE:\n"
|
||||
"pusha\n"
|
||||
"mov 0x24(%esp),%edx\n"
|
||||
|
@ -1,6 +1,12 @@
|
||||
. $topsrcdir/browser/config/mozconfig
|
||||
export CC="/opt/local/bin/gcc-mp-4.8 -flax-vector-conversions -O3 -m32 -march=pentium-m -read_only_relocs suppress -mdynamic-no-pic"
|
||||
export CXX="/opt/local/bin/g++-mp-4.8 -flax-vector-conversions -fpermissive -O3 -m32 -march=pentium-m -read_only_relocs suppress -mdynamic-no-pic"
|
||||
|
||||
# we need to use -Wa,-Q to force the behaviour of the traditional assembler on MacPorts
|
||||
# as that is the only one that can accept all the output from gcc-4.8 without errors
|
||||
# recent changes in MacPorts will force clang as assembler if certain clangs are found otherwise
|
||||
export CC="/opt/local/bin/gcc-mp-4.8 -Wa,-Q -flax-vector-conversions -O3 -m32 -march=pentium-m -read_only_relocs suppress"
|
||||
export CXX="/opt/local/bin/g++-mp-4.8 -Wa,-Q -flax-vector-conversions -fpermissive -O3 -m32 -march=pentium-m -read_only_relocs suppress"
|
||||
|
||||
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg
|
||||
mk_add_options MOZ_MAKE_FLAGS="-s -j2"
|
||||
mk_add_options AUTOCONF=autoconf213
|
||||
|
@ -9,6 +9,15 @@ VPX_AS=gcc
|
||||
VPX_ASM_SUFFIX=s
|
||||
endif
|
||||
|
||||
ifdef VPX_X86_ASM
|
||||
# TO DO - pass these in as an environment variable
|
||||
CC=clang-mp-3.4
|
||||
CC += -arch i386
|
||||
CC += -O3
|
||||
VPX_AS=yasm
|
||||
VPX_ASM_SUFFIX=asm
|
||||
endif
|
||||
|
||||
# Set up the libvpx assembler config.
|
||||
|
||||
AS=$(VPX_AS)
|
||||
|
@ -102,6 +102,7 @@ if CONFIG['CLANG_CL'] or not CONFIG['_MSC_VER']:
|
||||
if CONFIG['GNU_CC']:
|
||||
CFLAGS += ['-Wno-sign-compare']
|
||||
|
||||
|
||||
ASFLAGS += CONFIG['VPX_ASFLAGS']
|
||||
ASFLAGS += [
|
||||
'-I.',
|
||||
@ -109,7 +110,10 @@ ASFLAGS += [
|
||||
'-I%s/media/libvpx/vpx_ports/' % TOPSRCDIR,
|
||||
]
|
||||
# moved from Makefile.in for TenFourFox
|
||||
ASFLAGS += ['-force_cpusubtype_ALL']
|
||||
|
||||
# this only works on gcc-as (ie PPC)
|
||||
if not '86' in CONFIG['OS_TEST']:
|
||||
ASFLAGS += ['-force_cpusubtype_ALL']
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
# For LIBVPX_RAND
|
||||
|
Loading…
x
Reference in New Issue
Block a user