Issue #2255 & #1240 - Simplify and enhance Maybe and Some(). https://bugzilla.mozilla.org/show_bug.cgi?id=1325351 This is a prerequisite for our BigInt V8 fast forward and potential #2255 fix.

This commit is contained in:
Brian Smith 2023-07-04 13:58:36 -05:00 committed by roytam1
commit 2c0384c4a2
2 changed files with 53 additions and 23 deletions

View file

@ -588,6 +588,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