mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Merge mozilla-central to mozilla-inbound for fixing startup crashes for user
This commit is contained in:
commit
deddd4e468
@ -3642,7 +3642,7 @@ gfxFont::SanitizeMetrics(gfxFont::Metrics *aMetrics, bool aIsBadUnderlineFont)
|
||||
// usual font tables (which can happen in the case of a legacy bitmap or Type1
|
||||
// font for which the platform-specific backend used platform APIs instead of
|
||||
// sfnt tables to create the horizontal metrics).
|
||||
UniquePtr<const gfxFont::Metrics>
|
||||
const gfxFont::Metrics*
|
||||
gfxFont::CreateVerticalMetrics()
|
||||
{
|
||||
const uint32_t kHheaTableTag = TRUETYPE_TAG('h','h','e','a');
|
||||
@ -3651,8 +3651,8 @@ gfxFont::CreateVerticalMetrics()
|
||||
const uint32_t kOS_2TableTag = TRUETYPE_TAG('O','S','/','2');
|
||||
uint32_t len;
|
||||
|
||||
UniquePtr<Metrics> metrics = MakeUnique<Metrics>();
|
||||
::memset(metrics.get(), 0, sizeof(Metrics));
|
||||
Metrics* metrics = new Metrics;
|
||||
::memset(metrics, 0, sizeof(Metrics));
|
||||
|
||||
// Some basic defaults, in case the font lacks any real metrics tables.
|
||||
// TODO: consider what rounding (if any) we should apply to these.
|
||||
@ -3797,7 +3797,7 @@ gfxFont::CreateVerticalMetrics()
|
||||
metrics->xHeight = metrics->emHeight / 2;
|
||||
metrics->capHeight = metrics->maxAscent;
|
||||
|
||||
return Move(metrics);
|
||||
return metrics;
|
||||
}
|
||||
|
||||
gfxFloat
|
||||
@ -3848,8 +3848,8 @@ void
|
||||
gfxFont::AddGlyphChangeObserver(GlyphChangeObserver *aObserver)
|
||||
{
|
||||
if (!mGlyphChangeObservers) {
|
||||
mGlyphChangeObservers =
|
||||
MakeUnique<nsTHashtable<nsPtrHashKey<GlyphChangeObserver>>>();
|
||||
mGlyphChangeObservers.reset(
|
||||
new nsTHashtable<nsPtrHashKey<GlyphChangeObserver>>);
|
||||
}
|
||||
mGlyphChangeObservers->PutEntry(aObserver);
|
||||
}
|
||||
|
@ -1551,7 +1551,7 @@ public:
|
||||
return GetHorizontalMetrics();
|
||||
}
|
||||
if (!mVerticalMetrics) {
|
||||
mVerticalMetrics = CreateVerticalMetrics();
|
||||
mVerticalMetrics.reset(CreateVerticalMetrics());
|
||||
}
|
||||
return *mVerticalMetrics;
|
||||
}
|
||||
@ -1868,7 +1868,7 @@ public:
|
||||
protected:
|
||||
virtual const Metrics& GetHorizontalMetrics() = 0;
|
||||
|
||||
mozilla::UniquePtr<const Metrics> CreateVerticalMetrics();
|
||||
const Metrics* CreateVerticalMetrics();
|
||||
|
||||
// Output a single glyph at *aPt, which is updated by the glyph's advance.
|
||||
// Normal glyphs are simply accumulated in aBuffer until it is full and
|
||||
|
@ -802,16 +802,10 @@ or run without that action (ie: --no-{action})"
|
||||
'ascii', 'replace'
|
||||
)
|
||||
else:
|
||||
# for taskcluster, there are no buildbot properties, and we must pass
|
||||
# for taskcluster, there are no buildbot properties, and we pass
|
||||
# MOZ_BUILD_DATE into mozharness as an environment variable, only
|
||||
# to have it pass the same value out with the same name.
|
||||
try:
|
||||
buildid = os.environ['MOZ_BUILD_DATE']
|
||||
except KeyError:
|
||||
self.fatal(
|
||||
"MOZ_BUILD_DATE must be provided as an environment var on Taskcluster"
|
||||
)
|
||||
|
||||
buildid = os.environ.get('MOZ_BUILD_DATE')
|
||||
|
||||
if not buildid:
|
||||
self.info("Creating buildid through current time")
|
||||
|
Loading…
Reference in New Issue
Block a user