#443: M1395138 M1400554 M1400003 M1407751 M1261175
This commit is contained in:
parent
9433b647c1
commit
99d4c13d8d
|
@ -350,6 +350,7 @@ void CleanupOSFileConstants()
|
||||||
|
|
||||||
gInitialized = false;
|
gInitialized = false;
|
||||||
delete gPaths;
|
delete gPaths;
|
||||||
|
gPaths = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -848,9 +849,7 @@ bool SetStringProperty(JSContext *cx, JS::Handle<JSObject*> aObject, const char
|
||||||
*/
|
*/
|
||||||
bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
|
bool DefineOSFileConstants(JSContext *cx, JS::Handle<JSObject*> global)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(gInitialized);
|
if (!gInitialized || gPaths == nullptr) {
|
||||||
|
|
||||||
if (gPaths == nullptr) {
|
|
||||||
// If an initialization error was ignored, we may end up with
|
// If an initialization error was ignored, we may end up with
|
||||||
// |gInitialized == true| but |gPaths == nullptr|. We cannot
|
// |gInitialized == true| but |gPaths == nullptr|. We cannot
|
||||||
// |MOZ_ASSERT| this, as this would kill precompile_cache.js,
|
// |MOZ_ASSERT| this, as this would kill precompile_cache.js,
|
||||||
|
|
|
@ -127,9 +127,9 @@ static void PrintUniformityInfo(Layer* aLayer)
|
||||||
/* all of the per-layer prepared data we need to maintain */
|
/* all of the per-layer prepared data we need to maintain */
|
||||||
struct PreparedLayer
|
struct PreparedLayer
|
||||||
{
|
{
|
||||||
PreparedLayer(LayerComposite *aLayer, RenderTargetIntRect aClipRect) :
|
PreparedLayer(Layer *aLayer, RenderTargetIntRect aClipRect) :
|
||||||
mLayer(aLayer), mClipRect(aClipRect) {}
|
mLayer(aLayer), mClipRect(aClipRect) {}
|
||||||
LayerComposite* mLayer;
|
RefPtr<Layer> mLayer;
|
||||||
RenderTargetIntRect mClipRect;
|
RenderTargetIntRect mClipRect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -374,7 +374,8 @@ ContainerPrepare(ContainerT* aContainer,
|
||||||
CULLING_LOG("Preparing sublayer %p\n", layerToRender->GetLayer());
|
CULLING_LOG("Preparing sublayer %p\n", layerToRender->GetLayer());
|
||||||
|
|
||||||
layerToRender->Prepare(clipRect);
|
layerToRender->Prepare(clipRect);
|
||||||
aContainer->mPrepared->mLayers.AppendElement(PreparedLayer(layerToRender, clipRect));
|
aContainer->mPrepared->mLayers.AppendElement(PreparedLayer(layerToRender->GetLayer(),
|
||||||
|
clipRect));
|
||||||
}
|
}
|
||||||
|
|
||||||
CULLING_LOG("Preparing container layer %p\n", aContainer->GetLayer());
|
CULLING_LOG("Preparing container layer %p\n", aContainer->GetLayer());
|
||||||
|
@ -520,7 +521,7 @@ RenderLayers(ContainerT* aContainer,
|
||||||
|
|
||||||
for (size_t i = 0u; i < aContainer->mPrepared->mLayers.Length(); i++) {
|
for (size_t i = 0u; i < aContainer->mPrepared->mLayers.Length(); i++) {
|
||||||
PreparedLayer& preparedData = aContainer->mPrepared->mLayers[i];
|
PreparedLayer& preparedData = aContainer->mPrepared->mLayers[i];
|
||||||
LayerComposite* layerToRender = preparedData.mLayer;
|
LayerComposite* layerToRender = static_cast<LayerComposite*>(preparedData.mLayer->ImplData());
|
||||||
const RenderTargetIntRect& clipRect = preparedData.mClipRect;
|
const RenderTargetIntRect& clipRect = preparedData.mClipRect;
|
||||||
Layer* layer = layerToRender->GetLayer();
|
Layer* layer = layerToRender->GetLayer();
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ AssertGCThingIsNotAnObjectSubclass(js::gc::Cell* cell) {}
|
||||||
* Type T must be one of: JS::Value, jsid, JSObject*, JSString*, JSScript*
|
* Type T must be one of: JS::Value, jsid, JSObject*, JSString*, JSScript*
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class Heap : public js::HeapBase<T>
|
class MOZ_NON_MEMMOVABLE Heap : public js::HeapBase<T>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Heap() {
|
Heap() {
|
||||||
|
@ -1119,6 +1119,14 @@ class JS_PUBLIC_API(ObjectPtr)
|
||||||
|
|
||||||
explicit ObjectPtr(JSObject* obj) : value(obj) {}
|
explicit ObjectPtr(JSObject* obj) : value(obj) {}
|
||||||
|
|
||||||
|
ObjectPtr(const ObjectPtr& other) : value(other.value) {}
|
||||||
|
|
||||||
|
ObjectPtr(ObjectPtr&& other)
|
||||||
|
: value(other.value)
|
||||||
|
{
|
||||||
|
other.value = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
/* Always call finalize before the destructor. */
|
/* Always call finalize before the destructor. */
|
||||||
~ObjectPtr() { MOZ_ASSERT(!value); }
|
~ObjectPtr() { MOZ_ASSERT(!value); }
|
||||||
|
|
||||||
|
|
|
@ -325,8 +325,11 @@ template <typename T>
|
||||||
class BarrieredBaseMixins {};
|
class BarrieredBaseMixins {};
|
||||||
|
|
||||||
// Base class of all barrier types.
|
// Base class of all barrier types.
|
||||||
|
//
|
||||||
|
// This is marked non-memmovable since post barriers added by derived classes
|
||||||
|
// can add pointers to class instances to the store buffer.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class BarrieredBase : public BarrieredBaseMixins<T>
|
class MOZ_NON_MEMMOVABLE BarrieredBase : public BarrieredBaseMixins<T>
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
// BarrieredBase is not directly instantiable.
|
// BarrieredBase is not directly instantiable.
|
||||||
|
|
|
@ -123,6 +123,10 @@ TLSFilterTransaction::Close(nsresult aReason)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mTimer) {
|
||||||
|
mTimer->Cancel();
|
||||||
|
mTimer = nullptr;
|
||||||
|
}
|
||||||
mTransaction->Close(aReason);
|
mTransaction->Close(aReason);
|
||||||
mTransaction = nullptr;
|
mTransaction = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ nsViewManager::~nsViewManager()
|
||||||
gViewManagers = nullptr;
|
gViewManagers = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
mPresShell = nullptr;
|
MOZ_RELEASE_ASSERT(!mPresShell, "Releasing nsViewManager without having called Destroy on the PresShell!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't hold a reference to the presentation context because it
|
// We don't hold a reference to the presentation context because it
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
template<class T>
|
template<class T>
|
||||||
class Heap;
|
class Heap;
|
||||||
|
class ObjectPtr;
|
||||||
} /* namespace JS */
|
} /* namespace JS */
|
||||||
|
|
||||||
class nsRegion;
|
class nsRegion;
|
||||||
|
@ -659,7 +660,7 @@ struct nsTArray_CopyWithConstructors
|
||||||
template<class E>
|
template<class E>
|
||||||
struct MOZ_NEEDS_MEMMOVABLE_TYPE nsTArray_CopyChooser
|
struct MOZ_NEEDS_MEMMOVABLE_TYPE nsTArray_CopyChooser
|
||||||
{
|
{
|
||||||
typedef nsTArray_CopyWithMemutils Type;
|
using Type = nsTArray_CopyWithMemutils;
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -669,25 +670,31 @@ struct MOZ_NEEDS_MEMMOVABLE_TYPE nsTArray_CopyChooser
|
||||||
template<class E>
|
template<class E>
|
||||||
struct nsTArray_CopyChooser<JS::Heap<E>>
|
struct nsTArray_CopyChooser<JS::Heap<E>>
|
||||||
{
|
{
|
||||||
typedef nsTArray_CopyWithConstructors<JS::Heap<E>> Type;
|
using Type = nsTArray_CopyWithConstructors<JS::Heap<E>>;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct nsTArray_CopyChooser<JS::ObjectPtr>
|
||||||
|
{
|
||||||
|
using Type = nsTArray_CopyWithConstructors<JS::ObjectPtr>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct nsTArray_CopyChooser<nsRegion>
|
struct nsTArray_CopyChooser<nsRegion>
|
||||||
{
|
{
|
||||||
typedef nsTArray_CopyWithConstructors<nsRegion> Type;
|
using Type = nsTArray_CopyWithConstructors<nsRegion>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct nsTArray_CopyChooser<nsIntRegion>
|
struct nsTArray_CopyChooser<nsIntRegion>
|
||||||
{
|
{
|
||||||
typedef nsTArray_CopyWithConstructors<nsIntRegion> Type;
|
using Type = nsTArray_CopyWithConstructors<nsIntRegion>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct nsTArray_CopyChooser<mozilla::layers::TileClient>
|
struct nsTArray_CopyChooser<mozilla::layers::TileClient>
|
||||||
{
|
{
|
||||||
typedef nsTArray_CopyWithConstructors<mozilla::layers::TileClient> Type;
|
using Type = nsTArray_CopyWithConstructors<mozilla::layers::TileClient>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue