This patch changes things so that dynamic atoms and static atoms have distinct
implementations. This is a step towards allowing dynamic atoms and static atoms
to have different layouts in memory, which will allow static atoms to be
represented more compactly.
Specifically, the patch does the following.
- It renames AtomImpl as DynamicAtom and PermanentAtomImpl as StaticAtom, and
the latter is no longer a subclass of the former. This required duplicating
some methods from the former into the latter: ScriptableToString(),
ToUTF8String(), ScriptableEquals(), IsStaticAtom(). (This duplication will
disappear in the future if the representations of dynamic atoms and static
atoms diverge. Indeed, SizeOfIncludingThis() is already different in the two
classes.)
- It replaces all mentions of "permanent"/"non-permanent" atoms with
"static"/"dynamic".
- In ~DynamicAtom() it removes the check that causes gAtomTable to be deleted
when it becomes empty. This will only happen at shutdown and so doesn't seem
useful.
- It documents better various things, especially the basics of the
dynamic/static split, the transmutation of dynamic atoms to static atoms, and
the details of the SizeOf functions.
--HG--
extra : rebase_source : dbf903012e70ebf1a43de1e1088db1bc1b8dd4f4
Adding the auto-completion text in the URL bar triggers selection change
notifications on Android 5.0 and above. That led us to think the user
changed the selection, and in turn commit the auto-completion. This
patch makes us ignore this edge case and preserve the auto-completion.
Inform Gecko of the Android process lifecycle by calling
GeckoThread.onPause and onResume, so that Gecko is more likely to be in
a consistent state if Android kills our process.
GeckoThread.waitOnGecko blocks the current thread and waits for previous
events on the Gecko thread to finish executing before continuing. This
is implemented by synchronously running a dummy event on the Gecko
thread. This patch also lets us get rid of sendEventToGeckoSync in
GeckoAppShell.
This bug changed the meaning of profiles with empty names (""). It used
to mean the same thing as a null name, which represents the default
profile. However, the new behavior is that an empty name indicates a
custom profile. So the tests involving empty names are removed from
testGeckoProfile.
Add GeckoThread.initWithProfile that make it easy to target a particular
profile. The method succeeds when GeckoThread has not been initialized
or is already using the specified profile. It fails when the current
profile does not match the specified profile.
Make sure we treat profiles under a custom directory differently. To
simplify things, custom profiles must already exist, and we don't
attempt to cache instances of GeckoProfile containing custom profiles.
Custom profiles are an edge use case (must be passed in via Intent
arguments) so I think it's reasonable to have this behavior change.
Only determine GeckoThread arguments when GeckoThread has not been
started in GeckoApp. Otherwise, if GeckoThread has already started, we
don't need those arguments.
GeckoProfile.get() was reaching into GeckoApp to get and set the current
profile. I think now that GeckoThread is managing the profile, we don't
need that anymore. Also move the GuestSession check to getFromArgs, and
get rid of GeckoApp.getDefaultProfileName and
GeckoProfile.sIsUsingCustomProfile, which are redundant now.
Because Gecko itself can only handle one profile per process, we should
let the GeckoThread singleton manage our GeckoProfile instance on the
Java side, instead of using GeckoApp.
C4595 is "'operator new': non-member operator new or delete functions may not be declared inline".
This warning is already suppressed for newer versions of clang.
MozReview-Commit-ID: GTzLtIGtpbR
--HG--
extra : rebase_source : 2782fff9796aedc976edf2c9820125f9b74c76e1
This patch fixes the hack of using a trio of |const char*| pointers to
represent a property that has two strings and a length.
--HG--
extra : rebase_source : 9f603b768146a78baf9fa2b4096cccfae9f87322