mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge inbound to m-c.
This commit is contained in:
commit
0d3509d3c7
@ -168,9 +168,6 @@ ifdef MOZ_CRASHREPORTER
|
||||
$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) "$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip"
|
||||
endif
|
||||
|
||||
codesighs:
|
||||
$(MAKE) -C $(MOZ_BUILD_APP)/installer codesighs
|
||||
|
||||
# defined in package-name.mk
|
||||
export MOZ_SOURCE_STAMP
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --enable-codesighs
|
||||
ac_add_options --enable-signmar
|
||||
|
||||
# Nightlies only since this has a cost in performance
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --enable-codesighs
|
||||
ac_add_options --enable-signmar
|
||||
|
||||
# Nightlies only since this has a cost in performance
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-update-packaging
|
||||
ac_add_options --enable-codesighs
|
||||
ac_add_options --enable-signmar
|
||||
|
||||
# Nightlies only since this has a cost in performance
|
||||
|
@ -1,6 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
|
||||
|
||||
ac_add_options --enable-codesighs
|
||||
ac_add_options --enable-signmar
|
||||
ac_add_options --enable-profiling
|
||||
ac_add_options --disable-elf-hack # --enable-elf-hack conflicts with --enable-profiling
|
||||
|
@ -5,9 +5,6 @@ ac_add_options --enable-optimize="-O2 -g"
|
||||
# ASan specific options on Linux
|
||||
ac_add_options --enable-valgrind
|
||||
|
||||
# Other options
|
||||
ac_add_options --enable-codesighs
|
||||
|
||||
. $topsrcdir/build/unix/mozconfig.asan
|
||||
|
||||
# Package js shell.
|
||||
|
@ -1,6 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
|
||||
|
||||
ac_add_options --enable-codesighs
|
||||
ac_add_options --enable-signmar
|
||||
ac_add_options --enable-profiling
|
||||
ac_add_options --disable-elf-hack # --enable-elf-hack conflicts with --enable-profiling
|
||||
|
@ -5,9 +5,6 @@ ac_add_options --enable-optimize="-O2 -g"
|
||||
# ASan specific options on Linux
|
||||
ac_add_options --enable-valgrind
|
||||
|
||||
# Other options
|
||||
ac_add_options --enable-codesighs
|
||||
|
||||
. $topsrcdir/build/unix/mozconfig.asan
|
||||
|
||||
# Package js shell.
|
||||
|
@ -1,6 +1,5 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/macosx-universal/common-opt"
|
||||
|
||||
ac_add_options --enable-codesighs
|
||||
ac_add_options --disable-install-strip
|
||||
ac_add_options --enable-signmar
|
||||
ac_add_options --enable-profiling
|
||||
|
@ -16,7 +16,6 @@ for platform in all_platforms:
|
||||
|
||||
for platform in ['linux32', 'linux64', 'macosx-universal']:
|
||||
whitelist['nightly'][platform] += [
|
||||
'ac_add_options --enable-codesighs',
|
||||
'mk_add_options MOZ_MAKE_FLAGS="-j4"',
|
||||
]
|
||||
|
||||
|
@ -324,23 +324,11 @@ ifdef MOZ_DEBUG
|
||||
CODFILE=$(basename $(@F)).cod
|
||||
endif
|
||||
|
||||
ifdef MOZ_MAPINFO
|
||||
ifdef SHARED_LIBRARY_NAME
|
||||
MAPFILE=$(SHARED_LIBRARY_NAME).map
|
||||
else
|
||||
MAPFILE=$(basename $(@F)).map
|
||||
endif # SHARED_LIBRARY_NAME
|
||||
endif # MOZ_MAPINFO
|
||||
|
||||
ifdef DEFFILE
|
||||
OS_LDFLAGS += -DEF:$(call normalizepath,$(DEFFILE))
|
||||
EXTRA_DEPS += $(DEFFILE)
|
||||
endif
|
||||
|
||||
ifdef MAPFILE
|
||||
OS_LDFLAGS += -MAP:$(MAPFILE)
|
||||
endif
|
||||
|
||||
else #!GNU_CC
|
||||
|
||||
ifdef DEFFILE
|
||||
@ -399,7 +387,7 @@ ALL_TRASH = \
|
||||
$(OBJS:.$(OBJ_SUFFIX)=.i) $(OBJS:.$(OBJ_SUFFIX)=.i_o) \
|
||||
$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) $(DEF_FILE)\
|
||||
$(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
|
||||
$(wildcard *.pdb) $(CODFILE) $(MAPFILE) $(IMPORT_LIBRARY) \
|
||||
$(wildcard *.pdb) $(CODFILE) $(IMPORT_LIBRARY) \
|
||||
$(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
|
||||
$(PROGRAM:$(BIN_SUFFIX)=.exp) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.exp) \
|
||||
$(PROGRAM:$(BIN_SUFFIX)=.lib) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.lib) \
|
||||
|
16
configure.in
16
configure.in
@ -7567,21 +7567,6 @@ if test -n "$MOZ_REFLOW_PERF"; then
|
||||
AC_DEFINE(MOZ_REFLOW_PERF)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Enable code size metrics.
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(codesighs,
|
||||
[ --enable-codesighs Enable code size analysis tools],
|
||||
_ENABLE_CODESIGHS=1,
|
||||
_ENABLE_CODESIGHS= )
|
||||
if test -n "$_ENABLE_CODESIGHS"; then
|
||||
if test -d $srcdir/tools/codesighs; then
|
||||
MOZ_MAPINFO=1
|
||||
else
|
||||
AC_MSG_ERROR([Codesighs directory $srcdir/tools/codesighs required.])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable Radio Interface for B2G (Gonk usually)
|
||||
dnl ========================================================
|
||||
@ -8774,7 +8759,6 @@ if test -n "$MOZ_TELEMETRY_REPORTING" || test -n "$MOZ_SERVICES_HEALTHREPORT" ||
|
||||
fi
|
||||
|
||||
dnl win32 options
|
||||
AC_SUBST(MOZ_MAPINFO)
|
||||
AC_SUBST(MOZ_BROWSE_INFO)
|
||||
AC_SUBST(MOZ_TOOLS_DIR)
|
||||
AC_SUBST(WIN32_REDIST_DIR)
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
static bool IsImageSrcSetDisabled();
|
||||
|
||||
static bool LookupBindingMember(JSContext* aCx, nsIContent *aContent,
|
||||
JS::HandleId aId, JSPropertyDescriptor* aDesc);
|
||||
JS::HandleId aId, JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
|
||||
/**
|
||||
* Returns the parent node of aChild crossing document boundaries.
|
||||
|
@ -1756,7 +1756,7 @@ nsContentUtils::IsImageSrcSetDisabled()
|
||||
// static
|
||||
bool
|
||||
nsContentUtils::LookupBindingMember(JSContext* aCx, nsIContent *aContent,
|
||||
JS::HandleId aId, JSPropertyDescriptor* aDesc)
|
||||
JS::HandleId aId, JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
{
|
||||
nsXBLBinding* binding = aContent->GetXBLBinding();
|
||||
if (!binding)
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
|
||||
bool AppendDone() const
|
||||
{
|
||||
return mReadyState == MediaSourceReadyState::Closed;
|
||||
return mReadyState == MediaSourceReadyState::Closed || mReadyState == MediaSourceReadyState::Ended;
|
||||
}
|
||||
|
||||
// Attach this MediaSource to MediaElement aElement. Returns false if already attached.
|
||||
|
@ -202,11 +202,14 @@ bool WaveReader::DecodeAudioData()
|
||||
int64_t readSize = std::min(BLOCK_SIZE, remaining);
|
||||
int64_t frames = readSize / mFrameSize;
|
||||
|
||||
PR_STATIC_ASSERT(uint64_t(BLOCK_SIZE) < UINT_MAX / sizeof(AudioDataValue) / MAX_CHANNELS);
|
||||
static_assert(uint64_t(BLOCK_SIZE) < UINT_MAX /
|
||||
sizeof(AudioDataValue) / MAX_CHANNELS,
|
||||
"bufferSize calculation could overflow.");
|
||||
const size_t bufferSize = static_cast<size_t>(frames * mChannels);
|
||||
nsAutoArrayPtr<AudioDataValue> sampleBuffer(new AudioDataValue[bufferSize]);
|
||||
|
||||
PR_STATIC_ASSERT(uint64_t(BLOCK_SIZE) < UINT_MAX / sizeof(char));
|
||||
static_assert(uint64_t(BLOCK_SIZE) < UINT_MAX / sizeof(char),
|
||||
"BLOCK_SIZE too large for enumerator.");
|
||||
nsAutoArrayPtr<char> dataBuffer(new char[static_cast<size_t>(readSize)]);
|
||||
|
||||
if (!ReadAll(dataBuffer, readSize)) {
|
||||
@ -334,14 +337,15 @@ WaveReader::LoadRIFFChunk()
|
||||
return false;
|
||||
}
|
||||
|
||||
PR_STATIC_ASSERT(sizeof(uint32_t) * 2 <= RIFF_INITIAL_SIZE);
|
||||
static_assert(sizeof(uint32_t) * 3 <= RIFF_INITIAL_SIZE,
|
||||
"Reads would overflow riffHeader buffer.");
|
||||
if (ReadUint32BE(&p) != RIFF_CHUNK_MAGIC) {
|
||||
NS_WARNING("resource data not in RIFF format");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip over RIFF size field.
|
||||
p += 4;
|
||||
p += sizeof(uint32_t);
|
||||
|
||||
if (ReadUint32BE(&p) != WAVE_CHUNK_MAGIC) {
|
||||
NS_WARNING("Expected WAVE chunk");
|
||||
@ -366,12 +370,13 @@ WaveReader::LoadFormatChunk(uint32_t aChunkSize)
|
||||
return false;
|
||||
}
|
||||
|
||||
PR_STATIC_ASSERT(sizeof(uint16_t) +
|
||||
sizeof(uint16_t) +
|
||||
sizeof(uint32_t) +
|
||||
4 +
|
||||
sizeof(uint16_t) +
|
||||
sizeof(uint16_t) <= sizeof(waveFormat));
|
||||
static_assert(sizeof(uint16_t) +
|
||||
sizeof(uint16_t) +
|
||||
sizeof(uint32_t) +
|
||||
4 +
|
||||
sizeof(uint16_t) +
|
||||
sizeof(uint16_t) <= sizeof(waveFormat),
|
||||
"Reads would overflow waveFormat buffer.");
|
||||
if (ReadUint16LE(&p) != WAVE_FORMAT_ENCODING_PCM) {
|
||||
NS_WARNING("WAVE is not uncompressed PCM, compressed encodings are not supported");
|
||||
return false;
|
||||
@ -400,7 +405,8 @@ WaveReader::LoadFormatChunk(uint32_t aChunkSize)
|
||||
return false;
|
||||
}
|
||||
|
||||
PR_STATIC_ASSERT(sizeof(uint16_t) <= sizeof(extLength));
|
||||
static_assert(sizeof(uint16_t) <= sizeof(extLength),
|
||||
"Reads would overflow extLength buffer.");
|
||||
uint16_t extra = ReadUint16LE(&p);
|
||||
if (aChunkSize - (WAVE_FORMAT_CHUNK_SIZE + 2) != extra) {
|
||||
NS_WARNING("Invalid extended format chunk size");
|
||||
@ -409,7 +415,8 @@ WaveReader::LoadFormatChunk(uint32_t aChunkSize)
|
||||
extra += extra % 2;
|
||||
|
||||
if (extra > 0) {
|
||||
PR_STATIC_ASSERT(UINT16_MAX + (UINT16_MAX % 2) < UINT_MAX / sizeof(char));
|
||||
static_assert(UINT16_MAX + (UINT16_MAX % 2) < UINT_MAX / sizeof(char),
|
||||
"chunkExtension array too large for iterator.");
|
||||
nsAutoArrayPtr<char> chunkExtension(new char[extra]);
|
||||
if (!ReadAll(chunkExtension.get(), extra)) {
|
||||
return false;
|
||||
@ -522,7 +529,8 @@ WaveReader::GetNextChunk(uint32_t* aChunk, uint32_t* aChunkSize)
|
||||
return false;
|
||||
}
|
||||
|
||||
PR_STATIC_ASSERT(sizeof(uint32_t) * 2 <= CHUNK_HEADER_SIZE);
|
||||
static_assert(sizeof(uint32_t) * 2 <= CHUNK_HEADER_SIZE,
|
||||
"Reads would overflow chunkHeader buffer.");
|
||||
*aChunk = ReadUint32BE(&p);
|
||||
*aChunkSize = ReadUint32LE(&p);
|
||||
|
||||
@ -538,7 +546,8 @@ WaveReader::LoadListChunk(uint32_t aChunkSize,
|
||||
"LoadListChunk called with unaligned resource");
|
||||
|
||||
static const unsigned int MAX_CHUNK_SIZE = 1 << 16;
|
||||
PR_STATIC_ASSERT(MAX_CHUNK_SIZE < UINT_MAX / sizeof(char));
|
||||
static_assert(uint64_t(MAX_CHUNK_SIZE) < UINT_MAX / sizeof(char),
|
||||
"MAX_CHUNK_SIZE too large for enumerator.");
|
||||
|
||||
if (aChunkSize > MAX_CHUNK_SIZE) {
|
||||
return false;
|
||||
@ -625,7 +634,8 @@ WaveReader::LoadAllChunks(nsAutoPtr<HTMLMediaElement::MetadataTags> &aTags)
|
||||
return false;
|
||||
}
|
||||
|
||||
PR_STATIC_ASSERT(sizeof(uint32_t) * 2 <= CHUNK_HEADER_SIZE);
|
||||
static_assert(sizeof(uint32_t) * 2 <= CHUNK_HEADER_SIZE,
|
||||
"Reads would overflow chunkHeader buffer.");
|
||||
|
||||
uint32_t magic = ReadUint32BE(&p);
|
||||
uint32_t chunkSize = ReadUint32LE(&p);
|
||||
@ -664,7 +674,8 @@ WaveReader::LoadAllChunks(nsAutoPtr<HTMLMediaElement::MetadataTags> &aTags)
|
||||
}
|
||||
|
||||
static const int64_t MAX_CHUNK_SIZE = 1 << 16;
|
||||
PR_STATIC_ASSERT(uint64_t(MAX_CHUNK_SIZE) < UINT_MAX / sizeof(char));
|
||||
static_assert(uint64_t(MAX_CHUNK_SIZE) < UINT_MAX / sizeof(char),
|
||||
"MAX_CHUNK_SIZE too large for enumerator.");
|
||||
nsAutoArrayPtr<char> chunk(new char[MAX_CHUNK_SIZE]);
|
||||
while (forward.value() > 0) {
|
||||
int64_t size = std::min(forward.value(), MAX_CHUNK_SIZE);
|
||||
|
@ -16,6 +16,9 @@
|
||||
#include "ImageContainer.h"
|
||||
#include "Layers.h"
|
||||
#include "mozilla/layers/LayersTypes.h"
|
||||
#include "WinUtils.h"
|
||||
|
||||
using namespace mozilla::widget;
|
||||
|
||||
#ifndef MOZ_SAMPLE_TYPE_FLOAT32
|
||||
#error We expect 32bit float audio samples on desktop for the Windows Media Foundation media backend.
|
||||
@ -102,7 +105,10 @@ WMFReader::OnDecodeThreadFinish()
|
||||
bool
|
||||
WMFReader::InitializeDXVA()
|
||||
{
|
||||
if (!Preferences::GetBool("media.windows-media-foundation.use-dxva", false)) {
|
||||
if (!Preferences::GetBool("media.windows-media-foundation.use-dxva", false) ||
|
||||
WinUtils::GetWindowsVersion() == WinUtils::VISTA_VERSION) {
|
||||
// Don't use DXVA on Vista until bug 901944's fix has time to bake on
|
||||
// the release train.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1105,10 +1105,10 @@ nsXBLBinding::ResolveAllFields(JSContext *cx, JS::Handle<JSObject*> obj) const
|
||||
|
||||
bool
|
||||
nsXBLBinding::LookupMember(JSContext* aCx, JS::HandleId aId,
|
||||
JSPropertyDescriptor* aDesc)
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc)
|
||||
{
|
||||
// We should never enter this function with a pre-filled property descriptor.
|
||||
MOZ_ASSERT(!aDesc->obj);
|
||||
MOZ_ASSERT(!aDesc.object());
|
||||
|
||||
// Get the string as an nsString before doing anything, so we can make
|
||||
// convenient comparisons during our search.
|
||||
@ -1148,7 +1148,7 @@ nsXBLBinding::LookupMember(JSContext* aCx, JS::HandleId aId,
|
||||
bool
|
||||
nsXBLBinding::LookupMemberInternal(JSContext* aCx, nsString& aName,
|
||||
JS::HandleId aNameAsId,
|
||||
JSPropertyDescriptor* aDesc,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JS::Handle<JSObject*> aXBLScope)
|
||||
{
|
||||
// First, see if we have a JSClass. If we don't, it means that this binding
|
||||
@ -1186,7 +1186,7 @@ nsXBLBinding::LookupMemberInternal(JSContext* aCx, nsString& aName,
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (aDesc->obj || !mNextBinding) {
|
||||
if (aDesc.object() || !mNextBinding) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
* May only be called when XBL code is being run in a separate scope, because
|
||||
* otherwise we don't have untainted data with which to do a proper lookup.
|
||||
*/
|
||||
bool LookupMember(JSContext* aCx, JS::HandleId aId, JSPropertyDescriptor* aDesc);
|
||||
bool LookupMember(JSContext* aCx, JS::HandleId aId, JS::MutableHandle<JSPropertyDescriptor> aDesc);
|
||||
|
||||
/*
|
||||
* Determines whether the binding has a field with the given name.
|
||||
@ -94,7 +94,8 @@ protected:
|
||||
* Internal version. Requires that aCx is in appropriate xbl scope.
|
||||
*/
|
||||
bool LookupMemberInternal(JSContext* aCx, nsString& aName, JS::HandleId aNameAsId,
|
||||
JSPropertyDescriptor* aDesc, JS::Handle<JSObject*> aXBLScope);
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JS::Handle<JSObject*> aXBLScope);
|
||||
|
||||
public:
|
||||
|
||||
|
@ -216,7 +216,7 @@ nsXBLProtoImpl::CompilePrototypeMembers(nsXBLPrototypeBinding* aBinding)
|
||||
bool
|
||||
nsXBLProtoImpl::LookupMember(JSContext* aCx, nsString& aName,
|
||||
JS::HandleId aNameAsId,
|
||||
JSPropertyDescriptor* aDesc,
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc,
|
||||
JSObject* aClassObject)
|
||||
{
|
||||
for (nsXBLProtoImplMember* m = mMembers; m; m = m->GetNext()) {
|
||||
|
@ -19,34 +19,34 @@ class nsXBLProtoImplAnonymousMethod;
|
||||
class nsXBLProtoImpl
|
||||
{
|
||||
public:
|
||||
nsXBLProtoImpl()
|
||||
nsXBLProtoImpl()
|
||||
: mClassObject(nullptr),
|
||||
mMembers(nullptr),
|
||||
mFields(nullptr),
|
||||
mConstructor(nullptr),
|
||||
mDestructor(nullptr)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsXBLProtoImpl);
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsXBLProtoImpl);
|
||||
}
|
||||
~nsXBLProtoImpl()
|
||||
{
|
||||
~nsXBLProtoImpl()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsXBLProtoImpl);
|
||||
// Note: the constructor and destructor are in mMembers, so we'll
|
||||
// clean them up automatically.
|
||||
delete mMembers;
|
||||
delete mFields;
|
||||
}
|
||||
|
||||
|
||||
nsresult InstallImplementation(nsXBLPrototypeBinding* aPrototypeBinding, nsXBLBinding* aBinding);
|
||||
nsresult InitTargetObjects(nsXBLPrototypeBinding* aBinding,
|
||||
nsIContent* aBoundElement,
|
||||
nsIContent* aBoundElement,
|
||||
nsIXPConnectJSObjectHolder** aScriptObjectHolder,
|
||||
JS::MutableHandle<JSObject*> aTargetClassObject,
|
||||
bool* aTargetIsNew);
|
||||
nsresult CompilePrototypeMembers(nsXBLPrototypeBinding* aBinding);
|
||||
|
||||
bool LookupMember(JSContext* aCx, nsString& aName, JS::HandleId aNameAsId,
|
||||
JSPropertyDescriptor* aDesc, JSObject* aClassObject);
|
||||
JS::MutableHandle<JSPropertyDescriptor> aDesc, JSObject* aClassObject);
|
||||
|
||||
void SetMemberList(nsXBLProtoImplMember* aMemberList)
|
||||
{
|
||||
@ -95,9 +95,9 @@ protected:
|
||||
}
|
||||
|
||||
void DestroyMembers();
|
||||
|
||||
|
||||
public:
|
||||
nsCString mClassName; // The name of the class.
|
||||
nsCString mClassName; // The name of the class.
|
||||
|
||||
protected:
|
||||
JSObject* mClassObject; // The class object for the binding. We'll use this to pre-compile properties
|
||||
@ -106,15 +106,15 @@ protected:
|
||||
nsXBLProtoImplMember* mMembers; // The members of an implementation are chained in this singly-linked list.
|
||||
|
||||
nsXBLProtoImplField* mFields; // Our fields
|
||||
|
||||
|
||||
public:
|
||||
nsXBLProtoImplAnonymousMethod* mConstructor; // Our class constructor.
|
||||
nsXBLProtoImplAnonymousMethod* mDestructor; // Our class destructor.
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewXBLProtoImpl(nsXBLPrototypeBinding* aBinding,
|
||||
const PRUnichar* aClassName,
|
||||
NS_NewXBLProtoImpl(nsXBLPrototypeBinding* aBinding,
|
||||
const PRUnichar* aClassName,
|
||||
nsXBLProtoImpl** aResult);
|
||||
|
||||
#endif // nsXBLProtoImpl_h__
|
||||
|
@ -829,7 +829,7 @@ static bool
|
||||
XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
const Prefable<const JSPropertySpec>* attributes, jsid* attributeIds,
|
||||
const JSPropertySpec* attributeSpecs, JSPropertyDescriptor* desc)
|
||||
const JSPropertySpec* attributeSpecs, JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
{
|
||||
for (; attributes->specs; ++attributes) {
|
||||
if (attributes->isEnabled(cx, obj)) {
|
||||
@ -842,7 +842,7 @@ XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
// Because of centralization, we need to make sure we fault in the
|
||||
// JitInfos as well. At present, until the JSAPI changes, the easiest
|
||||
// way to do this is wrap them up as functions ourselves.
|
||||
desc->attrs = attrSpec.flags & ~JSPROP_NATIVE_ACCESSORS;
|
||||
desc.setAttributes(attrSpec.flags & ~JSPROP_NATIVE_ACCESSORS);
|
||||
// They all have getters, so we can just make it.
|
||||
JS::Rooted<JSObject*> global(cx, JS_GetGlobalForObject(cx, wrapper));
|
||||
JS::Rooted<JSFunction*> fun(cx,
|
||||
@ -852,8 +852,8 @@ XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
return false;
|
||||
SET_JITINFO(fun, attrSpec.getter.info);
|
||||
JSObject *funobj = JS_GetFunctionObject(fun);
|
||||
desc->getter = js::CastAsJSPropertyOp(funobj);
|
||||
desc->attrs |= JSPROP_GETTER;
|
||||
desc.setGetterObject(funobj);
|
||||
desc.attributesRef() |= JSPROP_GETTER;
|
||||
if (attrSpec.setter.op) {
|
||||
// We have a setter! Make it.
|
||||
fun = JS_NewFunctionById(cx, (JSNative)attrSpec.setter.op, 1, 0,
|
||||
@ -862,12 +862,12 @@ XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
return false;
|
||||
SET_JITINFO(fun, attrSpec.setter.info);
|
||||
funobj = JS_GetFunctionObject(fun);
|
||||
desc->setter = js::CastAsJSStrictPropertyOp(funobj);
|
||||
desc->attrs |= JSPROP_SETTER;
|
||||
desc.setSetterObject(funobj);
|
||||
desc.attributesRef() |= JSPROP_SETTER;
|
||||
} else {
|
||||
desc->setter = nullptr;
|
||||
desc.setSetter(nullptr);
|
||||
}
|
||||
desc->obj = wrapper;
|
||||
desc.object().set(wrapper);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -879,7 +879,7 @@ XrayResolveAttribute(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
static bool
|
||||
XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
JSPropertyDescriptor* desc, DOMObjectType type,
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc, DOMObjectType type,
|
||||
const NativeProperties* nativeProperties)
|
||||
{
|
||||
const Prefable<const JSFunctionSpec>* methods;
|
||||
@ -912,11 +912,11 @@ XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
}
|
||||
SET_JITINFO(fun, methodSpec.call.info);
|
||||
JSObject *funobj = JS_GetFunctionObject(fun);
|
||||
desc->value.setObject(*funobj);
|
||||
desc->attrs = methodSpec.flags;
|
||||
desc->obj = wrapper;
|
||||
desc->setter = nullptr;
|
||||
desc->getter = nullptr;
|
||||
desc.value().setObject(*funobj);
|
||||
desc.setAttributes(methodSpec.flags);
|
||||
desc.object().set(wrapper);
|
||||
desc.setSetter(nullptr);
|
||||
desc.setGetter(nullptr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -932,7 +932,7 @@ XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
nativeProperties->staticAttributeSpecs, desc)) {
|
||||
return false;
|
||||
}
|
||||
if (desc->obj) {
|
||||
if (desc.object()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -944,7 +944,7 @@ XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
nativeProperties->attributeSpecs, desc)) {
|
||||
return false;
|
||||
}
|
||||
if (desc->obj) {
|
||||
if (desc.object()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -956,7 +956,7 @@ XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
desc)) {
|
||||
return false;
|
||||
}
|
||||
if (desc->obj) {
|
||||
if (desc.object()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -971,9 +971,9 @@ XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
size_t i = constant->specs - nativeProperties->constantSpecs;
|
||||
for ( ; nativeProperties->constantIds[i] != JSID_VOID; ++i) {
|
||||
if (id == nativeProperties->constantIds[i]) {
|
||||
desc->attrs = JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT;
|
||||
desc->obj = wrapper;
|
||||
desc->value = nativeProperties->constantSpecs[i].value;
|
||||
desc.setAttributes(JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
desc.object().set(wrapper);
|
||||
desc.value().set(nativeProperties->constantSpecs[i].value);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -988,7 +988,7 @@ static bool
|
||||
ResolvePrototypeOrConstructor(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj,
|
||||
size_t protoAndIfaceArrayIndex, unsigned attrs,
|
||||
JSPropertyDescriptor* desc)
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
{
|
||||
JS::Rooted<JSObject*> global(cx, js::GetGlobalForObjectCrossCompartment(obj));
|
||||
{
|
||||
@ -998,12 +998,12 @@ ResolvePrototypeOrConstructor(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
if (!protoOrIface) {
|
||||
return false;
|
||||
}
|
||||
desc->obj = wrapper;
|
||||
desc->shortid = 0;
|
||||
desc->attrs = attrs;
|
||||
desc->getter = JS_PropertyStub;
|
||||
desc->setter = JS_StrictPropertyStub;
|
||||
desc->value = JS::ObjectValue(*protoOrIface);
|
||||
desc.object().set(wrapper);
|
||||
desc.setShortId(0);
|
||||
desc.setAttributes(attrs);
|
||||
desc.setGetter(JS_PropertyStub);
|
||||
desc.setSetter(JS_StrictPropertyStub);
|
||||
desc.value().set(JS::ObjectValue(*protoOrIface));
|
||||
}
|
||||
return JS_WrapPropertyDescriptor(cx, desc);
|
||||
}
|
||||
@ -1013,7 +1013,7 @@ XrayResolveNativeProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
const NativePropertyHooks* nativePropertyHooks,
|
||||
DOMObjectType type, JS::Handle<JSObject*> obj,
|
||||
JS::Handle<jsid> id,
|
||||
JSPropertyDescriptor* desc)
|
||||
JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
{
|
||||
if (type == eInterface && IdEquals(id, "prototype")) {
|
||||
return nativePropertyHooks->mPrototypeID == prototypes::id::_ID_Count ||
|
||||
@ -1039,7 +1039,7 @@ XrayResolveNativeProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!desc->obj &&
|
||||
if (!desc.object() &&
|
||||
nativeProperties.chromeOnly &&
|
||||
xpc::AccessCheck::isChrome(js::GetObjectCompartment(wrapper)) &&
|
||||
!XrayResolveProperty(cx, wrapper, obj, id, desc, type,
|
||||
@ -1053,7 +1053,7 @@ XrayResolveNativeProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
bool
|
||||
XrayResolveNativeProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj,
|
||||
JS::Handle<jsid> id, JSPropertyDescriptor* desc)
|
||||
JS::Handle<jsid> id, JS::MutableHandle<JSPropertyDescriptor> desc)
|
||||
{
|
||||
DOMObjectType type;
|
||||
const NativePropertyHooks* nativePropertyHooks =
|
||||
@ -1072,7 +1072,7 @@ XrayResolveNativeProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (desc->obj) {
|
||||
if (desc.object()) {
|
||||
return true;
|
||||
}
|
||||
} while ((nativePropertyHooks = nativePropertyHooks->mProtoHooks));
|
||||
@ -1459,8 +1459,7 @@ NativeToString(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
toStringDesc.value().set(JS::UndefinedValue());
|
||||
JS::Rooted<jsid> id(cx,
|
||||
nsXPConnect::GetRuntimeInstance()->GetStringID(XPCJSRuntime::IDX_TO_STRING));
|
||||
if (!XrayResolveNativeProperty(cx, wrapper, obj, id,
|
||||
toStringDesc.address())) {
|
||||
if (!XrayResolveNativeProperty(cx, wrapper, obj, id, &toStringDesc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1924,7 +1924,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
bool
|
||||
XrayResolveNativeProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<JSObject*> obj,
|
||||
JS::Handle<jsid> id, JSPropertyDescriptor* desc);
|
||||
JS::Handle<jsid> id, JS::MutableHandle<JSPropertyDescriptor> desc);
|
||||
|
||||
/**
|
||||
* Define a property on obj through an Xray wrapper.
|
||||
|
@ -7125,7 +7125,7 @@ class CGDOMJSProxyHandler_getOwnPropertyDescriptor(ClassMethod):
|
||||
"}\n") % (self.descriptor.nativeType)
|
||||
|
||||
if UseHolderForUnforgeable(self.descriptor):
|
||||
getUnforgeable = """if (!JS_GetPropertyDescriptorById(cx, ${holder}, id, flags, desc.address())) {
|
||||
getUnforgeable = """if (!JS_GetPropertyDescriptorById(cx, ${holder}, id, flags, desc)) {
|
||||
return false;
|
||||
}
|
||||
MOZ_ASSERT_IF(desc.object(), desc.object() == ${holder});"""
|
||||
@ -7133,7 +7133,7 @@ MOZ_ASSERT_IF(desc.object(), desc.object() == ${holder});"""
|
||||
getUnforgeable, "isXray")
|
||||
getUnforgeable += """if (desc.object()) {
|
||||
desc.object().set(proxy);
|
||||
return !isXray || JS_WrapPropertyDescriptor(cx, desc.address());
|
||||
return !isXray || JS_WrapPropertyDescriptor(cx, desc);
|
||||
}
|
||||
|
||||
"""
|
||||
@ -7202,7 +7202,7 @@ MOZ_ASSERT_IF(desc.object(), desc.object() == ${holder});"""
|
||||
|
||||
return setOrIndexedGet + """JS::Rooted<JSObject*> expando(cx);
|
||||
if (!isXray && (expando = GetExpandoObject(proxy))) {
|
||||
if (!JS_GetPropertyDescriptorById(cx, expando, id, flags, desc.address())) {
|
||||
if (!JS_GetPropertyDescriptorById(cx, expando, id, flags, desc)) {
|
||||
return false;
|
||||
}
|
||||
if (desc.object()) {
|
||||
|
@ -182,7 +182,7 @@ BaseDOMProxyHandler::getPropertyDescriptor(JSContext* cx,
|
||||
return true;
|
||||
}
|
||||
|
||||
return JS_GetPropertyDescriptorById(cx, proto, id, 0, desc.address());
|
||||
return JS_GetPropertyDescriptorById(cx, proto, id, 0, desc);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -370,7 +370,17 @@ RTCPeerConnection.prototype = {
|
||||
}
|
||||
function mustValidateServer(server) {
|
||||
let url = nicerNewURI(server.url, errorMsg);
|
||||
if (!(url.scheme in { stun:1, stuns:1, turn:1, turns:1 })) {
|
||||
if (url.scheme in { turn:1, turns:1 }) {
|
||||
if (!server.username) {
|
||||
throw new Components.Exception(errorMsg + " - missing username: " +
|
||||
server.url, Cr.NS_ERROR_MALFORMED_URI);
|
||||
}
|
||||
if (!server.credential) {
|
||||
throw new Components.Exception(errorMsg + " - missing credential: " +
|
||||
server.url, Cr.NS_ERROR_MALFORMED_URI);
|
||||
}
|
||||
}
|
||||
else if (!(url.scheme in { stun:1, stuns:1 })) {
|
||||
throw new Components.Exception(errorMsg + " - improper scheme: " + url.scheme,
|
||||
Cr.NS_ERROR_MALFORMED_URI);
|
||||
}
|
||||
|
@ -59,6 +59,10 @@
|
||||
{ url:"turns:localhost:3478?transport=udp", username:"p", credential:"p" }
|
||||
]}, true);
|
||||
|
||||
makePC({ iceServers: [{ url:"turns:localhost:3478", username:"p" }] }, false);
|
||||
|
||||
makePC({ iceServers: [{ url:"turns:localhost:3478", credential:"p" }] }, false);
|
||||
|
||||
pcs = null;
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
@ -1226,16 +1226,15 @@ var WifiManager = (function() {
|
||||
null);
|
||||
|
||||
prepareForStartup(function() {
|
||||
gNetworkManager.setWifiOperationMode(ifname,
|
||||
WIFI_FIRMWARE_STATION,
|
||||
function (status) {
|
||||
loadDriver(function (status) {
|
||||
if (status) {
|
||||
callback(status);
|
||||
manager.state = "UNINITIALIZED";
|
||||
return;
|
||||
}
|
||||
|
||||
loadDriver(function (status) {
|
||||
gNetworkManager.setWifiOperationMode(ifname,
|
||||
WIFI_FIRMWARE_STATION,
|
||||
function (status) {
|
||||
if (status < 0) {
|
||||
callback(status);
|
||||
manager.state = "UNINITIALIZED";
|
||||
@ -1264,7 +1263,7 @@ var WifiManager = (function() {
|
||||
// to return from loadDriver, so wait 2 seconds before starting
|
||||
// the supplicant to give it a chance to start.
|
||||
createWaitForDriverReadyTimer(doStartSupplicant);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1233,6 +1233,7 @@ gfxContext::ClipContainsRect(const gfxRect& aRect)
|
||||
for (int i = mStateStack.Length() - 2; i > 0; i--) {
|
||||
if (mStateStack[i].clipWasReset) {
|
||||
lastReset = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2074,6 +2075,7 @@ gfxContext::PushClipsToDT(DrawTarget *aDT)
|
||||
for (int i = mStateStack.Length() - 2; i > 0; i--) {
|
||||
if (mStateStack[i].clipWasReset) {
|
||||
lastReset = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2185,6 +2187,7 @@ gfxContext::GetAzureDeviceSpaceClipBounds()
|
||||
for (int i = mStateStack.Length() - 1; i > 0; i--) {
|
||||
if (mStateStack[i].clipWasReset) {
|
||||
lastReset = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ static uint64_t sFontSetGeneration = 0;
|
||||
|
||||
gfxProxyFontEntry::gfxProxyFontEntry(const nsTArray<gfxFontFaceSrc>& aFontFaceSrcList,
|
||||
uint32_t aWeight,
|
||||
uint32_t aStretch,
|
||||
int32_t aStretch,
|
||||
uint32_t aItalicStyle,
|
||||
const nsTArray<gfxFontFeature>& aFeatureSettings,
|
||||
uint32_t aLanguageOverride,
|
||||
@ -59,6 +59,8 @@ gfxProxyFontEntry::gfxProxyFontEntry(const nsTArray<gfxFontFaceSrc>& aFontFaceSr
|
||||
mSrcIndex = 0;
|
||||
mWeight = aWeight;
|
||||
mStretch = aStretch;
|
||||
// XXX Currently, we don't distinguish 'italic' and 'oblique' styles;
|
||||
// we need to fix this. (Bug 543715)
|
||||
mItalic = (aItalicStyle & (NS_FONT_STYLE_ITALIC | NS_FONT_STYLE_OBLIQUE)) != 0;
|
||||
mFeatureSettings.AppendElements(aFeatureSettings);
|
||||
mLanguageOverride = aLanguageOverride;
|
||||
@ -69,6 +71,29 @@ gfxProxyFontEntry::~gfxProxyFontEntry()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
gfxProxyFontEntry::Matches(const nsTArray<gfxFontFaceSrc>& aFontFaceSrcList,
|
||||
uint32_t aWeight,
|
||||
int32_t aStretch,
|
||||
uint32_t aItalicStyle,
|
||||
const nsTArray<gfxFontFeature>& aFeatureSettings,
|
||||
uint32_t aLanguageOverride,
|
||||
gfxSparseBitSet *aUnicodeRanges)
|
||||
{
|
||||
// XXX font entries don't distinguish italic from oblique (bug 543715)
|
||||
bool isItalic =
|
||||
(aItalicStyle & (NS_FONT_STYLE_ITALIC | NS_FONT_STYLE_OBLIQUE)) != 0;
|
||||
|
||||
return mWeight == aWeight &&
|
||||
mStretch == aStretch &&
|
||||
mItalic == isItalic &&
|
||||
mFeatureSettings == aFeatureSettings &&
|
||||
mLanguageOverride == aLanguageOverride &&
|
||||
mSrcList == aFontFaceSrcList;
|
||||
// XXX once we support unicode-range (bug 475891),
|
||||
// we'll need to compare that here as well
|
||||
}
|
||||
|
||||
gfxFont*
|
||||
gfxProxyFontEntry::CreateFontInstance(const gfxFontStyle *aFontStyle, bool aNeedsBold)
|
||||
{
|
||||
@ -90,14 +115,12 @@ gfxFontEntry*
|
||||
gfxUserFontSet::AddFontFace(const nsAString& aFamilyName,
|
||||
const nsTArray<gfxFontFaceSrc>& aFontFaceSrcList,
|
||||
uint32_t aWeight,
|
||||
uint32_t aStretch,
|
||||
int32_t aStretch,
|
||||
uint32_t aItalicStyle,
|
||||
const nsTArray<gfxFontFeature>& aFeatureSettings,
|
||||
const nsString& aLanguageOverride,
|
||||
gfxSparseBitSet *aUnicodeRanges)
|
||||
{
|
||||
gfxProxyFontEntry *proxyEntry = nullptr;
|
||||
|
||||
nsAutoString key(aFamilyName);
|
||||
ToLowerCase(key);
|
||||
|
||||
@ -114,10 +137,39 @@ gfxUserFontSet::AddFontFace(const nsAString& aFamilyName,
|
||||
mFontFamilies.Put(key, family);
|
||||
}
|
||||
|
||||
// construct a new face and add it into the family
|
||||
uint32_t languageOverride =
|
||||
gfxFontStyle::ParseFontLanguageOverride(aLanguageOverride);
|
||||
proxyEntry =
|
||||
|
||||
// If there's already a proxy in the family whose descriptors all match,
|
||||
// we can just move it to the end of the list instead of adding a new
|
||||
// face that will always "shadow" the old one.
|
||||
// Note that we can't do this for "real" (non-proxy) entries, even if the
|
||||
// style descriptors match, as they might have had a different source list,
|
||||
// but we no longer have the old source list available to check.
|
||||
nsTArray<nsRefPtr<gfxFontEntry> >& fontList = family->GetFontList();
|
||||
for (uint32_t i = 0, count = fontList.Length(); i < count; i++) {
|
||||
if (!fontList[i]->mIsProxy) {
|
||||
continue;
|
||||
}
|
||||
|
||||
gfxProxyFontEntry *existingProxyEntry =
|
||||
static_cast<gfxProxyFontEntry*>(fontList[i].get());
|
||||
if (!existingProxyEntry->Matches(aFontFaceSrcList,
|
||||
aWeight, aStretch, aItalicStyle,
|
||||
aFeatureSettings, languageOverride,
|
||||
aUnicodeRanges)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// We've found an entry that matches the new face exactly, so just add
|
||||
// it to the end of the list. gfxMixedFontFamily::AddFontEntry() will
|
||||
// automatically remove any earlier occurrence of the same proxy.
|
||||
family->AddFontEntry(existingProxyEntry);
|
||||
return existingProxyEntry;
|
||||
}
|
||||
|
||||
// construct a new face and add it into the family
|
||||
gfxProxyFontEntry *proxyEntry =
|
||||
new gfxProxyFontEntry(aFontFaceSrcList, aWeight, aStretch,
|
||||
aItalicStyle,
|
||||
aFeatureSettings,
|
||||
|
@ -41,6 +41,20 @@ struct gfxFontFaceSrc {
|
||||
nsCOMPtr<nsIPrincipal> mOriginPrincipal; // principal if url
|
||||
};
|
||||
|
||||
inline bool
|
||||
operator==(const gfxFontFaceSrc& a, const gfxFontFaceSrc& b)
|
||||
{
|
||||
bool equals;
|
||||
return (a.mIsLocal && b.mIsLocal &&
|
||||
a.mLocalName == b.mLocalName) ||
|
||||
(!a.mIsLocal && !b.mIsLocal &&
|
||||
a.mUseOriginPrincipal == b.mUseOriginPrincipal &&
|
||||
a.mFormatFlags == b.mFormatFlags &&
|
||||
NS_SUCCEEDED(a.mURI->Equals(b.mURI, &equals)) && equals &&
|
||||
NS_SUCCEEDED(a.mReferrer->Equals(b.mReferrer, &equals)) && equals &&
|
||||
a.mOriginPrincipal->Equals(b.mOriginPrincipal));
|
||||
}
|
||||
|
||||
// Subclassed to store platform-specific code cleaned out when font entry is
|
||||
// deleted.
|
||||
// Lifetime: from when platform font is created until it is deactivated.
|
||||
@ -77,24 +91,37 @@ public:
|
||||
|
||||
virtual ~gfxMixedFontFamily() { }
|
||||
|
||||
// Add the given font entry to the end of the family's list.
|
||||
// Any earlier occurrence is removed, so this has the effect of "advancing"
|
||||
// the entry to the end of the list.
|
||||
void AddFontEntry(gfxFontEntry *aFontEntry) {
|
||||
nsRefPtr<gfxFontEntry> fe = aFontEntry;
|
||||
mAvailableFonts.AppendElement(fe);
|
||||
// We append to mAvailableFonts -before- searching for and removing
|
||||
// any existing reference to avoid the risk that we'll remove the last
|
||||
// reference to the font entry, and thus delete it.
|
||||
mAvailableFonts.AppendElement(aFontEntry);
|
||||
uint32_t i = mAvailableFonts.Length() - 1;
|
||||
while (i > 0) {
|
||||
if (mAvailableFonts[--i] == aFontEntry) {
|
||||
mAvailableFonts.RemoveElementAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
aFontEntry->mFamilyName = Name();
|
||||
ResetCharacterMap();
|
||||
}
|
||||
|
||||
void ReplaceFontEntry(gfxFontEntry *aOldFontEntry,
|
||||
gfxFontEntry *aNewFontEntry) {
|
||||
// Replace aProxyFontEntry in the family's list with aRealFontEntry.
|
||||
void ReplaceFontEntry(gfxFontEntry *aProxyFontEntry,
|
||||
gfxFontEntry *aRealFontEntry) {
|
||||
uint32_t numFonts = mAvailableFonts.Length();
|
||||
uint32_t i;
|
||||
for (i = 0; i < numFonts; i++) {
|
||||
gfxFontEntry *fe = mAvailableFonts[i];
|
||||
if (fe == aOldFontEntry) {
|
||||
// note that this may delete aOldFontEntry, if there's no
|
||||
// other reference to it except from its family
|
||||
aNewFontEntry->mFamilyName = Name();
|
||||
mAvailableFonts[i] = aNewFontEntry;
|
||||
if (fe == aProxyFontEntry) {
|
||||
// Note that this may delete aProxyFontEntry, if there's no
|
||||
// other reference to it except from its family.
|
||||
mAvailableFonts[i] = aRealFontEntry;
|
||||
aRealFontEntry->mFamilyName = Name();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -102,34 +129,10 @@ public:
|
||||
ResetCharacterMap();
|
||||
}
|
||||
|
||||
void RemoveFontEntry(gfxFontEntry *aFontEntry) {
|
||||
uint32_t numFonts = mAvailableFonts.Length();
|
||||
for (uint32_t i = 0; i < numFonts; i++) {
|
||||
gfxFontEntry *fe = mAvailableFonts[i];
|
||||
if (fe == aFontEntry) {
|
||||
mAvailableFonts.RemoveElementAt(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ResetCharacterMap();
|
||||
}
|
||||
|
||||
// remove entries from the family
|
||||
// Remove all font entries from the family
|
||||
void DetachFontEntries() {
|
||||
mAvailableFonts.Clear();
|
||||
}
|
||||
|
||||
// temp method to determine if all proxies are loaded
|
||||
bool AllLoaded()
|
||||
{
|
||||
uint32_t numFonts = mAvailableFonts.Length();
|
||||
for (uint32_t i = 0; i < numFonts; i++) {
|
||||
gfxFontEntry *fe = mAvailableFonts[i];
|
||||
if (fe->mIsProxy)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class gfxProxyFontEntry;
|
||||
@ -168,13 +171,14 @@ public:
|
||||
|
||||
|
||||
// add in a font face
|
||||
// weight, stretch - 0 == unknown, [1, 9] otherwise
|
||||
// weight - 0 == unknown, [100, 900] otherwise (multiples of 100)
|
||||
// stretch = [NS_FONT_STRETCH_ULTRA_CONDENSED, NS_FONT_STRETCH_ULTRA_EXPANDED]
|
||||
// italic style = constants in gfxFontConstants.h, e.g. NS_FONT_STYLE_NORMAL
|
||||
// TODO: support for unicode ranges not yet implemented
|
||||
gfxFontEntry *AddFontFace(const nsAString& aFamilyName,
|
||||
const nsTArray<gfxFontFaceSrc>& aFontFaceSrcList,
|
||||
uint32_t aWeight,
|
||||
uint32_t aStretch,
|
||||
int32_t aStretch,
|
||||
uint32_t aItalicStyle,
|
||||
const nsTArray<gfxFontFeature>& aFeatureSettings,
|
||||
const nsString& aLanguageOverride,
|
||||
@ -428,7 +432,7 @@ class gfxProxyFontEntry : public gfxFontEntry {
|
||||
public:
|
||||
gfxProxyFontEntry(const nsTArray<gfxFontFaceSrc>& aFontFaceSrcList,
|
||||
uint32_t aWeight,
|
||||
uint32_t aStretch,
|
||||
int32_t aStretch,
|
||||
uint32_t aItalicStyle,
|
||||
const nsTArray<gfxFontFeature>& aFeatureSettings,
|
||||
uint32_t aLanguageOverride,
|
||||
@ -436,6 +440,15 @@ public:
|
||||
|
||||
virtual ~gfxProxyFontEntry();
|
||||
|
||||
// Return whether the entry matches the given list of attributes
|
||||
bool Matches(const nsTArray<gfxFontFaceSrc>& aFontFaceSrcList,
|
||||
uint32_t aWeight,
|
||||
int32_t aStretch,
|
||||
uint32_t aItalicStyle,
|
||||
const nsTArray<gfxFontFeature>& aFeatureSettings,
|
||||
uint32_t aLanguageOverride,
|
||||
gfxSparseBitSet *aUnicodeRanges);
|
||||
|
||||
virtual gfxFont *CreateFontInstance(const gfxFontStyle *aFontStyle, bool aNeedsBold);
|
||||
|
||||
// note that code depends on the ordering of these values!
|
||||
|
@ -189,7 +189,7 @@ JavaScriptChild::AnswerGetPropertyDescriptor(const ObjectId &objId, const nsStri
|
||||
return fail(cx, rs);
|
||||
|
||||
Rooted<JSPropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptorById(cx, obj, internedId, flags, desc.address()))
|
||||
if (!JS_GetPropertyDescriptorById(cx, obj, internedId, flags, &desc))
|
||||
return fail(cx, rs);
|
||||
|
||||
if (!desc.object())
|
||||
@ -222,7 +222,7 @@ JavaScriptChild::AnswerGetOwnPropertyDescriptor(const ObjectId &objId, const nsS
|
||||
return fail(cx, rs);
|
||||
|
||||
Rooted<JSPropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptorById(cx, obj, internedId, flags, desc.address()))
|
||||
if (!JS_GetPropertyDescriptorById(cx, obj, internedId, flags, &desc))
|
||||
return fail(cx, rs);
|
||||
|
||||
if (desc.object() != obj)
|
||||
@ -339,10 +339,10 @@ JavaScriptChild::AnswerHasOwn(const ObjectId &objId, const nsString &id, ReturnS
|
||||
if (!convertGeckoStringToId(cx, id, &internedId))
|
||||
return fail(cx, rs);
|
||||
|
||||
JSPropertyDescriptor desc;
|
||||
Rooted<JSPropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptorById(cx, obj, internedId, 0, &desc))
|
||||
return fail(cx, rs);
|
||||
*bp = (desc.obj == obj);
|
||||
*bp = (desc.object() == obj);
|
||||
|
||||
return ok(rs);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#define js_GCAPI_h
|
||||
|
||||
#include "js/HeapAPI.h"
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
namespace JS {
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
#ifndef js_PropertyKey_h
|
||||
#define js_PropertyKey_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#include "js/Value.h"
|
||||
|
||||
struct JSContext;
|
||||
|
@ -7,7 +7,10 @@
|
||||
#ifndef TraceLogging_h
|
||||
#define TraceLogging_h
|
||||
|
||||
#include "jsscript.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
class JSScript;
|
||||
|
||||
namespace js {
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "builtin/BinaryData.h"
|
||||
|
||||
#include "mozilla/FloatingPoint.h"
|
||||
|
||||
#include "jscompartment.h"
|
||||
#include "jsfun.h"
|
||||
#include "jsobj.h"
|
||||
|
@ -8,11 +8,8 @@
|
||||
#define builtin_BinaryData_h
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "jsobj.h"
|
||||
|
||||
#include "gc/Heap.h"
|
||||
|
||||
namespace js {
|
||||
typedef float float32_t;
|
||||
typedef double float64_t;
|
||||
|
@ -7,7 +7,8 @@
|
||||
#ifndef builtin_Eval_h
|
||||
#define builtin_Eval_h
|
||||
|
||||
#include "vm/Stack.h"
|
||||
#include "jsapi.h"
|
||||
#include "jsbytecode.h"
|
||||
|
||||
namespace js {
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jsobj.h"
|
||||
|
||||
#include "frontend/BytecodeCompiler.h"
|
||||
#include "vm/StringBuffer.h"
|
||||
|
@ -8,12 +8,9 @@
|
||||
#define builtin_ParallelArray_h
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jsobj.h"
|
||||
|
||||
#include "jit/Ion.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
#include "vm/ThreadPool.h"
|
||||
|
||||
namespace js {
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#include "devtools/sharkctl.h"
|
||||
#endif
|
||||
|
||||
#include "vm/Probes.h"
|
||||
|
||||
#include "jscntxtinlines.h"
|
||||
|
||||
using namespace js;
|
||||
|
@ -7,7 +7,6 @@
|
||||
#ifndef builtin_RegExp_h
|
||||
#define builtin_RegExp_h
|
||||
|
||||
#include "vm/MatchPairs.h"
|
||||
#include "vm/RegExpObject.h"
|
||||
|
||||
JSObject *
|
||||
|
@ -11,7 +11,9 @@
|
||||
#include "jsfriendapi.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsobj.h"
|
||||
#ifndef JS_MORE_DETERMINISTIC
|
||||
#include "jsprf.h"
|
||||
#endif
|
||||
#include "jswrapper.h"
|
||||
|
||||
#include "jit/AsmJS.h"
|
||||
|
@ -324,23 +324,11 @@ ifdef MOZ_DEBUG
|
||||
CODFILE=$(basename $(@F)).cod
|
||||
endif
|
||||
|
||||
ifdef MOZ_MAPINFO
|
||||
ifdef SHARED_LIBRARY_NAME
|
||||
MAPFILE=$(SHARED_LIBRARY_NAME).map
|
||||
else
|
||||
MAPFILE=$(basename $(@F)).map
|
||||
endif # SHARED_LIBRARY_NAME
|
||||
endif # MOZ_MAPINFO
|
||||
|
||||
ifdef DEFFILE
|
||||
OS_LDFLAGS += -DEF:$(call normalizepath,$(DEFFILE))
|
||||
EXTRA_DEPS += $(DEFFILE)
|
||||
endif
|
||||
|
||||
ifdef MAPFILE
|
||||
OS_LDFLAGS += -MAP:$(MAPFILE)
|
||||
endif
|
||||
|
||||
else #!GNU_CC
|
||||
|
||||
ifdef DEFFILE
|
||||
@ -399,7 +387,7 @@ ALL_TRASH = \
|
||||
$(OBJS:.$(OBJ_SUFFIX)=.i) $(OBJS:.$(OBJ_SUFFIX)=.i_o) \
|
||||
$(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) $(DEF_FILE)\
|
||||
$(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
|
||||
$(wildcard *.pdb) $(CODFILE) $(MAPFILE) $(IMPORT_LIBRARY) \
|
||||
$(wildcard *.pdb) $(CODFILE) $(IMPORT_LIBRARY) \
|
||||
$(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
|
||||
$(PROGRAM:$(BIN_SUFFIX)=.exp) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.exp) \
|
||||
$(PROGRAM:$(BIN_SUFFIX)=.lib) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.lib) \
|
||||
|
@ -4072,7 +4072,6 @@ AC_SUBST(MOZ_PKG_SPECIAL)
|
||||
AC_SUBST(MOZILLA_OFFICIAL)
|
||||
|
||||
dnl win32 options
|
||||
AC_SUBST(MOZ_MAPINFO)
|
||||
AC_SUBST(MOZ_BROWSE_INFO)
|
||||
AC_SUBST(MOZ_TOOLS_DIR)
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include "frontend/BytecodeCompiler.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "frontend/BytecodeEmitter.h"
|
||||
@ -19,6 +20,7 @@
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "frontend/ParseMaps-inl.h"
|
||||
#include "frontend/Parser-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::frontend;
|
||||
|
@ -38,6 +38,7 @@
|
||||
|
||||
#include "frontend/ParseMaps-inl.h"
|
||||
#include "frontend/ParseNode-inl.h"
|
||||
#include "vm/ScopeObject-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::gc;
|
||||
|
@ -11,21 +11,22 @@
|
||||
* JS bytecode generation.
|
||||
*/
|
||||
|
||||
#include "jsatom.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jsopcode.h"
|
||||
#include "jspubtd.h"
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "frontend/ParseMaps.h"
|
||||
#include "frontend/SharedContext.h"
|
||||
#include "frontend/SourceNotes.h"
|
||||
#include "vm/ScopeObject.h"
|
||||
|
||||
namespace js {
|
||||
namespace frontend {
|
||||
|
||||
template <typename ParseHandler>
|
||||
class Parser;
|
||||
class FullParseHandler;
|
||||
class ObjectBox;
|
||||
class ParseNode;
|
||||
template <typename ParseHandler> class Parser;
|
||||
class SharedContext;
|
||||
class TokenStream;
|
||||
|
||||
struct CGTryNoteList {
|
||||
Vector<JSTryNote> list;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "vm/StringBuffer.h"
|
||||
|
||||
#include "jsfuninlines.h"
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::frontend;
|
||||
|
40
js/src/frontend/Parser-inl.h
Normal file
40
js/src/frontend/Parser-inl.h
Normal file
@ -0,0 +1,40 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef frontend_Parser_inl_h
|
||||
#define frontend_Parser_inl_h
|
||||
|
||||
#include "frontend/Parser.h"
|
||||
|
||||
#include "frontend/ParseMaps-inl.h"
|
||||
|
||||
namespace js {
|
||||
namespace frontend {
|
||||
|
||||
template <typename ParseHandler>
|
||||
bool
|
||||
ParseContext<ParseHandler>::init()
|
||||
{
|
||||
if (!frontend::GenerateBlockId(this, this->bodyid))
|
||||
return false;
|
||||
|
||||
return decls_.init() && lexdeps.ensureMap(sc->context);
|
||||
}
|
||||
|
||||
template <typename ParseHandler>
|
||||
ParseContext<ParseHandler>::~ParseContext()
|
||||
{
|
||||
// |*parserPC| pointed to this object. Now that this object is about to
|
||||
// die, make |*parserPC| point to this object's parent.
|
||||
JS_ASSERT(*parserPC == this);
|
||||
*parserPC = this->oldpc;
|
||||
js_delete(funcStmts);
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace js
|
||||
|
||||
#endif /* frontend_Parser_inl_h */
|
@ -17,7 +17,7 @@
|
||||
* This parser attempts no error recovery.
|
||||
*/
|
||||
|
||||
#include "frontend/Parser.h"
|
||||
#include "frontend/Parser-inl.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsatom.h"
|
||||
@ -34,7 +34,6 @@
|
||||
#include "frontend/ParseMaps.h"
|
||||
#include "frontend/TokenStream.h"
|
||||
#include "jit/AsmJS.h"
|
||||
#include "vm/NumericConversions.h"
|
||||
#include "vm/RegExpStatics.h"
|
||||
#include "vm/Shape.h"
|
||||
|
||||
@ -45,6 +44,7 @@
|
||||
|
||||
#include "frontend/ParseMaps-inl.h"
|
||||
#include "frontend/ParseNode-inl.h"
|
||||
#include "vm/ScopeObject-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::gc;
|
||||
|
@ -266,21 +266,9 @@ struct ParseContext : public GenericParseContext
|
||||
prs->pc = this;
|
||||
}
|
||||
|
||||
~ParseContext() {
|
||||
// |*parserPC| pointed to this object. Now that this object is about to
|
||||
// die, make |*parserPC| point to this object's parent.
|
||||
JS_ASSERT(*parserPC == this);
|
||||
*parserPC = this->oldpc;
|
||||
js_delete(funcStmts);
|
||||
}
|
||||
~ParseContext();
|
||||
|
||||
inline bool init()
|
||||
{
|
||||
if (!frontend::GenerateBlockId(this, this->bodyid))
|
||||
return false;
|
||||
|
||||
return decls_.init() && lexdeps.ensureMap(sc->context);
|
||||
}
|
||||
bool init();
|
||||
|
||||
unsigned blockid() { return topStmt ? topStmt->blockid : bodyid; }
|
||||
|
||||
|
@ -7,6 +7,10 @@
|
||||
#ifndef frontend_SourceNotes_h
|
||||
#define frontend_SourceNotes_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "jstypes.h"
|
||||
|
||||
typedef uint8_t jssrcnote;
|
||||
|
||||
namespace js {
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -19,8 +20,6 @@
|
||||
#include "jscntxt.h"
|
||||
#include "jsexn.h"
|
||||
#include "jsnum.h"
|
||||
#include "jsopcode.h"
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "frontend/BytecodeCompiler.h"
|
||||
#include "js/CharacterEncoding.h"
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jsopcode.h"
|
||||
#include "jspubtd.h"
|
||||
#include "jsversion.h"
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include "gc/Barrier.h"
|
||||
|
||||
#include "jscompartment.h"
|
||||
|
||||
#include "gc/Marking.h"
|
||||
#include "gc/StoreBuffer.h"
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsgc.h"
|
||||
|
||||
#include "gc/GCInternals.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
||||
#include "jit/IonCode.h"
|
||||
#include "vm/ArgumentsObject.h"
|
||||
#include "vm/Shape.h"
|
||||
#include "vm/TypedArrayObject.h"
|
||||
|
||||
|
@ -7,11 +7,7 @@
|
||||
#ifndef gc_Marking_h
|
||||
#define gc_Marking_h
|
||||
|
||||
#include "jsgc.h"
|
||||
#include "jslock.h"
|
||||
|
||||
#include "gc/Barrier.h"
|
||||
#include "gc/Nursery.h"
|
||||
#include "jit/IonCode.h"
|
||||
|
||||
extern "C" {
|
||||
@ -30,9 +26,13 @@ class ArgumentsObject;
|
||||
class ArrayBufferObject;
|
||||
class ArrayBufferViewObject;
|
||||
class BaseShape;
|
||||
class DebugScopeObject;
|
||||
struct GCMarker;
|
||||
class GlobalObject;
|
||||
class UnownedBaseShape;
|
||||
class LazyScript;
|
||||
class ScopeObject;
|
||||
class Shape;
|
||||
class UnownedBaseShape;
|
||||
|
||||
template<class, typename> class HeapPtr;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "jsgc.h"
|
||||
struct JSRuntime;
|
||||
|
||||
namespace js {
|
||||
namespace gc {
|
||||
|
@ -408,12 +408,6 @@ AutoGCRooter::trace(JSTracer *trc)
|
||||
return;
|
||||
}
|
||||
|
||||
case DESCRIPTOR : {
|
||||
PropertyDescriptor &desc = *static_cast<AutoPropertyDescriptorRooter *>(this);
|
||||
desc.trace(trc);
|
||||
return;
|
||||
}
|
||||
|
||||
case ID:
|
||||
MarkIdRoot(trc, &static_cast<AutoIdRooter *>(this)->id_, "JS::AutoIdRooter.id_");
|
||||
return;
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "jsapi.h"
|
||||
#include "jspubtd.h"
|
||||
|
||||
#include "js/GCAPI.h"
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include "mozilla/ReentrancyGuard.h"
|
||||
|
||||
#include "jsalloc.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsobj.h"
|
||||
|
||||
#include "ds/LifoAlloc.h"
|
||||
#include "gc/Nursery.h"
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsprf.h"
|
||||
|
||||
|
@ -7,22 +7,14 @@
|
||||
#ifndef gc_Zone_h
|
||||
#define gc_Zone_h
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/GuardObjects.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jsfun.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsinfer.h"
|
||||
#include "jsobj.h"
|
||||
|
||||
#include "gc/FindSCCs.h"
|
||||
#include "gc/StoreBuffer.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#include "vm/RegExpObject.h"
|
||||
#include "vm/Shape.h"
|
||||
|
||||
namespace js {
|
||||
|
||||
|
@ -14,19 +14,23 @@
|
||||
|
||||
#include "jsmath.h"
|
||||
#include "jsworkers.h"
|
||||
#include "jsprf.h"
|
||||
#include "prmjtime.h"
|
||||
|
||||
#include "frontend/Parser.h"
|
||||
#include "jit/AsmJSLink.h"
|
||||
#include "jit/AsmJSModule.h"
|
||||
#include "jit/CodeGenerator.h"
|
||||
#include "jit/MIR.h"
|
||||
#include "jit/MIRGraph.h"
|
||||
#include "jit/PerfSpewer.h"
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
#include "jsfuninlines.h"
|
||||
#include "jsinferinlines.h"
|
||||
|
||||
#include "frontend/ParseMaps-inl.h"
|
||||
#include "frontend/ParseNode-inl.h"
|
||||
#include "frontend/Parser-inl.h"
|
||||
#include "gc/Barrier-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::frontend;
|
||||
|
@ -22,6 +22,8 @@
|
||||
#endif
|
||||
|
||||
#include "jsfuninlines.h"
|
||||
#include "jsobjinlines.h"
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::ion;
|
||||
@ -44,17 +46,17 @@ GetDataProperty(JSContext *cx, const Value &objVal, HandlePropertyName field, Mu
|
||||
if (!objVal.isObject())
|
||||
return LinkFail(cx, "accessing property of non-object");
|
||||
|
||||
JSPropertyDescriptor desc;
|
||||
Rooted<JSPropertyDescriptor> desc(cx);
|
||||
if (!JS_GetPropertyDescriptorById(cx, &objVal.toObject(), NameToId(field), 0, &desc))
|
||||
return false;
|
||||
|
||||
if (!desc.obj)
|
||||
if (!desc.object())
|
||||
return LinkFail(cx, "property not present on object");
|
||||
|
||||
if (desc.attrs & (JSPROP_GETTER | JSPROP_SETTER))
|
||||
if (desc.hasGetterOrSetterObject())
|
||||
return LinkFail(cx, "property is not a data property");
|
||||
|
||||
v.set(desc.value);
|
||||
v.set(desc.value());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "gc/Marking.h"
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "jit/AsmJSSignalHandlers.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
|
||||
#include "assembler/assembler/MacroAssembler.h"
|
||||
#include "jit/AsmJSModule.h"
|
||||
|
||||
|
@ -1189,7 +1189,7 @@ BacktrackingAllocator::dumpLiveness()
|
||||
LBlock *block = graph.getBlock(blockIndex);
|
||||
MBasicBlock *mir = block->mir();
|
||||
|
||||
printf("\nBlock %lu", blockIndex);
|
||||
printf("\nBlock %lu", static_cast<unsigned long>(blockIndex));
|
||||
for (size_t i = 0; i < mir->numSuccessors(); i++)
|
||||
printf(" [successor %u]", mir->getSuccessor(i)->id());
|
||||
printf("\n");
|
||||
@ -1234,7 +1234,7 @@ BacktrackingAllocator::dumpLiveness()
|
||||
printf("reg %s: %s\n", AnyRegister::FromCode(i).name(), IntervalString(fixedIntervals[i]));
|
||||
|
||||
for (size_t i = 0; i < graph.numVirtualRegisters(); i++) {
|
||||
printf("v%lu:", i);
|
||||
printf("v%lu:", static_cast<unsigned long>(i));
|
||||
VirtualRegister &vreg = vregs[i];
|
||||
for (size_t j = 0; j < vreg.numIntervals(); j++) {
|
||||
if (j)
|
||||
@ -1269,7 +1269,7 @@ BacktrackingAllocator::dumpAllocations()
|
||||
printf("Allocations:\n");
|
||||
|
||||
for (size_t i = 0; i < graph.numVirtualRegisters(); i++) {
|
||||
printf("v%lu:", i);
|
||||
printf("v%lu:", static_cast<unsigned long>(i));
|
||||
VirtualRegister &vreg = vregs[i];
|
||||
for (size_t j = 0; j < vreg.numIntervals(); j++) {
|
||||
if (j)
|
||||
|
@ -6,17 +6,15 @@
|
||||
|
||||
#include "jit/Bailouts.h"
|
||||
|
||||
#include "jsanalyze.h"
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsinfer.h"
|
||||
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/Ion.h"
|
||||
#include "jit/IonCompartment.h"
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "jit/SnapshotReader.h"
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
#include "vm/Stack-inl.h"
|
||||
|
||||
|
@ -9,8 +9,10 @@
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/CompileInfo.h"
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "vm/ArgumentsObject.h"
|
||||
|
||||
#include "jsfuninlines.h"
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "jit/IonFrames-inl.h"
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "jit/VMFunctions.h"
|
||||
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "vm/Interpreter-inl.h"
|
||||
|
||||
using namespace js;
|
||||
|
@ -9,10 +9,6 @@
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsinfer.h"
|
||||
|
||||
#include "jit/BaselineIC.h"
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/BytecodeAnalysis.h"
|
||||
@ -26,7 +22,6 @@
|
||||
#else
|
||||
# include "jit/arm/BaselineCompiler-arm.h"
|
||||
#endif
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
namespace js {
|
||||
namespace ion {
|
||||
|
@ -15,8 +15,7 @@
|
||||
#include "jscompartment.h"
|
||||
|
||||
#include "jit/IonFrames.h"
|
||||
|
||||
#include "vm/ScopeObject-inl.h"
|
||||
#include "vm/ScopeObject.h"
|
||||
|
||||
namespace js {
|
||||
namespace ion {
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include "vm/Debugger.h"
|
||||
#include "vm/ScopeObject.h"
|
||||
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
#include "jit/IonFrames-inl.h"
|
||||
#include "vm/Stack-inl.h"
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "jit/BaselineFrameInfo.h"
|
||||
|
||||
#include "jsanalyze.h"
|
||||
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "jit/shared/BaselineCompiler-shared.h"
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
|
||||
#include "jit/BaselineFrame.h"
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/BaselineRegisters.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "jit/BaselineIC.h"
|
||||
|
||||
#include "jslibmath.h"
|
||||
|
||||
#include "builtin/Eval.h"
|
||||
#include "jit/BaselineCompiler.h"
|
||||
#include "jit/BaselineHelpers.h"
|
||||
@ -15,8 +17,10 @@
|
||||
#include "jit/VMFunctions.h"
|
||||
|
||||
#include "jsboolinlines.h"
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "vm/Interpreter-inl.h"
|
||||
#include "vm/ScopeObject-inl.h"
|
||||
|
||||
namespace js {
|
||||
namespace ion {
|
||||
|
@ -13,9 +13,7 @@
|
||||
#include "jscompartment.h"
|
||||
#include "jsgc.h"
|
||||
#include "jsopcode.h"
|
||||
#include "jsproxy.h"
|
||||
|
||||
#include "gc/Heap.h"
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/BaselineRegisters.h"
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
||||
|
||||
#ifdef JS_ION
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
|
||||
#include "jit/BaselineIC.h"
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/MIR.h"
|
||||
|
@ -12,8 +12,12 @@
|
||||
#include "jit/BaselineIC.h"
|
||||
#include "jit/CompileInfo.h"
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
#include "jsgcinlines.h"
|
||||
#include "jsobjinlines.h"
|
||||
#include "jsopcodeinlines.h"
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "jit/IonFrames-inl.h"
|
||||
#include "vm/Stack-inl.h"
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "jit/BitSet.h"
|
||||
|
||||
#include "jsutil.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::ion;
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
#ifndef jit_BytecodeAnalysis_h
|
||||
#define jit_BytecodeAnalysis_h
|
||||
|
||||
#include "jscntxt.h"
|
||||
|
||||
#include "jit/IonAllocPolicy.h"
|
||||
#include "js/Vector.h"
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include "jit/C1Spewer.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "jit/Ion.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#include "jsscript.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "jit/CodeGenerator.h"
|
||||
|
||||
#include "jslibmath.h"
|
||||
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "jit/EdgeCaseAnalysis.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "jit/Ion.h"
|
||||
#include "jit/IonBuilder.h"
|
||||
#include "jit/IonSpewer.h"
|
||||
|
@ -48,13 +48,12 @@
|
||||
# include "jit/arm/Lowering-arm.h"
|
||||
#endif
|
||||
#include "vm/ForkJoin.h"
|
||||
#include "vm/ThreadPool.h"
|
||||
|
||||
#include "jscompartmentinlines.h"
|
||||
#include "jsgcinlines.h"
|
||||
#include "jsinferinlines.h"
|
||||
|
||||
#include "vm/Stack-inl.h"
|
||||
#include "vm/Shape-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::ion;
|
||||
|
@ -13,11 +13,9 @@
|
||||
|
||||
#include "jscntxt.h"
|
||||
#include "jscompartment.h"
|
||||
#include "jsinfer.h"
|
||||
|
||||
#include "jit/CompileInfo.h"
|
||||
#include "jit/IonCode.h"
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
namespace js {
|
||||
namespace ion {
|
||||
|
@ -13,13 +13,13 @@
|
||||
#include "jit/IonCode.h"
|
||||
#include "jit/Registers.h"
|
||||
#include "jit/shared/Assembler-shared.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
|
||||
class JSFunction;
|
||||
class JSScript;
|
||||
|
||||
namespace js {
|
||||
|
||||
class LockedJSContext;
|
||||
class TypedArrayObject;
|
||||
|
||||
namespace ion {
|
||||
|
@ -22,8 +22,10 @@
|
||||
#include "jit/Safepoints.h"
|
||||
#include "jit/SnapshotReader.h"
|
||||
#include "jit/VMFunctions.h"
|
||||
#include "vm/Interpreter.h"
|
||||
|
||||
#include "jsfuninlines.h"
|
||||
#include "jsscriptinlines.h"
|
||||
|
||||
#include "jit/IonFrameIterator-inl.h"
|
||||
#include "vm/Probes-inl.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "jit/IonMacroAssembler.h"
|
||||
|
||||
#include "jsinfer.h"
|
||||
#include "jsprf.h"
|
||||
|
||||
#include "jit/Bailouts.h"
|
||||
#include "jit/BaselineFrame.h"
|
||||
@ -14,7 +15,6 @@
|
||||
#include "jit/BaselineJIT.h"
|
||||
#include "jit/BaselineRegisters.h"
|
||||
#include "jit/MIR.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
|
||||
#include "jsgcinlines.h"
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include "jit/IonInstrumentation.h"
|
||||
#include "jit/ParallelFunctions.h"
|
||||
#include "jit/VMFunctions.h"
|
||||
#include "vm/ForkJoin.h"
|
||||
#include "vm/ProxyObject.h"
|
||||
#include "vm/Shape.h"
|
||||
#include "vm/TypedArrayObject.h"
|
||||
|
@ -9,10 +9,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "jsscript.h"
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
class JSScript;
|
||||
|
||||
namespace js {
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "jit/LIR.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "jsprf.h"
|
||||
|
||||
#include "jit/IonSpewer.h"
|
||||
|
@ -12,8 +12,6 @@
|
||||
|
||||
#include "mozilla/Array.h"
|
||||
|
||||
#include "jscntxt.h"
|
||||
|
||||
#include "jit/Bailouts.h"
|
||||
#include "jit/InlineList.h"
|
||||
#include "jit/IonAllocPolicy.h"
|
||||
|
@ -8,8 +8,6 @@
|
||||
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "jit/BitSet.h"
|
||||
#include "jit/IonBuilder.h"
|
||||
#include "jit/IonSpewer.h"
|
||||
@ -265,7 +263,8 @@ LinearScanAllocator::resolveControlFlow()
|
||||
BitSet *live = liveIn[mSuccessor->id()];
|
||||
|
||||
for (BitSet::Iterator liveRegId(*live); liveRegId; liveRegId++) {
|
||||
LiveInterval *to = vregs[*liveRegId].intervalFor(inputOf(successor->firstId()));
|
||||
LinearScanVirtualRegister *vreg = &vregs[*liveRegId];
|
||||
LiveInterval *to = vreg->intervalFor(inputOf(successor->firstId()));
|
||||
JS_ASSERT(to);
|
||||
|
||||
for (size_t j = 0; j < mSuccessor->numPredecessors(); j++) {
|
||||
@ -273,6 +272,17 @@ LinearScanAllocator::resolveControlFlow()
|
||||
LiveInterval *from = vregs[*liveRegId].intervalFor(outputOf(predecessor->lastId()));
|
||||
JS_ASSERT(from);
|
||||
|
||||
if (*from->getAllocation() == *to->getAllocation())
|
||||
continue;
|
||||
|
||||
// If this value is spilled at its definition, other stores
|
||||
// are redundant.
|
||||
if (vreg->mustSpillAtDefinition() && to->getAllocation()->isStackSlot()) {
|
||||
JS_ASSERT(vreg->canonicalSpill());
|
||||
JS_ASSERT(*vreg->canonicalSpill() == *to->getAllocation());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mSuccessor->numPredecessors() > 1) {
|
||||
JS_ASSERT(predecessor->mir()->numSuccessors() == 1);
|
||||
LMoveGroup *moves = predecessor->getExitMoveGroup();
|
||||
|
@ -9,8 +9,6 @@
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
||||
#include "jsanalyze.h"
|
||||
#include "jsbool.h"
|
||||
#include "jsnum.h"
|
||||
|
||||
#include "jit/IonSpewer.h"
|
||||
#include "jit/LIR.h"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user