зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
Коммит
16a9c62bba
|
@ -28,7 +28,7 @@ using namespace mozilla::a11y;
|
||||||
|
|
||||||
ARIAGridAccessible::
|
ARIAGridAccessible::
|
||||||
ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||||
AccessibleWrap(aContent, aDoc)
|
HyperTextAccessibleWrap(aContent, aDoc)
|
||||||
{
|
{
|
||||||
mGenericTypes |= eTable;
|
mGenericTypes |= eTable;
|
||||||
}
|
}
|
||||||
|
@ -534,7 +534,7 @@ ARIAGridAccessible::SetARIASelected(Accessible* aAccessible,
|
||||||
|
|
||||||
ARIARowAccessible::
|
ARIARowAccessible::
|
||||||
ARIARowAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
ARIARowAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||||
AccessibleWrap(aContent, aDoc)
|
HyperTextAccessibleWrap(aContent, aDoc)
|
||||||
{
|
{
|
||||||
mGenericTypes |= eTableRow;
|
mGenericTypes |= eTableRow;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,13 +16,13 @@ namespace a11y {
|
||||||
/**
|
/**
|
||||||
* Accessible for ARIA grid and treegrid.
|
* Accessible for ARIA grid and treegrid.
|
||||||
*/
|
*/
|
||||||
class ARIAGridAccessible : public AccessibleWrap,
|
class ARIAGridAccessible : public HyperTextAccessibleWrap,
|
||||||
public TableAccessible
|
public TableAccessible
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||||
|
|
||||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIAGridAccessible, AccessibleWrap)
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIAGridAccessible, HyperTextAccessibleWrap)
|
||||||
|
|
||||||
// Accessible
|
// Accessible
|
||||||
virtual a11y::role NativeRole() const override;
|
virtual a11y::role NativeRole() const override;
|
||||||
|
@ -68,12 +68,12 @@ protected:
|
||||||
/**
|
/**
|
||||||
* Accessible for ARIA row.
|
* Accessible for ARIA row.
|
||||||
*/
|
*/
|
||||||
class ARIARowAccessible : public AccessibleWrap
|
class ARIARowAccessible : public HyperTextAccessibleWrap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ARIARowAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
ARIARowAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||||
|
|
||||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIARowAccessible, AccessibleWrap)
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(ARIARowAccessible, HyperTextAccessibleWrap)
|
||||||
|
|
||||||
// Accessible
|
// Accessible
|
||||||
virtual a11y::role NativeRole() const override;
|
virtual a11y::role NativeRole() const override;
|
||||||
|
|
|
@ -86,17 +86,17 @@ public:
|
||||||
/**
|
/**
|
||||||
* HTML table row accessible (html:tr).
|
* HTML table row accessible (html:tr).
|
||||||
*/
|
*/
|
||||||
class HTMLTableRowAccessible : public AccessibleWrap
|
class HTMLTableRowAccessible : public HyperTextAccessibleWrap
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLTableRowAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
HTMLTableRowAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||||
AccessibleWrap(aContent, aDoc)
|
HyperTextAccessibleWrap(aContent, aDoc)
|
||||||
{
|
{
|
||||||
mType = eHTMLTableRowType;
|
mType = eHTMLTableRowType;
|
||||||
mGenericTypes |= eTableRow;
|
mGenericTypes |= eTableRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableRowAccessible, AccessibleWrap)
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableRowAccessible, HyperTextAccessibleWrap)
|
||||||
|
|
||||||
// Accessible
|
// Accessible
|
||||||
virtual a11y::role NativeRole() const override;
|
virtual a11y::role NativeRole() const override;
|
||||||
|
@ -116,18 +116,18 @@ protected:
|
||||||
// data vs. layout heuristic
|
// data vs. layout heuristic
|
||||||
// #define SHOW_LAYOUT_HEURISTIC
|
// #define SHOW_LAYOUT_HEURISTIC
|
||||||
|
|
||||||
class HTMLTableAccessible : public AccessibleWrap,
|
class HTMLTableAccessible : public HyperTextAccessibleWrap,
|
||||||
public TableAccessible
|
public TableAccessible
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
HTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||||
AccessibleWrap(aContent, aDoc)
|
HyperTextAccessibleWrap(aContent, aDoc)
|
||||||
{
|
{
|
||||||
mType = eHTMLTableType;
|
mType = eHTMLTableType;
|
||||||
mGenericTypes |= eTable;
|
mGenericTypes |= eTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableAccessible, AccessibleWrap)
|
NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLTableAccessible, HyperTextAccessibleWrap)
|
||||||
|
|
||||||
// TableAccessible
|
// TableAccessible
|
||||||
virtual Accessible* Caption() const override;
|
virtual Accessible* Caption() const override;
|
||||||
|
|
|
@ -230,7 +230,7 @@
|
||||||
relations: {
|
relations: {
|
||||||
RELATION_LABELLED_BY: "caption",
|
RELATION_LABELLED_BY: "caption",
|
||||||
},
|
},
|
||||||
interfaces: nsIAccessibleTable,
|
interfaces: [ nsIAccessibleText, nsIAccessibleHyperText, nsIAccessibleTable ],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
role: ROLE_CAPTION,
|
role: ROLE_CAPTION,
|
||||||
|
@ -241,6 +241,7 @@
|
||||||
},
|
},
|
||||||
{ // td inside thead
|
{ // td inside thead
|
||||||
role: ROLE_ROW,
|
role: ROLE_ROW,
|
||||||
|
interfaces: [ nsIAccessibleText, nsIAccessibleHyperText ],
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
role: ROLE_COLUMNHEADER,
|
role: ROLE_COLUMNHEADER,
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
testTextRange(a11yrange, "selection range #7", document, 4, document, 5);
|
testTextRange(a11yrange, "selection range #7", document, 4, document, 5);
|
||||||
|
|
||||||
ok(a11yrange.crop(getAccessible("table")), "Range failed to crop #7.");
|
ok(a11yrange.crop(getAccessible("table")), "Range failed to crop #7.");
|
||||||
testTextRange(a11yrange, "cropped range #7", "c2", 5, "c2", 6);
|
testTextRange(a11yrange, "cropped range #7", "table", 0, "table", 1);
|
||||||
|
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ static const uint32_t XPC_TABLE_DEFAULT_SIZE = 40;
|
||||||
// nsISupports
|
// nsISupports
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleTable,
|
NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleTable,
|
||||||
xpcAccessibleGeneric,
|
xpcAccessibleHyperText,
|
||||||
nsIAccessibleTable)
|
nsIAccessibleTable)
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#define mozilla_a11y_xpcAccessibleTable_h_
|
#define mozilla_a11y_xpcAccessibleTable_h_
|
||||||
|
|
||||||
#include "nsIAccessibleTable.h"
|
#include "nsIAccessibleTable.h"
|
||||||
#include "xpcAccessibleGeneric.h"
|
#include "xpcAccessibleHyperText.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace a11y {
|
namespace a11y {
|
||||||
|
@ -16,15 +16,15 @@ namespace a11y {
|
||||||
/**
|
/**
|
||||||
* XPCOM wrapper around TableAccessible class.
|
* XPCOM wrapper around TableAccessible class.
|
||||||
*/
|
*/
|
||||||
class xpcAccessibleTable : public xpcAccessibleGeneric,
|
class xpcAccessibleTable : public xpcAccessibleHyperText,
|
||||||
public nsIAccessibleTable
|
public nsIAccessibleTable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit xpcAccessibleTable(Accessible* aIntl) :
|
explicit xpcAccessibleTable(Accessible* aIntl) :
|
||||||
xpcAccessibleGeneric(aIntl) { }
|
xpcAccessibleHyperText(aIntl) { }
|
||||||
|
|
||||||
xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces) :
|
xpcAccessibleTable(ProxyAccessible* aProxy, uint32_t aInterfaces) :
|
||||||
xpcAccessibleGeneric(aProxy, aInterfaces) {}
|
xpcAccessibleHyperText(aProxy, aInterfaces) {}
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
|
|
|
@ -28,12 +28,14 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(PerformanceObserver)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCallback)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCallback)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPerformance)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mPerformance)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOwner)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOwner)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mQueuedEntries)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(PerformanceObserver)
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(PerformanceObserver)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCallback)
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCallback)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPerformance)
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPerformance)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOwner)
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOwner)
|
||||||
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mQueuedEntries)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(PerformanceObserver)
|
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(PerformanceObserver)
|
||||||
|
|
||||||
|
|
|
@ -4,5 +4,5 @@ support-files =
|
||||||
bug527935.html
|
bug527935.html
|
||||||
bug527935_2.html
|
bug527935_2.html
|
||||||
[browser_bug629172.js]
|
[browser_bug629172.js]
|
||||||
skip-if = toolkit == 'android'
|
skip-if = toolkit == 'android' || debug && ((os == 'mac') || (os == 'win' && os_version == '10.0' && bits == 64)) # Bug 1446282
|
||||||
support-files = bug629172.html
|
support-files = bug629172.html
|
||||||
|
|
|
@ -240,10 +240,6 @@ AnimationFrameDiscardingQueue::AdvanceInternal()
|
||||||
imgFrame*
|
imgFrame*
|
||||||
AnimationFrameDiscardingQueue::Get(size_t aFrame, bool aForDisplay)
|
AnimationFrameDiscardingQueue::Get(size_t aFrame, bool aForDisplay)
|
||||||
{
|
{
|
||||||
// If we are advancing on behalf of the animation, we don't expect it to be
|
|
||||||
// getting any frames (besides the first) until we get the desired frame.
|
|
||||||
MOZ_ASSERT(aFrame == 0 || mAdvance == 0);
|
|
||||||
|
|
||||||
// The first frame is stored separately. If we only need the frame for
|
// The first frame is stored separately. If we only need the frame for
|
||||||
// display purposes, we can return it right away. If we need it for advancing
|
// display purposes, we can return it right away. If we need it for advancing
|
||||||
// the animation, we want to verify the recreated first frame is available
|
// the animation, we want to verify the recreated first frame is available
|
||||||
|
@ -271,6 +267,10 @@ AnimationFrameDiscardingQueue::Get(size_t aFrame, bool aForDisplay)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we are advancing on behalf of the animation, we don't expect it to be
|
||||||
|
// getting any frames (besides the first) until we get the desired frame.
|
||||||
|
MOZ_ASSERT(aFrame == 0 || mAdvance == 0);
|
||||||
|
|
||||||
// If we have space for the frame, it should always be available.
|
// If we have space for the frame, it should always be available.
|
||||||
MOZ_ASSERT(mDisplay[offset]);
|
MOZ_ASSERT(mDisplay[offset]);
|
||||||
return mDisplay[offset].get();
|
return mDisplay[offset].get();
|
||||||
|
@ -305,10 +305,13 @@ AnimationFrameDiscardingQueue::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf
|
||||||
for (const RefPtr<imgFrame>& frame : mDisplay) {
|
for (const RefPtr<imgFrame>& frame : mDisplay) {
|
||||||
++i;
|
++i;
|
||||||
if (mSize < i) {
|
if (mSize < i) {
|
||||||
// First frame again, we already covered it above.
|
|
||||||
MOZ_ASSERT(mFirstFrame.get() == frame.get());
|
|
||||||
i = 1;
|
i = 1;
|
||||||
continue;
|
if (mFirstFrame.get() == frame.get()) {
|
||||||
|
// First frame again, we already covered it above. We can have a
|
||||||
|
// different frame in the first frame position in the discard queue
|
||||||
|
// on subsequent passes of the animation. This is useful for recycling.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->AddSizeOfExcludingThis(aMallocSizeOf,
|
frame->AddSizeOfExcludingThis(aMallocSizeOf,
|
||||||
|
|
|
@ -369,6 +369,18 @@ set_define('JS_JITSPEW',
|
||||||
set_config('JS_JITSPEW',
|
set_config('JS_JITSPEW',
|
||||||
depends_if('--enable-jitspew')(lambda _: True))
|
depends_if('--enable-jitspew')(lambda _: True))
|
||||||
|
|
||||||
|
# When enabled, masm will generate assumeUnreachable calls that act as
|
||||||
|
# assertions in the generated code. This option is worth disabling when you
|
||||||
|
# have to track mutated values through the generated code, to avoid constantly
|
||||||
|
# dumping registers on and off the stack.
|
||||||
|
js_option('--enable-masm-verbose',
|
||||||
|
default=depends(when=moz_debug)(lambda: True),
|
||||||
|
help='Enable MacroAssembler verbosity of generated code.')
|
||||||
|
set_define('JS_MASM_VERBOSE',
|
||||||
|
depends_if('--enable-masm-verbose')(lambda _: True))
|
||||||
|
set_config('JS_MASM_VERBOSE',
|
||||||
|
depends_if('--enable-masm-verbose')(lambda _: True))
|
||||||
|
|
||||||
|
|
||||||
js_option('--enable-more-deterministic', env='JS_MORE_DETERMINISTIC',
|
js_option('--enable-more-deterministic', env='JS_MORE_DETERMINISTIC',
|
||||||
help='Enable changes that make the shell more deterministic')
|
help='Enable changes that make the shell more deterministic')
|
||||||
|
|
|
@ -939,6 +939,10 @@ frontend::CompileLazyBinASTFunction(JSContext* cx, Handle<LazyScript*> lazy, con
|
||||||
MOZ_ASSERT(lazy->enclosingScriptHasEverBeenCompiled());
|
MOZ_ASSERT(lazy->enclosingScriptHasEverBeenCompiled());
|
||||||
MOZ_ASSERT(lazy->isBinAST());
|
MOZ_ASSERT(lazy->isBinAST());
|
||||||
|
|
||||||
|
AutoAssertReportedException assertException(cx);
|
||||||
|
Rooted<JSFunction*> fun(cx, lazy->functionNonDelazifying());
|
||||||
|
AutoAssertFunctionDelazificationCompletion delazificationCompletion(cx, fun);
|
||||||
|
|
||||||
CompileOptions options(cx);
|
CompileOptions options(cx);
|
||||||
options.setMutedErrors(lazy->mutedErrors())
|
options.setMutedErrors(lazy->mutedErrors())
|
||||||
.setFileAndLine(lazy->filename(), lazy->lineno())
|
.setFileAndLine(lazy->filename(), lazy->lineno())
|
||||||
|
@ -986,10 +990,8 @@ frontend::CompileLazyBinASTFunction(JSContext* cx, Handle<LazyScript*> lazy, con
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NameFunctions(cx, pn)) {
|
delazificationCompletion.complete();
|
||||||
return false;
|
assertException.reset();
|
||||||
}
|
|
||||||
|
|
||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,9 @@
|
||||||
* 1. ... JS work, which leads to a request to do GC ...
|
* 1. ... JS work, which leads to a request to do GC ...
|
||||||
* 2. [first GC slice, which performs all root marking and possibly more marking]
|
* 2. [first GC slice, which performs all root marking and possibly more marking]
|
||||||
* 3. ... more JS work is allowed to run ...
|
* 3. ... more JS work is allowed to run ...
|
||||||
* 4. [GC mark slice, which runs entirely in drainMarkStack]
|
* 4. [GC mark slice, which runs entirely in GCRuntime::markUntilBudgetExhaused]
|
||||||
* 5. ... more JS work ...
|
* 5. ... more JS work ...
|
||||||
* 6. [GC mark slice, which runs entirely in drainMarkStack]
|
* 6. [GC mark slice, which runs entirely in GCRuntime::markUntilBudgetExhaused]
|
||||||
* 7. ... more JS work ...
|
* 7. ... more JS work ...
|
||||||
* 8. [GC marking finishes; sweeping done non-incrementally; GC is done]
|
* 8. [GC marking finishes; sweeping done non-incrementally; GC is done]
|
||||||
* 9. ... JS continues uninterrupted now that GC is finishes ...
|
* 9. ... JS continues uninterrupted now that GC is finishes ...
|
||||||
|
|
|
@ -4814,8 +4814,7 @@ GCRuntime::markWeakReferences(gcstats::PhaseKind phase)
|
||||||
marker.enterWeakMarkingMode();
|
marker.enterWeakMarkingMode();
|
||||||
|
|
||||||
// TODO bug 1167452: Make weak marking incremental
|
// TODO bug 1167452: Make weak marking incremental
|
||||||
auto unlimited = SliceBudget::unlimited();
|
drainMarkStack();
|
||||||
MOZ_RELEASE_ASSERT(marker.drainMarkStack(unlimited));
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
bool markedAny = false;
|
bool markedAny = false;
|
||||||
|
@ -4831,8 +4830,7 @@ GCRuntime::markWeakReferences(gcstats::PhaseKind phase)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto unlimited = SliceBudget::unlimited();
|
drainMarkStack();
|
||||||
MOZ_RELEASE_ASSERT(marker.drainMarkStack(unlimited));
|
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(marker.isDrained());
|
MOZ_ASSERT(marker.isDrained());
|
||||||
|
|
||||||
|
@ -4845,7 +4843,7 @@ GCRuntime::markWeakReferencesInCurrentGroup(gcstats::PhaseKind phase)
|
||||||
markWeakReferences<SweepGroupZonesIter>(phase);
|
markWeakReferences<SweepGroupZonesIter>(phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class ZoneIterT, class CompartmentIterT>
|
template <class ZoneIterT>
|
||||||
void
|
void
|
||||||
GCRuntime::markGrayReferences(gcstats::PhaseKind phase)
|
GCRuntime::markGrayReferences(gcstats::PhaseKind phase)
|
||||||
{
|
{
|
||||||
|
@ -4860,14 +4858,13 @@ GCRuntime::markGrayReferences(gcstats::PhaseKind phase)
|
||||||
(*op)(&marker, grayRootTracer.data);
|
(*op)(&marker, grayRootTracer.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto unlimited = SliceBudget::unlimited();
|
drainMarkStack();
|
||||||
MOZ_RELEASE_ASSERT(marker.drainMarkStack(unlimited));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GCRuntime::markGrayReferencesInCurrentGroup(gcstats::PhaseKind phase)
|
GCRuntime::markGrayReferencesInCurrentGroup(gcstats::PhaseKind phase)
|
||||||
{
|
{
|
||||||
markGrayReferences<SweepGroupZonesIter, SweepGroupCompartmentsIter>(phase);
|
markGrayReferences<SweepGroupZonesIter>(phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -4879,7 +4876,7 @@ GCRuntime::markAllWeakReferences(gcstats::PhaseKind phase)
|
||||||
void
|
void
|
||||||
GCRuntime::markAllGrayReferences(gcstats::PhaseKind phase)
|
GCRuntime::markAllGrayReferences(gcstats::PhaseKind phase)
|
||||||
{
|
{
|
||||||
markGrayReferences<GCZonesIter, GCCompartmentsIter>(phase);
|
markGrayReferences<GCZonesIter>(phase);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JS_GC_ZEAL
|
#ifdef JS_GC_ZEAL
|
||||||
|
@ -5028,8 +5025,7 @@ js::gc::MarkingValidator::nonIncrementalMark(AutoGCSession& session)
|
||||||
gc->traceRuntimeForMajorGC(gcmarker, session);
|
gc->traceRuntimeForMajorGC(gcmarker, session);
|
||||||
|
|
||||||
gc->incrementalState = State::Mark;
|
gc->incrementalState = State::Mark;
|
||||||
auto unlimited = SliceBudget::unlimited();
|
gc->drainMarkStack();
|
||||||
MOZ_RELEASE_ASSERT(gc->marker.drainMarkStack(unlimited));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gc->incrementalState = State::Sweep;
|
gc->incrementalState = State::Sweep;
|
||||||
|
@ -5559,8 +5555,7 @@ GCRuntime::markIncomingCrossCompartmentPointers(MarkColor color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto unlimited = SliceBudget::unlimited();
|
drainMarkStack();
|
||||||
MOZ_RELEASE_ASSERT(marker.drainMarkStack(unlimited));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -6263,7 +6258,7 @@ ArenaLists::foregroundFinalize(FreeOp* fop, AllocKind thingKind, SliceBudget& sl
|
||||||
}
|
}
|
||||||
|
|
||||||
IncrementalProgress
|
IncrementalProgress
|
||||||
GCRuntime::drainMarkStack(SliceBudget& sliceBudget, gcstats::PhaseKind phase)
|
GCRuntime::markUntilBudgetExhaused(SliceBudget& sliceBudget, gcstats::PhaseKind phase)
|
||||||
{
|
{
|
||||||
// Marked GC things may vary between recording and replaying, so marking
|
// Marked GC things may vary between recording and replaying, so marking
|
||||||
// and sweeping should not perform any recorded events.
|
// and sweeping should not perform any recorded events.
|
||||||
|
@ -6271,7 +6266,14 @@ GCRuntime::drainMarkStack(SliceBudget& sliceBudget, gcstats::PhaseKind phase)
|
||||||
|
|
||||||
/* Run a marking slice and return whether the stack is now empty. */
|
/* Run a marking slice and return whether the stack is now empty. */
|
||||||
gcstats::AutoPhase ap(stats(), phase);
|
gcstats::AutoPhase ap(stats(), phase);
|
||||||
return marker.drainMarkStack(sliceBudget) ? Finished : NotFinished;
|
return marker.markUntilBudgetExhaused(sliceBudget) ? Finished : NotFinished;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GCRuntime::drainMarkStack()
|
||||||
|
{
|
||||||
|
auto unlimited = SliceBudget::unlimited();
|
||||||
|
MOZ_RELEASE_ASSERT(marker.markUntilBudgetExhaused(unlimited));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -6980,7 +6982,7 @@ GCRuntime::performSweepActions(SliceBudget& budget)
|
||||||
if (initialState != State::Sweep) {
|
if (initialState != State::Sweep) {
|
||||||
MOZ_ASSERT(marker.isDrained());
|
MOZ_ASSERT(marker.isDrained());
|
||||||
} else {
|
} else {
|
||||||
if (drainMarkStack(budget, gcstats::PhaseKind::SWEEP_MARK) == NotFinished) {
|
if (markUntilBudgetExhaused(budget, gcstats::PhaseKind::SWEEP_MARK) == NotFinished) {
|
||||||
return NotFinished;
|
return NotFinished;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7295,7 +7297,7 @@ GCRuntime::resetIncrementalGC(gc::AbortReason reason, AutoGCSession& session)
|
||||||
isCompacting = false;
|
isCompacting = false;
|
||||||
|
|
||||||
auto unlimited = SliceBudget::unlimited();
|
auto unlimited = SliceBudget::unlimited();
|
||||||
incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
|
incrementalSlice(unlimited, JS::gcreason::RESET, session);
|
||||||
|
|
||||||
isCompacting = wasCompacting;
|
isCompacting = wasCompacting;
|
||||||
|
|
||||||
|
@ -7316,7 +7318,7 @@ GCRuntime::resetIncrementalGC(gc::AbortReason reason, AutoGCSession& session)
|
||||||
isCompacting = false;
|
isCompacting = false;
|
||||||
|
|
||||||
auto unlimited = SliceBudget::unlimited();
|
auto unlimited = SliceBudget::unlimited();
|
||||||
incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
|
incrementalSlice(unlimited, JS::gcreason::RESET, session);
|
||||||
|
|
||||||
isCompacting = wasCompacting;
|
isCompacting = wasCompacting;
|
||||||
|
|
||||||
|
@ -7331,7 +7333,7 @@ GCRuntime::resetIncrementalGC(gc::AbortReason reason, AutoGCSession& session)
|
||||||
zonesToMaybeCompact.ref().clear();
|
zonesToMaybeCompact.ref().clear();
|
||||||
|
|
||||||
auto unlimited = SliceBudget::unlimited();
|
auto unlimited = SliceBudget::unlimited();
|
||||||
incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
|
incrementalSlice(unlimited, JS::gcreason::RESET, session);
|
||||||
|
|
||||||
isCompacting = wasCompacting;
|
isCompacting = wasCompacting;
|
||||||
break;
|
break;
|
||||||
|
@ -7339,7 +7341,7 @@ GCRuntime::resetIncrementalGC(gc::AbortReason reason, AutoGCSession& session)
|
||||||
|
|
||||||
case State::Decommit: {
|
case State::Decommit: {
|
||||||
auto unlimited = SliceBudget::unlimited();
|
auto unlimited = SliceBudget::unlimited();
|
||||||
incrementalCollectSlice(unlimited, JS::gcreason::RESET, session);
|
incrementalSlice(unlimited, JS::gcreason::RESET, session);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7433,7 +7435,7 @@ ShouldCleanUpEverything(JS::gcreason::Reason reason, JSGCInvocationKind gckind)
|
||||||
}
|
}
|
||||||
|
|
||||||
GCRuntime::IncrementalResult
|
GCRuntime::IncrementalResult
|
||||||
GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason reason,
|
GCRuntime::incrementalSlice(SliceBudget& budget, JS::gcreason::Reason reason,
|
||||||
AutoGCSession& session)
|
AutoGCSession& session)
|
||||||
{
|
{
|
||||||
AutoDisableBarriers disableBarriers(rt);
|
AutoDisableBarriers disableBarriers(rt);
|
||||||
|
@ -7525,7 +7527,7 @@ GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason rea
|
||||||
stats().nonincremental(AbortReason::GrayRootBufferingFailed);
|
stats().nonincremental(AbortReason::GrayRootBufferingFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drainMarkStack(budget, gcstats::PhaseKind::MARK) == NotFinished) {
|
if (markUntilBudgetExhaused(budget, gcstats::PhaseKind::MARK) == NotFinished) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7941,7 +7943,7 @@ GCRuntime::gcCycle(bool nonincrementalByAPI, SliceBudget& budget,
|
||||||
|
|
||||||
gcTracer.traceMajorGCStart();
|
gcTracer.traceMajorGCStart();
|
||||||
|
|
||||||
result = incrementalCollectSlice(budget, reason, session);
|
result = incrementalSlice(budget, reason, session);
|
||||||
|
|
||||||
chunkAllocationSinceLastGC = false;
|
chunkAllocationSinceLastGC = false;
|
||||||
|
|
||||||
|
@ -8738,7 +8740,7 @@ GCRuntime::runDebugGC()
|
||||||
}
|
}
|
||||||
} else if (hasIncrementalTwoSliceZealMode()) {
|
} else if (hasIncrementalTwoSliceZealMode()) {
|
||||||
// These modes trigger incremental GC that happens in two slices and the
|
// These modes trigger incremental GC that happens in two slices and the
|
||||||
// supplied budget is ignored by incrementalCollectSlice.
|
// supplied budget is ignored by incrementalSlice.
|
||||||
budget = SliceBudget(WorkBudget(1));
|
budget = SliceBudget(WorkBudget(1));
|
||||||
|
|
||||||
if (!isIncrementalGCInProgress()) {
|
if (!isIncrementalGCInProgress()) {
|
||||||
|
|
|
@ -301,7 +301,7 @@ class GCMarker : public JSTracer
|
||||||
return isMarkStackEmpty() && !unmarkedArenaStackTop;
|
return isMarkStackEmpty() && !unmarkedArenaStackTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_MUST_USE bool drainMarkStack(SliceBudget& budget);
|
MOZ_MUST_USE bool markUntilBudgetExhaused(SliceBudget& budget);
|
||||||
|
|
||||||
void setGCMode(JSGCMode mode) { stack.setGCMode(mode); }
|
void setGCMode(JSGCMode mode) { stack.setGCMode(mode); }
|
||||||
|
|
||||||
|
|
|
@ -593,9 +593,9 @@ class GCRuntime
|
||||||
SliceBudget& budget,
|
SliceBudget& budget,
|
||||||
JS::gcreason::Reason reason);
|
JS::gcreason::Reason reason);
|
||||||
bool shouldRepeatForDeadZone(JS::gcreason::Reason reason);
|
bool shouldRepeatForDeadZone(JS::gcreason::Reason reason);
|
||||||
IncrementalResult incrementalCollectSlice(SliceBudget& budget,
|
IncrementalResult incrementalSlice(SliceBudget& budget,
|
||||||
JS::gcreason::Reason reason,
|
JS::gcreason::Reason reason,
|
||||||
AutoGCSession& session);
|
AutoGCSession& session);
|
||||||
MOZ_MUST_USE bool shouldCollectNurseryForSlice(bool nonincrementalByAPI,
|
MOZ_MUST_USE bool shouldCollectNurseryForSlice(bool nonincrementalByAPI,
|
||||||
SliceBudget& budget);
|
SliceBudget& budget);
|
||||||
|
|
||||||
|
@ -614,10 +614,11 @@ class GCRuntime
|
||||||
void traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark);
|
void traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark);
|
||||||
void maybeDoCycleCollection();
|
void maybeDoCycleCollection();
|
||||||
void markCompartments();
|
void markCompartments();
|
||||||
IncrementalProgress drainMarkStack(SliceBudget& sliceBudget, gcstats::PhaseKind phase);
|
IncrementalProgress markUntilBudgetExhaused(SliceBudget& sliceBudget, gcstats::PhaseKind phase);
|
||||||
template <class CompartmentIterT> void markWeakReferences(gcstats::PhaseKind phase);
|
void drainMarkStack();
|
||||||
|
template <class ZoneIterT> void markWeakReferences(gcstats::PhaseKind phase);
|
||||||
void markWeakReferencesInCurrentGroup(gcstats::PhaseKind phase);
|
void markWeakReferencesInCurrentGroup(gcstats::PhaseKind phase);
|
||||||
template <class ZoneIterT, class CompartmentIterT> void markGrayReferences(gcstats::PhaseKind phase);
|
template <class ZoneIterT> void markGrayReferences(gcstats::PhaseKind phase);
|
||||||
void markBufferedGrayRoots(JS::Zone* zone);
|
void markBufferedGrayRoots(JS::Zone* zone);
|
||||||
void markGrayReferencesInCurrentGroup(gcstats::PhaseKind phase);
|
void markGrayReferencesInCurrentGroup(gcstats::PhaseKind phase);
|
||||||
void markAllWeakReferences(gcstats::PhaseKind phase);
|
void markAllWeakReferences(gcstats::PhaseKind phase);
|
||||||
|
|
|
@ -1623,7 +1623,7 @@ VisitTraceList(F f, const int32_t* traceList, uint8_t* memory, Args&&... args)
|
||||||
/*** Mark-stack Marking ***************************************************************************/
|
/*** Mark-stack Marking ***************************************************************************/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
GCMarker::drainMarkStack(SliceBudget& budget)
|
GCMarker::markUntilBudgetExhaused(SliceBudget& budget)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
MOZ_ASSERT(!strictCompartmentChecking);
|
MOZ_ASSERT(!strictCompartmentChecking);
|
||||||
|
|
|
@ -2074,7 +2074,7 @@ MacroAssembler::handleFailure()
|
||||||
jump(excTail);
|
jump(excTail);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef JS_MASM_VERBOSE
|
||||||
static void
|
static void
|
||||||
AssumeUnreachable_(const char* output) {
|
AssumeUnreachable_(const char* output) {
|
||||||
MOZ_ReportAssertionFailure(output, __FILE__, __LINE__);
|
MOZ_ReportAssertionFailure(output, __FILE__, __LINE__);
|
||||||
|
@ -2084,7 +2084,7 @@ AssumeUnreachable_(const char* output) {
|
||||||
void
|
void
|
||||||
MacroAssembler::assumeUnreachable(const char* output)
|
MacroAssembler::assumeUnreachable(const char* output)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef JS_MASM_VERBOSE
|
||||||
if (!IsCompilingWasm()) {
|
if (!IsCompilingWasm()) {
|
||||||
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
||||||
LiveRegisterSet save(regs.asLiveSet());
|
LiveRegisterSet save(regs.asLiveSet());
|
||||||
|
@ -2119,6 +2119,7 @@ MacroAssembler::assertTestInt32(Condition cond, const T& value, const char* outp
|
||||||
|
|
||||||
template void MacroAssembler::assertTestInt32(Condition, const Address&, const char*);
|
template void MacroAssembler::assertTestInt32(Condition, const Address&, const char*);
|
||||||
|
|
||||||
|
#ifdef JS_MASM_VERBOSE
|
||||||
static void
|
static void
|
||||||
Printf0_(const char* output)
|
Printf0_(const char* output)
|
||||||
{
|
{
|
||||||
|
@ -2129,10 +2130,12 @@ Printf0_(const char* output)
|
||||||
// output, and it's always unbuffered.
|
// output, and it's always unbuffered.
|
||||||
fprintf(stderr, "%s", output);
|
fprintf(stderr, "%s", output);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssembler::printf(const char* output)
|
MacroAssembler::printf(const char* output)
|
||||||
{
|
{
|
||||||
|
#ifdef JS_MASM_VERBOSE
|
||||||
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
||||||
LiveRegisterSet save(regs.asLiveSet());
|
LiveRegisterSet save(regs.asLiveSet());
|
||||||
PushRegsInMask(save);
|
PushRegsInMask(save);
|
||||||
|
@ -2145,8 +2148,10 @@ MacroAssembler::printf(const char* output)
|
||||||
callWithABI(JS_FUNC_TO_DATA_PTR(void*, Printf0_));
|
callWithABI(JS_FUNC_TO_DATA_PTR(void*, Printf0_));
|
||||||
|
|
||||||
PopRegsInMask(save);
|
PopRegsInMask(save);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef JS_MASM_VERBOSE
|
||||||
static void
|
static void
|
||||||
Printf1_(const char* output, uintptr_t value)
|
Printf1_(const char* output, uintptr_t value)
|
||||||
{
|
{
|
||||||
|
@ -2158,10 +2163,12 @@ Printf1_(const char* output, uintptr_t value)
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%s", line.get());
|
fprintf(stderr, "%s", line.get());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssembler::printf(const char* output, Register value)
|
MacroAssembler::printf(const char* output, Register value)
|
||||||
{
|
{
|
||||||
|
#ifdef JS_MASM_VERBOSE
|
||||||
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
AllocatableRegisterSet regs(RegisterSet::Volatile());
|
||||||
LiveRegisterSet save(regs.asLiveSet());
|
LiveRegisterSet save(regs.asLiveSet());
|
||||||
PushRegsInMask(save);
|
PushRegsInMask(save);
|
||||||
|
@ -2177,6 +2184,7 @@ MacroAssembler::printf(const char* output, Register value)
|
||||||
callWithABI(JS_FUNC_TO_DATA_PTR(void*, Printf1_));
|
callWithABI(JS_FUNC_TO_DATA_PTR(void*, Printf1_));
|
||||||
|
|
||||||
PopRegsInMask(save);
|
PopRegsInMask(save);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef JS_TRACE_LOGGING
|
#ifdef JS_TRACE_LOGGING
|
||||||
|
|
|
@ -6,15 +6,6 @@ ac_add_options --target=aarch64-linux-android
|
||||||
|
|
||||||
ac_add_options --with-branding=mobile/android/branding/nightly
|
ac_add_options --with-branding=mobile/android/branding/nightly
|
||||||
|
|
||||||
export AR="$topsrcdir/clang/bin/llvm-ar"
|
|
||||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
|
||||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
|
||||||
|
|
||||||
# Enable LTO if the NDK is available.
|
|
||||||
if [ -z "$NO_NDK" ]; then
|
|
||||||
ac_add_options --enable-lto
|
|
||||||
fi
|
|
||||||
|
|
||||||
export MOZILLA_OFFICIAL=1
|
export MOZILLA_OFFICIAL=1
|
||||||
export MOZ_TELEMETRY_REPORTING=1
|
export MOZ_TELEMETRY_REPORTING=1
|
||||||
export MOZ_ANDROID_POCKET=1
|
export MOZ_ANDROID_POCKET=1
|
||||||
|
|
|
@ -16,13 +16,4 @@ export MOZ_TELEMETRY_REPORTING=1
|
||||||
export MOZ_ANDROID_MMA=1
|
export MOZ_ANDROID_MMA=1
|
||||||
export MOZ_ANDROID_POCKET=1
|
export MOZ_ANDROID_POCKET=1
|
||||||
|
|
||||||
export AR="$topsrcdir/clang/bin/llvm-ar"
|
|
||||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
|
||||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
|
||||||
|
|
||||||
# Enable LTO if the NDK is available.
|
|
||||||
if [ -z "$NO_NDK" ]; then
|
|
||||||
ac_add_options --enable-lto
|
|
||||||
fi
|
|
||||||
|
|
||||||
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
||||||
|
|
|
@ -14,13 +14,4 @@ export MOZILLA_OFFICIAL=1
|
||||||
export MOZ_TELEMETRY_REPORTING=1
|
export MOZ_TELEMETRY_REPORTING=1
|
||||||
export MOZ_ANDROID_POCKET=1
|
export MOZ_ANDROID_POCKET=1
|
||||||
|
|
||||||
export AR="$topsrcdir/clang/bin/llvm-ar"
|
|
||||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
|
||||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
|
||||||
|
|
||||||
# Enable LTO if the NDK is available.
|
|
||||||
if [ -z "$NO_NDK" ]; then
|
|
||||||
ac_add_options --enable-lto
|
|
||||||
fi
|
|
||||||
|
|
||||||
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче