зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1325351 part 1 - Remove workaround for VC in Maybe. r=froydnj
MozReview-Commit-ID: Anlrf3D2WtN --HG-- extra : rebase_source : 9cc2e29e374753ad40774ebd0a0efce9f9449e3b
This commit is contained in:
Родитель
6b392d8d0c
Коммит
3526b1e58d
|
@ -593,6 +593,15 @@ class JS_FRIEND_API(AutoEnterPolicy)
|
|||
inline void recordLeave() {}
|
||||
#endif
|
||||
|
||||
private:
|
||||
// This operator needs to be deleted explicitly, otherwise Visual C++ will
|
||||
// create it automatically when it is part of the export JS API. In that
|
||||
// case, compile would fail because HandleId is not allowed to be assigned
|
||||
// and consequently instantiation of assign operator of mozilla::Maybe
|
||||
// would fail. See bug 1325351 comment 16. Copy constructor is removed at
|
||||
// the same time for consistency.
|
||||
AutoEnterPolicy(const AutoEnterPolicy&) = delete;
|
||||
AutoEnterPolicy& operator=(const AutoEnterPolicy&) = delete;
|
||||
};
|
||||
|
||||
#ifdef JS_DEBUG
|
||||
|
|
|
@ -157,13 +157,7 @@ public:
|
|||
if (&aOther != this) {
|
||||
if (aOther.mIsSome) {
|
||||
if (mIsSome) {
|
||||
// XXX(seth): The correct code for this branch, below, can't be used
|
||||
// due to a bug in Visual Studio 2010. See bug 1052940.
|
||||
/*
|
||||
ref() = aOther.ref();
|
||||
*/
|
||||
reset();
|
||||
emplace(*aOther);
|
||||
} else {
|
||||
emplace(*aOther);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче