summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-04-30 02:16:38 +0300
committerGitHub <noreply@github.com>2019-04-30 02:16:38 +0300
commit0e70828f2c84cc0ac9afd85d14eb30b5fc8358dd (patch)
treec960e4fdb3fa6d1feae4a76793d643ada0a43aff /js
parent038d437d7424323944a351dbda7da6a14ac7c31d (diff)
downloadUXP-0e70828f2c84cc0ac9afd85d14eb30b5fc8358dd.tar
UXP-0e70828f2c84cc0ac9afd85d14eb30b5fc8358dd.tar.gz
UXP-0e70828f2c84cc0ac9afd85d14eb30b5fc8358dd.tar.lz
UXP-0e70828f2c84cc0ac9afd85d14eb30b5fc8358dd.tar.xz
UXP-0e70828f2c84cc0ac9afd85d14eb30b5fc8358dd.zip
tab to spaces js/src
Diffstat (limited to 'js')
-rw-r--r--js/src/jsgc.cpp78
-rw-r--r--js/src/jsgc.h10
-rw-r--r--js/src/jswatchpoint.cpp4
3 files changed, 46 insertions, 46 deletions
diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
index ad3d7093d..283eb22b0 100644
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -1527,7 +1527,7 @@ inline void
ArenaLists::prepareForIncrementalGC()
{
purge();
- for (auto i : AllAllocKinds())
+ for (auto i : AllAllocKinds())
arenaLists[i].moveCursorToEnd();
}
@@ -3573,18 +3573,18 @@ RelazifyFunctions(Zone* zone, AllocKind kind)
static bool
ShouldCollectZone(Zone* zone, JS::gcreason::Reason reason)
{
- // Normally we collect all scheduled zones.
- if (reason != JS::gcreason::COMPARTMENT_REVIVED)
- return zone->isGCScheduled();
+ // Normally we collect all scheduled zones.
+ if (reason != JS::gcreason::COMPARTMENT_REVIVED)
+ return zone->isGCScheduled();
- // If we are repeating a GC becuase we noticed dead compartments haven't
- // been collected, then only collect zones contianing those compartments.
- for (CompartmentsInZoneIter comp(zone); !comp.done(); comp.next()) {
- if (comp->scheduledForDestruction)
- return true;
- }
-
- return false;
+ // If we are repeating a GC becuase we noticed dead compartments haven't
+ // been collected, then only collect zones contianing those compartments.
+ for (CompartmentsInZoneIter comp(zone); !comp.done(); comp.next()) {
+ if (comp->scheduledForDestruction)
+ return true;
+ }
+
+ return false;
}
bool
@@ -5527,12 +5527,12 @@ GCRuntime::budgetIncrementalGC(JS::gcreason::Reason reason, SliceBudget& budget,
AutoLockForExclusiveAccess& lock)
{
AbortReason unsafeReason = IsIncrementalGCUnsafe(rt);
- if (unsafeReason == AbortReason::None) {
- if (reason == JS::gcreason::COMPARTMENT_REVIVED)
- unsafeReason = gc::AbortReason::CompartmentRevived;
- else if (mode != JSGC_MODE_INCREMENTAL)
- unsafeReason = gc::AbortReason::ModeChange;
- }
+ if (unsafeReason == AbortReason::None) {
+ if (reason == JS::gcreason::COMPARTMENT_REVIVED)
+ unsafeReason = gc::AbortReason::CompartmentRevived;
+ else if (mode != JSGC_MODE_INCREMENTAL)
+ unsafeReason = gc::AbortReason::ModeChange;
+ }
if (unsafeReason != AbortReason::None) {
resetIncrementalGC(unsafeReason, lock);
@@ -5799,17 +5799,17 @@ GCRuntime::checkIfGCAllowedInCurrentState(JS::gcreason::Reason reason)
bool
GCRuntime::shouldRepeatForDeadZone(JS::gcreason::Reason reason)
{
- MOZ_ASSERT_IF(reason == JS::gcreason::COMPARTMENT_REVIVED, !isIncremental);
-
- if (!isIncremental || isIncrementalGCInProgress())
- return false;
-
- for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) {
- if (c->scheduledForDestruction)
- return true;
- }
-
- return false;
+ MOZ_ASSERT_IF(reason == JS::gcreason::COMPARTMENT_REVIVED, !isIncremental);
+
+ if (!isIncremental || isIncrementalGCInProgress())
+ return false;
+
+ for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) {
+ if (c->scheduledForDestruction)
+ return true;
+ }
+
+ return false;
}
void
@@ -5831,21 +5831,21 @@ GCRuntime::collect(bool nonincrementalByAPI, SliceBudget budget, JS::gcreason::R
poked = false;
bool wasReset = gcCycle(nonincrementalByAPI, budget, reason);
- bool repeatForDeadZone = false;
+ bool repeatForDeadZone = false;
if (poked && cleanUpEverything) {
- /* Need to re-schedule all zones for GC. */
+ /* Need to re-schedule all zones for GC. */
JS::PrepareForFullGC(rt->contextFromMainThread());
} else if (shouldRepeatForDeadZone(reason) && !wasReset) {
- /*
- * This code makes an extra effort to collect compartments that we
- * thought were dead at the start of the GC. See the large comment
- * in beginMarkPhase.
- */
- repeatForDeadZone = true;
- reason = JS::gcreason::COMPARTMENT_REVIVED;
- }
+ /*
+ * This code makes an extra effort to collect compartments that we
+ * thought were dead at the start of the GC. See the large comment
+ * in beginMarkPhase.
+ */
+ repeatForDeadZone = true;
+ reason = JS::gcreason::COMPARTMENT_REVIVED;
+ }
/*
diff --git a/js/src/jsgc.h b/js/src/jsgc.h
index 5d3c37286..85b9f5f4a 100644
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -62,7 +62,7 @@ enum class State {
D(MallocBytesTrigger) \
D(GCBytesTrigger) \
D(ZoneChange) \
- D(CompartmentRevived)
+ D(CompartmentRevived)
enum class AbortReason {
#define MAKE_REASON(name) name,
GC_ABORT_REASONS(MAKE_REASON)
@@ -455,10 +455,10 @@ class ArenaList {
return !*cursorp_;
}
- void moveCursorToEnd() {
- while (!isCursorAtEnd())
- cursorp_ = &(*cursorp_)->next;
- }
+ void moveCursorToEnd() {
+ while (!isCursorAtEnd())
+ cursorp_ = &(*cursorp_)->next;
+ }
// This can return nullptr.
Arena* arenaAfterCursor() const {
diff --git a/js/src/jswatchpoint.cpp b/js/src/jswatchpoint.cpp
index f147a07dc..e37323555 100644
--- a/js/src/jswatchpoint.cpp
+++ b/js/src/jswatchpoint.cpp
@@ -187,8 +187,8 @@ WatchpointMap::markAll(JSTracer* trc)
Map::Entry& entry = e.front();
JSObject* object = entry.key().object;
jsid id = entry.key().id;
- JSObject* priorObject = object;
- jsid priorId = id;
+ JSObject* priorObject = object;
+ jsid priorId = id;
MOZ_ASSERT(JSID_IS_STRING(priorId) || JSID_IS_INT(priorId) || JSID_IS_SYMBOL(priorId));
TraceManuallyBarrieredEdge(trc, &object, "held Watchpoint object");