mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1045067 - Fix some bad implicit constructors in dom/content/ipc; r=smaug
This commit is contained in:
parent
4fe8931d85
commit
13b9d95037
@ -2313,7 +2313,7 @@ private:
|
||||
|
||||
class MOZ_STACK_CLASS nsAutoScriptBlocker {
|
||||
public:
|
||||
nsAutoScriptBlocker(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) {
|
||||
explicit nsAutoScriptBlocker(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) {
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
nsContentUtils::AddScriptBlocker();
|
||||
}
|
||||
|
@ -1274,7 +1274,7 @@ private:
|
||||
|
||||
FileDescriptor::PlatformHandleType handle =
|
||||
FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFileDesc));
|
||||
if (!SendOnOpenCacheFile(mFileSize, handle)) {
|
||||
if (!SendOnOpenCacheFile(mFileSize, FileDescriptor(handle))) {
|
||||
unused << Send__delete__(this);
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ private:
|
||||
class AutoEntryScript : public AutoJSAPI,
|
||||
protected ScriptSettingsStackEntry {
|
||||
public:
|
||||
AutoEntryScript(nsIGlobalObject* aGlobalObject,
|
||||
explicit AutoEntryScript(nsIGlobalObject* aGlobalObject,
|
||||
bool aIsMainThread = NS_IsMainThread(),
|
||||
// Note: aCx is mandatory off-main-thread.
|
||||
JSContext* aCx = nullptr);
|
||||
@ -222,7 +222,7 @@ private:
|
||||
*/
|
||||
class AutoIncumbentScript : protected ScriptSettingsStackEntry {
|
||||
public:
|
||||
AutoIncumbentScript(nsIGlobalObject* aGlobalObject);
|
||||
explicit AutoIncumbentScript(nsIGlobalObject* aGlobalObject);
|
||||
private:
|
||||
JS::AutoHideScriptedCaller mCallerOverride;
|
||||
};
|
||||
@ -237,7 +237,7 @@ private:
|
||||
*/
|
||||
class AutoNoJSAPI : protected ScriptSettingsStackEntry {
|
||||
public:
|
||||
AutoNoJSAPI(bool aIsMainThread = NS_IsMainThread());
|
||||
explicit AutoNoJSAPI(bool aIsMainThread = NS_IsMainThread());
|
||||
private:
|
||||
mozilla::Maybe<AutoCxPusher> mCxPusher;
|
||||
};
|
||||
|
@ -124,7 +124,7 @@ class MOZ_STACK_CLASS AutoDontReportUncaught {
|
||||
bool mWasSet;
|
||||
|
||||
public:
|
||||
AutoDontReportUncaught(JSContext* aContext) : mContext(aContext) {
|
||||
explicit AutoDontReportUncaught(JSContext* aContext) : mContext(aContext) {
|
||||
MOZ_ASSERT(aContext);
|
||||
mWasSet = JS::ContextOptionsRef(mContext).dontReportUncaught();
|
||||
if (!mWasSet) {
|
||||
|
@ -191,7 +191,7 @@ public:
|
||||
Optional_base<JS::Handle<T>, JS::Rooted<T> >()
|
||||
{}
|
||||
|
||||
Optional(JSContext* cx) :
|
||||
explicit Optional(JSContext* cx) :
|
||||
Optional_base<JS::Handle<T>, JS::Rooted<T> >()
|
||||
{
|
||||
this->Construct(cx);
|
||||
|
@ -415,7 +415,7 @@ public:
|
||||
NonWindowLike
|
||||
};
|
||||
|
||||
ProtoAndIfaceCache(Kind aKind) : mKind(aKind) {
|
||||
explicit ProtoAndIfaceCache(Kind aKind) : mKind(aKind) {
|
||||
MOZ_COUNT_CTOR(ProtoAndIfaceCache);
|
||||
if (aKind == WindowLike) {
|
||||
mArrayCache = new ArrayCache();
|
||||
@ -496,7 +496,7 @@ struct VerifyTraceProtoAndIfaceCacheCalledTracer : public JSTracer
|
||||
{
|
||||
bool ok;
|
||||
|
||||
VerifyTraceProtoAndIfaceCacheCalledTracer(JSRuntime *rt)
|
||||
explicit VerifyTraceProtoAndIfaceCacheCalledTracer(JSRuntime *rt)
|
||||
: JSTracer(rt, VerifyTraceProtoAndIfaceCacheCalled), ok(false)
|
||||
{}
|
||||
};
|
||||
@ -2215,7 +2215,7 @@ class MOZ_STACK_CLASS RootedUnion : public T,
|
||||
private JS::CustomAutoRooter
|
||||
{
|
||||
public:
|
||||
RootedUnion(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
explicit RootedUnion(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
T(),
|
||||
JS::CustomAutoRooter(cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
||||
{
|
||||
@ -2232,7 +2232,7 @@ class MOZ_STACK_CLASS NullableRootedUnion : public Nullable<T>,
|
||||
private JS::CustomAutoRooter
|
||||
{
|
||||
public:
|
||||
NullableRootedUnion(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
explicit NullableRootedUnion(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
Nullable<T>(),
|
||||
JS::CustomAutoRooter(cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ inline bool IsDOMProxy(JSObject *obj)
|
||||
class BaseDOMProxyHandler : public js::BaseProxyHandler
|
||||
{
|
||||
public:
|
||||
BaseDOMProxyHandler(const void* aProxyFamily, bool aHasPrototype = false)
|
||||
explicit BaseDOMProxyHandler(const void* aProxyFamily, bool aHasPrototype = false)
|
||||
: js::BaseProxyHandler(aProxyFamily, aHasPrototype)
|
||||
{}
|
||||
|
||||
|
@ -19,7 +19,7 @@ class MOZ_STACK_CLASS RootedDictionary : public T,
|
||||
private JS::CustomAutoRooter
|
||||
{
|
||||
public:
|
||||
RootedDictionary(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
explicit RootedDictionary(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
T(),
|
||||
JS::CustomAutoRooter(cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
||||
{
|
||||
@ -36,7 +36,7 @@ class MOZ_STACK_CLASS NullableRootedDictionary : public Nullable<T>,
|
||||
private JS::CustomAutoRooter
|
||||
{
|
||||
public:
|
||||
NullableRootedDictionary(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
explicit NullableRootedDictionary(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) :
|
||||
Nullable<T>(),
|
||||
JS::CustomAutoRooter(cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
||||
{
|
||||
|
@ -1081,8 +1081,8 @@ DeviceStorageFile::CreateFileDescriptor(FileDescriptor& aFileDescriptor)
|
||||
// NOTE: The FileDescriptor::PlatformHandleType constructor returns a dup of
|
||||
// the file descriptor, so we don't need the original fd after this.
|
||||
// Our scoped file descriptor will automatically close fd.
|
||||
aFileDescriptor =
|
||||
FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(fd));
|
||||
aFileDescriptor = FileDescriptor(
|
||||
FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(fd)));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3745,7 +3745,7 @@ ContentParent::RecvOpenAnonymousTemporaryFile(FileDescriptor *aFD)
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return false;
|
||||
}
|
||||
*aFD = FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(prfd));
|
||||
*aFD = FileDescriptor(FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(prfd)));
|
||||
// The FileDescriptor object owns a duplicate of the file handle; we
|
||||
// must close the original (and clean up the NSPR descriptor).
|
||||
PR_Close(prfd);
|
||||
|
@ -149,7 +149,7 @@ private:
|
||||
FileDescriptor::PlatformHandleType handle =
|
||||
FileDescriptor::PlatformHandleType(PR_FileDesc2NativeHandle(mFD));
|
||||
|
||||
mozilla::unused << tabParent->SendCacheFileDescriptor(mPath, handle);
|
||||
mozilla::unused << tabParent->SendCacheFileDescriptor(mPath, FileDescriptor(handle));
|
||||
|
||||
nsCOMPtr<nsIEventTarget> eventTarget;
|
||||
mEventTarget.swap(eventTarget);
|
||||
|
@ -213,7 +213,7 @@ class WorkerCrossThreadDispatcher
|
||||
|
||||
private:
|
||||
// Only created by WorkerPrivate.
|
||||
WorkerCrossThreadDispatcher(WorkerPrivate* aWorkerPrivate);
|
||||
explicit WorkerCrossThreadDispatcher(WorkerPrivate* aWorkerPrivate);
|
||||
|
||||
// Only called by WorkerPrivate.
|
||||
void
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
Assign(aOther);
|
||||
}
|
||||
|
||||
FileDescriptor(PlatformHandleType aHandle);
|
||||
explicit FileDescriptor(PlatformHandleType aHandle);
|
||||
|
||||
FileDescriptor(const IPDLPrivate&, const PickleType& aPickle)
|
||||
#ifdef XP_WIN
|
||||
|
@ -61,7 +61,7 @@ struct SerializedStructuredCloneBuffer
|
||||
: data(nullptr), dataLength(0)
|
||||
{ }
|
||||
|
||||
SerializedStructuredCloneBuffer(const JSAutoStructuredCloneBuffer& aOther)
|
||||
explicit SerializedStructuredCloneBuffer(const JSAutoStructuredCloneBuffer& aOther)
|
||||
{
|
||||
*this = aOther;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class MessageLink
|
||||
public:
|
||||
typedef IPC::Message Message;
|
||||
|
||||
MessageLink(MessageChannel *aChan);
|
||||
explicit MessageLink(MessageChannel *aChan);
|
||||
virtual ~MessageLink();
|
||||
|
||||
// n.b.: These methods all require that the channel monitor is
|
||||
@ -139,7 +139,7 @@ class ProcessLink
|
||||
}
|
||||
|
||||
public:
|
||||
ProcessLink(MessageChannel *chan);
|
||||
explicit ProcessLink(MessageChannel *chan);
|
||||
virtual ~ProcessLink();
|
||||
void Open(Transport* aTransport, MessageLoop *aIOLoop, Side aSide);
|
||||
|
||||
|
@ -184,7 +184,7 @@ public:
|
||||
class IToplevelProtocol : public LinkedListElement<IToplevelProtocol>
|
||||
{
|
||||
protected:
|
||||
IToplevelProtocol(ProtocolId aProtoId)
|
||||
explicit IToplevelProtocol(ProtocolId aProtoId)
|
||||
: mProtocolId(aProtoId)
|
||||
, mTrans(nullptr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user