mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 1283888 - Remove LOW_MEMORY event from GeckoEvent; r=me
LOW_MEMORY event is not used anywhere and can be safely removed.
This commit is contained in:
parent
06fcf5a71e
commit
159d9d9ab2
@ -69,7 +69,6 @@ public class GeckoEvent {
|
||||
NATIVE_GESTURE_EVENT(31),
|
||||
CALL_OBSERVER(33),
|
||||
REMOVE_OBSERVER(34),
|
||||
LOW_MEMORY(35),
|
||||
TELEMETRY_HISTOGRAM_ADD(37),
|
||||
TELEMETRY_UI_SESSION_START(42),
|
||||
TELEMETRY_UI_SESSION_STOP(43),
|
||||
@ -358,12 +357,6 @@ public class GeckoEvent {
|
||||
return event;
|
||||
}
|
||||
|
||||
public static GeckoEvent createLowMemoryEvent(int level) {
|
||||
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LOW_MEMORY);
|
||||
event.mMetaState = level;
|
||||
return event;
|
||||
}
|
||||
|
||||
public static GeckoEvent createTelemetryHistogramAddEvent(String histogram,
|
||||
int value) {
|
||||
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.TELEMETRY_HISTOGRAM_ADD);
|
||||
|
@ -330,11 +330,6 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
|
||||
break;
|
||||
}
|
||||
|
||||
case LOW_MEMORY: {
|
||||
mMetaState = jenv->GetIntField(jobj, jMetaStateField);
|
||||
break;
|
||||
}
|
||||
|
||||
case TELEMETRY_HISTOGRAM_ADD: {
|
||||
ReadCharactersField(jenv);
|
||||
ReadCharactersExtraField(jenv);
|
||||
|
@ -587,7 +587,6 @@ public:
|
||||
NATIVE_GESTURE_EVENT = 31,
|
||||
CALL_OBSERVER = 33,
|
||||
REMOVE_OBSERVER = 34,
|
||||
LOW_MEMORY = 35,
|
||||
TELEMETRY_HISTOGRAM_ADD = 37,
|
||||
ADD_OBSERVER = 38,
|
||||
TELEMETRY_UI_SESSION_START = 42,
|
||||
@ -600,15 +599,6 @@ public:
|
||||
dummy_java_enum_list_end
|
||||
};
|
||||
|
||||
enum {
|
||||
// Memory pressure levels. Keep these in sync with those in MemoryMonitor.java.
|
||||
MEMORY_PRESSURE_NONE = 0,
|
||||
MEMORY_PRESSURE_CLEANUP = 1,
|
||||
MEMORY_PRESSURE_LOW = 2,
|
||||
MEMORY_PRESSURE_MEDIUM = 3,
|
||||
MEMORY_PRESSURE_HIGH = 4
|
||||
};
|
||||
|
||||
enum {
|
||||
ACTION_GAMEPAD_ADDED = 1,
|
||||
ACTION_GAMEPAD_REMOVED = 2
|
||||
|
@ -776,16 +776,6 @@ nsAppShell::LegacyGeckoEvent::Run()
|
||||
nsAppShell::Get()->AddObserver(curEvent->Characters(), curEvent->Observer());
|
||||
break;
|
||||
|
||||
case AndroidGeckoEvent::LOW_MEMORY:
|
||||
// TODO hook in memory-reduction stuff for different levels here
|
||||
if (curEvent->MetaState() >= AndroidGeckoEvent::MEMORY_PRESSURE_MEDIUM) {
|
||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||
if (os) {
|
||||
os->NotifyObservers(nullptr, "memory-pressure", u"low-memory");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case AndroidGeckoEvent::TELEMETRY_HISTOGRAM_ADD:
|
||||
// If the extras field is not empty then this is a keyed histogram.
|
||||
if (!curEvent->CharactersExtra().IsVoid()) {
|
||||
|
Loading…
Reference in New Issue
Block a user