diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index 938317c8a4..e190e04618 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -47,7 +47,6 @@ nsDefaultURIFixup::~nsDefaultURIFixup() { } -/* nsIURI createExposableURI (in nsIURI aURI); */ NS_IMETHODIMP nsDefaultURIFixup::CreateExposableURI(nsIURI* aURI, nsIURI** aReturn) { @@ -111,7 +110,6 @@ nsDefaultURIFixup::CreateExposableURI(nsIURI* aURI, nsIURI** aReturn) return NS_OK; } -/* nsIURI createFixupURI (in nsAUTF8String aURIText, in unsigned long aFixupFlags); */ NS_IMETHODIMP nsDefaultURIFixup::CreateFixupURI(const nsACString& aStringURI, uint32_t aFixupFlags, diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 667dbb8bfe..bc9426cacd 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -1886,7 +1886,6 @@ nsDocShell::GetChromeEventHandler(nsIDOMEventTarget** aChromeEventHandler) return NS_OK; } -/* void setCurrentURI (in nsIURI uri); */ NS_IMETHODIMP nsDocShell::SetCurrentURI(nsIURI* aURI) { @@ -7179,7 +7178,6 @@ nsDocShell::Embed(nsIContentViewer* aContentViewer, return NS_OK; } -/* void setIsPrinting (in boolean aIsPrinting); */ NS_IMETHODIMP nsDocShell::SetIsPrinting(bool aIsPrinting) { @@ -13001,7 +12999,6 @@ nsDocShell::IsFrame() return !!parent; } -/* boolean IsBeingDestroyed (); */ NS_IMETHODIMP nsDocShell::IsBeingDestroyed(bool* aDoomed) { diff --git a/docshell/base/nsDocShellEnumerator.cpp b/docshell/base/nsDocShellEnumerator.cpp index d21b75436c..1f870cd01f 100644 --- a/docshell/base/nsDocShellEnumerator.cpp +++ b/docshell/base/nsDocShellEnumerator.cpp @@ -23,7 +23,6 @@ nsDocShellEnumerator::~nsDocShellEnumerator() NS_IMPL_ISUPPORTS(nsDocShellEnumerator, nsISimpleEnumerator) -/* nsISupports getNext (); */ NS_IMETHODIMP nsDocShellEnumerator::GetNext(nsISupports** aResult) { @@ -45,7 +44,6 @@ nsDocShellEnumerator::GetNext(nsISupports** aResult) return rv; } -/* boolean hasMoreElements (); */ NS_IMETHODIMP nsDocShellEnumerator::HasMoreElements(bool* aResult) { diff --git a/docshell/base/nsDocShellLoadInfo.cpp b/docshell/base/nsDocShellLoadInfo.cpp index 1593e43b64..01913dc13e 100644 --- a/docshell/base/nsDocShellLoadInfo.cpp +++ b/docshell/base/nsDocShellLoadInfo.cpp @@ -198,7 +198,6 @@ nsDocShellLoadInfo::SetPostDataStream(nsIInputStream* aStream) return NS_OK; } -/* attribute nsIInputStream headersStream; */ NS_IMETHODIMP nsDocShellLoadInfo::GetHeadersStream(nsIInputStream** aHeadersStream) { diff --git a/dom/audiochannel/AudioChannelAgent.cpp b/dom/audiochannel/AudioChannelAgent.cpp index be2e1de7a5..b68dbbf6da 100644 --- a/dom/audiochannel/AudioChannelAgent.cpp +++ b/dom/audiochannel/AudioChannelAgent.cpp @@ -35,15 +35,12 @@ AudioChannelAgent::~AudioChannelAgent() } } -/* readonly attribute long audioChannelType; */ NS_IMETHODIMP AudioChannelAgent::GetAudioChannelType(int32_t *aAudioChannelType) { *aAudioChannelType = mAudioChannelType; return NS_OK; } -/* boolean init (in nsIDOMWindow window, in long channelType, - * in nsIAudioChannelAgentCallback callback); */ NS_IMETHODIMP AudioChannelAgent::Init(nsIDOMWindow* aWindow, int32_t aChannelType, nsIAudioChannelAgentCallback *aCallback) @@ -52,8 +49,6 @@ AudioChannelAgent::Init(nsIDOMWindow* aWindow, int32_t aChannelType, /* useWeakRef = */ false); } -/* boolean initWithWeakCallback (in nsIDOMWindow window, in long channelType, - * in nsIAudioChannelAgentCallback callback); */ NS_IMETHODIMP AudioChannelAgent::InitWithWeakCallback(nsIDOMWindow* aWindow, int32_t aChannelType, @@ -118,7 +113,6 @@ AudioChannelAgent::InitInternal(nsIDOMWindow* aWindow, int32_t aChannelType, return NS_OK; } -/* boolean startPlaying (); */ NS_IMETHODIMP AudioChannelAgent::StartPlaying(float *aVolume, bool* aMuted) { MOZ_ASSERT(aVolume); @@ -139,7 +133,6 @@ NS_IMETHODIMP AudioChannelAgent::StartPlaying(float *aVolume, bool* aMuted) return NS_OK; } -/* void stopPlaying (); */ NS_IMETHODIMP AudioChannelAgent::StopPlaying(void) { if (mAudioChannelType == AUDIO_AGENT_CHANNEL_ERROR || diff --git a/dom/base/DOMException.cpp b/dom/base/DOMException.cpp index 6909f2ed00..ddfb41a6eb 100644 --- a/dom/base/DOMException.cpp +++ b/dom/base/DOMException.cpp @@ -292,7 +292,6 @@ Exception::StowJSVal(JS::Value& aVp) } } -/* readonly attribute AUTF8String message; */ NS_IMETHODIMP Exception::GetMessageMoz(nsACString& aMessage) { @@ -302,7 +301,6 @@ Exception::GetMessageMoz(nsACString& aMessage) return NS_OK; } -/* readonly attribute nsresult result; */ NS_IMETHODIMP Exception::GetResult(nsresult* aResult) { @@ -313,7 +311,6 @@ Exception::GetResult(nsresult* aResult) return NS_OK; } -/* readonly attribute AUTF8String name; */ NS_IMETHODIMP Exception::GetName(nsACString& aName) { @@ -335,7 +332,6 @@ Exception::GetName(nsACString& aName) return NS_OK; } -/* readonly attribute AString filename; */ NS_IMETHODIMP Exception::GetFilename(nsAString& aFilename) { @@ -349,7 +345,6 @@ Exception::GetFilename(nsAString& aFilename) return NS_OK; } -/* readonly attribute uint32_t lineNumber; */ NS_IMETHODIMP Exception::GetLineNumber(uint32_t *aLineNumber) { @@ -367,7 +362,6 @@ Exception::GetLineNumber(uint32_t *aLineNumber) return NS_OK; } -/* readonly attribute uint32_t columnNumber; */ NS_IMETHODIMP Exception::GetColumnNumber(uint32_t* aColumnNumber) { @@ -378,7 +372,6 @@ Exception::GetColumnNumber(uint32_t* aColumnNumber) return NS_OK; } -/* readonly attribute nsIStackFrame location; */ NS_IMETHODIMP Exception::GetLocation(nsIStackFrame** aLocation) { @@ -390,7 +383,6 @@ Exception::GetLocation(nsIStackFrame** aLocation) return NS_OK; } -/* readonly attribute nsISupports data; */ NS_IMETHODIMP Exception::GetData(nsISupports** aData) { @@ -402,7 +394,6 @@ Exception::GetData(nsISupports** aData) return NS_OK; } -/* AUTF8String toString (); */ NS_IMETHODIMP Exception::ToString(nsACString& _retval) { diff --git a/dom/base/NodeIterator.cpp b/dom/base/NodeIterator.cpp index 2d5729348c..95b880d935 100644 --- a/dom/base/NodeIterator.cpp +++ b/dom/base/NodeIterator.cpp @@ -179,21 +179,18 @@ NS_INTERFACE_MAP_END NS_IMPL_CYCLE_COLLECTING_ADDREF(NodeIterator) NS_IMPL_CYCLE_COLLECTING_RELEASE(NodeIterator) -/* readonly attribute nsIDOMNode root; */ NS_IMETHODIMP NodeIterator::GetRoot(nsIDOMNode * *aRoot) { NS_ADDREF(*aRoot = Root()->AsDOMNode()); return NS_OK; } -/* readonly attribute unsigned long whatToShow; */ NS_IMETHODIMP NodeIterator::GetWhatToShow(uint32_t *aWhatToShow) { *aWhatToShow = WhatToShow(); return NS_OK; } -/* readonly attribute nsIDOMNodeFilter filter; */ NS_IMETHODIMP NodeIterator::GetFilter(nsIDOMNodeFilter **aFilter) { NS_ENSURE_ARG_POINTER(aFilter); @@ -203,13 +200,11 @@ NS_IMETHODIMP NodeIterator::GetFilter(nsIDOMNodeFilter **aFilter) return NS_OK; } -/* nsIDOMNode nextNode () raises (DOMException); */ NS_IMETHODIMP NodeIterator::NextNode(nsIDOMNode **_retval) { return ImplNodeGetter(&NodeIterator::NextNode, _retval); } -/* nsIDOMNode previousNode () raises (DOMException); */ NS_IMETHODIMP NodeIterator::PreviousNode(nsIDOMNode **_retval) { return ImplNodeGetter(&NodeIterator::PreviousNode, _retval); @@ -248,7 +243,6 @@ NodeIterator::NextOrPrevNode(NodePointer::MoveToMethodType aMove, return nullptr; } -/* void detach (); */ NS_IMETHODIMP NodeIterator::Detach(void) { if (mRoot) { @@ -257,7 +251,6 @@ NS_IMETHODIMP NodeIterator::Detach(void) return NS_OK; } -/* readonly attribute nsIDOMNode referenceNode; */ NS_IMETHODIMP NodeIterator::GetReferenceNode(nsIDOMNode * *aRefNode) { nsCOMPtr node(do_QueryInterface(GetReferenceNode())); @@ -265,7 +258,6 @@ NS_IMETHODIMP NodeIterator::GetReferenceNode(nsIDOMNode * *aRefNode) return NS_OK; } -/* readonly attribute boolean pointerBeforeReferenceNode; */ NS_IMETHODIMP NodeIterator::GetPointerBeforeReferenceNode(bool *aBeforeNode) { *aBeforeNode = PointerBeforeReferenceNode(); diff --git a/dom/base/ProcessGlobal.cpp b/dom/base/ProcessGlobal.cpp index dbd2e6700e..8c7af95833 100644 --- a/dom/base/ProcessGlobal.cpp +++ b/dom/base/ProcessGlobal.cpp @@ -36,7 +36,6 @@ ProcessGlobal::Get() return static_cast(service.get()); } -/* [notxpcom] boolean markForCC (); */ // This method isn't automatically forwarded safely because it's notxpcom, so // the IDL binding doesn't know what value to return. NS_IMETHODIMP_(bool) diff --git a/dom/base/TreeWalker.cpp b/dom/base/TreeWalker.cpp index f61a05ead0..c6ccdcf2ec 100644 --- a/dom/base/TreeWalker.cpp +++ b/dom/base/TreeWalker.cpp @@ -61,21 +61,18 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(dom::TreeWalker) * nsIDOMTreeWalker Getters/Setters */ -/* readonly attribute nsIDOMNode root; */ NS_IMETHODIMP TreeWalker::GetRoot(nsIDOMNode * *aRoot) { NS_ADDREF(*aRoot = Root()->AsDOMNode()); return NS_OK; } -/* readonly attribute unsigned long whatToShow; */ NS_IMETHODIMP TreeWalker::GetWhatToShow(uint32_t *aWhatToShow) { *aWhatToShow = WhatToShow(); return NS_OK; } -/* readonly attribute nsIDOMNodeFilter filter; */ NS_IMETHODIMP TreeWalker::GetFilter(nsIDOMNodeFilter * *aFilter) { NS_ENSURE_ARG_POINTER(aFilter); @@ -85,7 +82,6 @@ NS_IMETHODIMP TreeWalker::GetFilter(nsIDOMNodeFilter * *aFilter) return NS_OK; } -/* attribute nsIDOMNode currentNode; */ NS_IMETHODIMP TreeWalker::GetCurrentNode(nsIDOMNode * *aCurrentNode) { if (mCurrentNode) { @@ -124,7 +120,6 @@ TreeWalker::SetCurrentNode(nsINode& aNode, ErrorResult& aResult) * nsIDOMTreeWalker functions */ -/* nsIDOMNode parentNode (); */ NS_IMETHODIMP TreeWalker::ParentNode(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::ParentNode, _retval); @@ -153,7 +148,6 @@ TreeWalker::ParentNode(ErrorResult& aResult) return nullptr; } -/* nsIDOMNode firstChild (); */ NS_IMETHODIMP TreeWalker::FirstChild(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::FirstChild, _retval); @@ -165,7 +159,6 @@ TreeWalker::FirstChild(ErrorResult& aResult) return FirstChildInternal(false, aResult); } -/* nsIDOMNode lastChild (); */ NS_IMETHODIMP TreeWalker::LastChild(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::LastChild, _retval); @@ -177,7 +170,6 @@ TreeWalker::LastChild(ErrorResult& aResult) return FirstChildInternal(true, aResult); } -/* nsIDOMNode previousSibling (); */ NS_IMETHODIMP TreeWalker::PreviousSibling(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::PreviousSibling, _retval); @@ -189,7 +181,6 @@ TreeWalker::PreviousSibling(ErrorResult& aResult) return NextSiblingInternal(true, aResult); } -/* nsIDOMNode nextSibling (); */ NS_IMETHODIMP TreeWalker::NextSibling(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::NextSibling, _retval); @@ -201,7 +192,6 @@ TreeWalker::NextSibling(ErrorResult& aResult) return NextSiblingInternal(false, aResult); } -/* nsIDOMNode previousNode (); */ NS_IMETHODIMP TreeWalker::PreviousNode(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::PreviousNode, _retval); @@ -260,7 +250,6 @@ TreeWalker::PreviousNode(ErrorResult& aResult) return nullptr; } -/* nsIDOMNode nextNode (); */ NS_IMETHODIMP TreeWalker::NextNode(nsIDOMNode **_retval) { return ImplNodeGetter(&TreeWalker::NextNode, _retval); diff --git a/dom/base/nsGlobalWindowCommands.cpp b/dom/base/nsGlobalWindowCommands.cpp index 2c71b2b631..4b10868e71 100644 --- a/dom/base/nsGlobalWindowCommands.cpp +++ b/dom/base/nsGlobalWindowCommands.cpp @@ -174,7 +174,6 @@ public: NS_IMPL_ISUPPORTS(nsSelectionCommandsBase, nsIControllerCommand) -/* boolean isCommandEnabled (in string aCommandName, in nsISupports aCommandContext); */ NS_IMETHODIMP nsSelectionCommandsBase::IsCommandEnabled(const char * aCommandName, nsISupports *aCommandContext, @@ -186,7 +185,6 @@ nsSelectionCommandsBase::IsCommandEnabled(const char * aCommandName, return NS_OK; } -/* void getCommandStateParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */ NS_IMETHODIMP nsSelectionCommandsBase::GetCommandStateParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) @@ -195,7 +193,6 @@ nsSelectionCommandsBase::GetCommandStateParams(const char *aCommandName, return NS_ERROR_NOT_IMPLEMENTED; } -/* void doCommandParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */ NS_IMETHODIMP nsSelectionCommandsBase::DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) @@ -856,7 +853,6 @@ nsWebNavigationBaseCommand::DoCommand(const char *aCommandName, return DoWebNavCommand(aCommandName, webNav); } -/* void doCommandParams (in string aCommandName, in nsICommandParams aParams, in nsISupports aCommandContext); */ NS_IMETHODIMP nsWebNavigationBaseCommand::DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandContext) diff --git a/dom/base/nsInProcessTabChildGlobal.cpp b/dom/base/nsInProcessTabChildGlobal.cpp index 41a8c34f83..1d4bcfd78b 100644 --- a/dom/base/nsInProcessTabChildGlobal.cpp +++ b/dom/base/nsInProcessTabChildGlobal.cpp @@ -113,7 +113,6 @@ nsInProcessTabChildGlobal::~nsInProcessTabChildGlobal() mozilla::DropJSObjects(this); } -/* [notxpcom] boolean markForCC (); */ // This method isn't automatically forwarded safely because it's notxpcom, so // the IDL binding doesn't know what value to return. NS_IMETHODIMP_(bool) diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 248267345b..ede5ae9012 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -3045,7 +3045,6 @@ NS_IMETHODIMP nsJSArgArray::GetLength(uint32_t *aLength) return NS_OK; } -/* void queryElementAt (in unsigned long index, in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ NS_IMETHODIMP nsJSArgArray::QueryElementAt(uint32_t index, const nsIID & uuid, void * *result) { *result = nullptr; @@ -3062,13 +3061,11 @@ NS_IMETHODIMP nsJSArgArray::QueryElementAt(uint32_t index, const nsIID & uuid, v return NS_ERROR_NO_INTERFACE; } -/* unsigned long indexOf (in unsigned long startIndex, in nsISupports element); */ NS_IMETHODIMP nsJSArgArray::IndexOf(uint32_t startIndex, nsISupports *element, uint32_t *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } -/* nsISimpleEnumerator enumerate (); */ NS_IMETHODIMP nsJSArgArray::Enumerate(nsISimpleEnumerator **_retval) { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/dom/base/nsOpenURIInFrameParams.cpp b/dom/base/nsOpenURIInFrameParams.cpp index 2b80a70dce..97706c0edd 100644 --- a/dom/base/nsOpenURIInFrameParams.cpp +++ b/dom/base/nsOpenURIInFrameParams.cpp @@ -16,7 +16,6 @@ nsOpenURIInFrameParams::nsOpenURIInFrameParams() : nsOpenURIInFrameParams::~nsOpenURIInFrameParams() { } -/* attribute DOMString referrer; */ NS_IMETHODIMP nsOpenURIInFrameParams::GetReferrer(nsAString& aReferrer) { @@ -30,7 +29,6 @@ nsOpenURIInFrameParams::SetReferrer(const nsAString& aReferrer) return NS_OK; } -/* attribute boolean isPrivate; */ NS_IMETHODIMP nsOpenURIInFrameParams::GetIsPrivate(bool* aIsPrivate) { diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp index 84b796baf2..132dd81f00 100644 --- a/dom/base/nsXMLHttpRequest.cpp +++ b/dom/base/nsXMLHttpRequest.cpp @@ -582,7 +582,6 @@ nsXMLHttpRequest::SizeOfEventTargetIncludingThis( // - lots } -/* readonly attribute nsIChannel channel; */ NS_IMETHODIMP nsXMLHttpRequest::GetChannel(nsIChannel **aChannel) { @@ -604,7 +603,6 @@ static void LogMessage(const char* aWarning, nsPIDOMWindow* aWindow) aWarning); } -/* readonly attribute nsIDOMDocument responseXML; */ NS_IMETHODIMP nsXMLHttpRequest::GetResponseXML(nsIDOMDocument **aResponseXML) { @@ -718,7 +716,6 @@ nsXMLHttpRequest::AppendToResponseText(const char * aSrcBuffer, return NS_OK; } -/* readonly attribute AString responseText; */ NS_IMETHODIMP nsXMLHttpRequest::GetResponseText(nsAString& aResponseText) { @@ -831,7 +828,6 @@ nsXMLHttpRequest::CreatePartialBlob() mResponseBlob = mBlobSet->GetBlobInternal(GetOwner(), contentType); } -/* attribute AString responseType; */ NS_IMETHODIMP nsXMLHttpRequest::GetResponseType(nsAString& aResponseType) { switch (mResponseType) { @@ -892,7 +888,6 @@ nsXMLHttpRequest::StaticAssertions() } #endif -/* attribute AString responseType; */ NS_IMETHODIMP nsXMLHttpRequest::SetResponseType(const nsAString& aResponseType) { nsXMLHttpRequest::ResponseTypeEnum responseType; @@ -961,7 +956,6 @@ nsXMLHttpRequest::SetResponseType(nsXMLHttpRequest::ResponseTypeEnum aResponseTy } -/* readonly attribute jsval response; */ NS_IMETHODIMP nsXMLHttpRequest::GetResponse(JSContext *aCx, JS::MutableHandle aResult) { @@ -1090,7 +1084,6 @@ nsXMLHttpRequest::IsDeniedCrossSiteRequest() return false; } -/* readonly attribute AString responseURL; */ void nsXMLHttpRequest::GetResponseURL(nsAString& aUrl) { @@ -1119,7 +1112,6 @@ nsXMLHttpRequest::GetResponseURL(nsAString& aUrl) CopyUTF8toUTF16(temp, aUrl); } -/* readonly attribute unsigned long status; */ NS_IMETHODIMP nsXMLHttpRequest::GetStatus(uint32_t *aStatus) { @@ -1256,7 +1248,6 @@ nsXMLHttpRequest::CloseRequestWithError(const nsAString& aType, mState &= ~XML_HTTP_REQUEST_SYNCLOOPING; } -/* void abort (); */ void nsXMLHttpRequest::Abort() { @@ -1326,7 +1317,6 @@ nsXMLHttpRequest::IsSafeHeader(const nsACString& header, nsIHttpChannel* httpCha return isSafe; } -/* ByteString getAllResponseHeaders(); */ IMPL_CSTRING_GETTER(GetAllResponseHeaders) void nsXMLHttpRequest::GetAllResponseHeaders(nsCString& aResponseHeaders) @@ -1983,7 +1973,6 @@ nsXMLHttpRequest::OnDataAvailable(nsIRequest *request, return NS_OK; } -/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */ NS_IMETHODIMP nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt) { @@ -2234,7 +2223,6 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt) return NS_OK; } -/* void onStopRequest (in nsIRequest request, in nsISupports ctxt, in nsresult status, in wstring statusArg); */ NS_IMETHODIMP nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult status) { @@ -2665,7 +2653,6 @@ nsXMLHttpRequest::GetRequestBody(nsIVariant* aVariant, return NS_OK; } -/* void send (in nsIVariant aBody); */ NS_IMETHODIMP nsXMLHttpRequest::Send(nsIVariant *aBody) { @@ -3098,7 +3085,6 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable& aBody) return rv; } -/* void setRequestHeader (in ByteString header, in ByteString value); */ // http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-xmlhttprequest-setrequestheader NS_IMETHODIMP nsXMLHttpRequest::SetRequestHeader(const nsACString& header, @@ -3204,7 +3190,6 @@ nsXMLHttpRequest::SetRequestHeader(const nsACString& header, return rv; } -/* attribute unsigned long timeout; */ NS_IMETHODIMP nsXMLHttpRequest::GetTimeout(uint32_t *aTimeout) { @@ -3268,7 +3253,6 @@ nsXMLHttpRequest::StartTimeoutTimer() ); } -/* readonly attribute unsigned short readyState; */ NS_IMETHODIMP nsXMLHttpRequest::GetReadyState(uint16_t *aState) { @@ -3296,7 +3280,6 @@ nsXMLHttpRequest::ReadyState() return DONE; } -/* void overrideMimeType(in DOMString mimetype); */ NS_IMETHODIMP nsXMLHttpRequest::SlowOverrideMimeType(const nsAString& aMimeType) { @@ -3304,7 +3287,6 @@ nsXMLHttpRequest::SlowOverrideMimeType(const nsAString& aMimeType) return NS_OK; } -/* attribute boolean mozBackgroundRequest; */ NS_IMETHODIMP nsXMLHttpRequest::GetMozBackgroundRequest(bool *_retval) { @@ -3347,7 +3329,6 @@ nsXMLHttpRequest::SetMozBackgroundRequest(bool aMozBackgroundRequest, nsresult& } } -/* attribute boolean withCredentials; */ NS_IMETHODIMP nsXMLHttpRequest::GetWithCredentials(bool *_retval) { diff --git a/dom/bindings/Exceptions.cpp b/dom/bindings/Exceptions.cpp index 321f1e7ead..e3575703f0 100644 --- a/dom/bindings/Exceptions.cpp +++ b/dom/bindings/Exceptions.cpp @@ -352,14 +352,12 @@ NS_IMPL_RELEASE_INHERITED(JSStackFrame, StackFrame) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(JSStackFrame) NS_INTERFACE_MAP_END_INHERITING(StackFrame) -/* readonly attribute uint32_t language; */ NS_IMETHODIMP StackFrame::GetLanguage(uint32_t* aLanguage) { *aLanguage = mLanguage; return NS_OK; } -/* readonly attribute string languageName; */ NS_IMETHODIMP StackFrame::GetLanguageName(nsACString& aLanguageName) { aLanguageName.AssignLiteral("C++"); @@ -409,7 +407,6 @@ GetValueIfNotCached(JSContext* aCx, JSObject* aStack, aPropGetter(aCx, stack, aValue); } -/* readonly attribute AString filename; */ NS_IMETHODIMP JSStackFrame::GetFilename(nsAString& aFilename) { if (!mStack) { @@ -454,7 +451,6 @@ NS_IMETHODIMP StackFrame::GetFilename(nsAString& aFilename) return NS_OK; } -/* readonly attribute AString name; */ NS_IMETHODIMP JSStackFrame::GetName(nsAString& aFunction) { if (!mStack) { @@ -531,7 +527,6 @@ JSStackFrame::GetLineno() return line; } -/* readonly attribute int32_t lineNumber; */ NS_IMETHODIMP StackFrame::GetLineNumber(int32_t* aLineNumber) { *aLineNumber = GetLineno(); @@ -564,21 +559,18 @@ JSStackFrame::GetColNo() return col; } -/* readonly attribute int32_t columnNumber; */ NS_IMETHODIMP StackFrame::GetColumnNumber(int32_t* aColumnNumber) { *aColumnNumber = GetColNo(); return NS_OK; } -/* readonly attribute AUTF8String sourceLine; */ NS_IMETHODIMP StackFrame::GetSourceLine(nsACString& aSourceLine) { aSourceLine.Truncate(); return NS_OK; } -/* readonly attribute AString asyncCause; */ NS_IMETHODIMP JSStackFrame::GetAsyncCause(nsAString& aAsyncCause) { if (!mStack) { @@ -629,7 +621,6 @@ NS_IMETHODIMP StackFrame::GetAsyncCause(nsAString& aAsyncCause) return NS_OK; } -/* readonly attribute nsIStackFrame asyncCaller; */ NS_IMETHODIMP JSStackFrame::GetAsyncCaller(nsIStackFrame** aAsyncCaller) { if (!mStack) { @@ -666,7 +657,6 @@ NS_IMETHODIMP StackFrame::GetAsyncCaller(nsIStackFrame** aAsyncCaller) return NS_OK; } -/* readonly attribute nsIStackFrame caller; */ NS_IMETHODIMP JSStackFrame::GetCaller(nsIStackFrame** aCaller) { if (!mStack) { @@ -764,7 +754,6 @@ NS_IMETHODIMP StackFrame::GetFormattedStack(nsAString& aStack) return NS_OK; } -/* readonly attribute jsval nativeSavedFrame; */ NS_IMETHODIMP JSStackFrame::GetNativeSavedFrame(JS::MutableHandle aSavedFrame) { aSavedFrame.setObjectOrNull(mStack); @@ -777,7 +766,6 @@ NS_IMETHODIMP StackFrame::GetNativeSavedFrame(JS::MutableHandle aSave return NS_OK; } -/* AUTF8String toString (); */ NS_IMETHODIMP StackFrame::ToString(nsACString& _retval) { _retval.Truncate(); diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index fc524fd5e2..13262820db 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -1280,7 +1280,6 @@ WebGLContext::GetContextAttributes(Nullable& retval result.mFailIfMajorPerformanceCaveat = mOptions.failIfMajorPerformanceCaveat; } -/* [noscript] DOMString mozGetUnderlyingParamString(in GLenum pname); */ NS_IMETHODIMP WebGLContext::MozGetUnderlyingParamString(uint32_t pname, nsAString& retval) { diff --git a/dom/events/FocusEvent.cpp b/dom/events/FocusEvent.cpp index b392ac82f2..0d684f64b8 100644 --- a/dom/events/FocusEvent.cpp +++ b/dom/events/FocusEvent.cpp @@ -27,7 +27,6 @@ FocusEvent::FocusEvent(EventTarget* aOwner, } } -/* readonly attribute nsIDOMEventTarget relatedTarget; */ NS_IMETHODIMP FocusEvent::GetRelatedTarget(nsIDOMEventTarget** aRelatedTarget) { diff --git a/dom/events/SimpleGestureEvent.cpp b/dom/events/SimpleGestureEvent.cpp index d35719dcc3..4ff4522b38 100644 --- a/dom/events/SimpleGestureEvent.cpp +++ b/dom/events/SimpleGestureEvent.cpp @@ -39,7 +39,6 @@ NS_INTERFACE_MAP_BEGIN(SimpleGestureEvent) NS_INTERFACE_MAP_ENTRY(nsIDOMSimpleGestureEvent) NS_INTERFACE_MAP_END_INHERITING(MouseEvent) -/* attribute unsigned long allowedDirections; */ uint32_t SimpleGestureEvent::AllowedDirections() { @@ -61,7 +60,6 @@ SimpleGestureEvent::SetAllowedDirections(uint32_t aAllowedDirections) return NS_OK; } -/* readonly attribute unsigned long direction; */ uint32_t SimpleGestureEvent::Direction() { @@ -76,7 +74,6 @@ SimpleGestureEvent::GetDirection(uint32_t* aDirection) return NS_OK; } -/* readonly attribute float delta; */ double SimpleGestureEvent::Delta() { @@ -91,7 +88,6 @@ SimpleGestureEvent::GetDelta(double* aDelta) return NS_OK; } -/* readonly attribute unsigned long clickCount; */ uint32_t SimpleGestureEvent::ClickCount() { diff --git a/dom/gamepad/GamepadServiceTest.cpp b/dom/gamepad/GamepadServiceTest.cpp index 4f07d52971..ab30324fdb 100644 --- a/dom/gamepad/GamepadServiceTest.cpp +++ b/dom/gamepad/GamepadServiceTest.cpp @@ -39,7 +39,6 @@ GamepadServiceTest::~GamepadServiceTest() { } -/* uint32_t addGamepad(in unsigned long index, in string id, in unsigned long mapping, in unsigned long numButtons, in unsigned long numAxes); */ NS_IMETHODIMP GamepadServiceTest::AddGamepad(const char* aID, uint32_t aMapping, @@ -54,7 +53,6 @@ GamepadServiceTest::AddGamepad(const char* aID, return NS_OK; } -/* void removeGamepad (in uint32_t index); */ NS_IMETHODIMP GamepadServiceTest::RemoveGamepad(uint32_t aIndex) { GamepadFunctions::RemoveGamepad(aIndex); diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index c27d6aad72..e9d4fde8ee 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -535,7 +535,6 @@ HTMLMediaElement::SetMozSrcObject(DOMMediaStream* aValue) DoLoad(); } -/* readonly attribute nsIDOMHTMLMediaElement mozAutoplayEnabled; */ NS_IMETHODIMP HTMLMediaElement::GetMozAutoplayEnabled(bool *aAutoplayEnabled) { *aAutoplayEnabled = mAutoplayEnabled; @@ -543,7 +542,6 @@ NS_IMETHODIMP HTMLMediaElement::GetMozAutoplayEnabled(bool *aAutoplayEnabled) return NS_OK; } -/* readonly attribute nsIDOMMediaError error; */ NS_IMETHODIMP HTMLMediaElement::GetError(nsIDOMMediaError * *aError) { NS_IF_ADDREF(*aError = mError); @@ -551,7 +549,6 @@ NS_IMETHODIMP HTMLMediaElement::GetError(nsIDOMMediaError * *aError) return NS_OK; } -/* readonly attribute boolean ended; */ bool HTMLMediaElement::Ended() { @@ -572,7 +569,6 @@ NS_IMETHODIMP HTMLMediaElement::GetEnded(bool* aEnded) return NS_OK; } -/* readonly attribute DOMString currentSrc; */ NS_IMETHODIMP HTMLMediaElement::GetCurrentSrc(nsAString & aCurrentSrc) { nsAutoCString src; @@ -581,7 +577,6 @@ NS_IMETHODIMP HTMLMediaElement::GetCurrentSrc(nsAString & aCurrentSrc) return NS_OK; } -/* readonly attribute unsigned short networkState; */ NS_IMETHODIMP HTMLMediaElement::GetNetworkState(uint16_t* aNetworkState) { *aNetworkState = NetworkState(); @@ -764,7 +759,6 @@ void HTMLMediaElement::QueueSelectResourceTask() NS_NewRunnableMethod(this, &HTMLMediaElement::SelectResourceWrapper)); } -/* void load (); */ NS_IMETHODIMP HTMLMediaElement::Load() { if (mIsRunningLoadMethod) { @@ -1311,7 +1305,6 @@ nsresult HTMLMediaElement::LoadWithChannel(nsIChannel* aChannel, return NS_OK; } -/* readonly attribute unsigned short readyState; */ NS_IMETHODIMP HTMLMediaElement::GetReadyState(uint16_t* aReadyState) { *aReadyState = ReadyState(); @@ -1319,7 +1312,6 @@ NS_IMETHODIMP HTMLMediaElement::GetReadyState(uint16_t* aReadyState) return NS_OK; } -/* readonly attribute boolean seeking; */ bool HTMLMediaElement::Seeking() const { @@ -1332,7 +1324,6 @@ NS_IMETHODIMP HTMLMediaElement::GetSeeking(bool* aSeeking) return NS_OK; } -/* attribute double currentTime; */ double HTMLMediaElement::CurrentTime() const { @@ -1545,7 +1536,6 @@ NS_IMETHODIMP HTMLMediaElement::SetCurrentTime(double aCurrentTime) return rv.StealNSResult(); } -/* readonly attribute double duration; */ double HTMLMediaElement::Duration() const { @@ -1577,7 +1567,6 @@ HTMLMediaElement::Seekable() const return ranges.forget(); } -/* readonly attribute nsIDOMHTMLTimeRanges seekable; */ NS_IMETHODIMP HTMLMediaElement::GetSeekable(nsIDOMTimeRanges** aSeekable) { nsRefPtr ranges = Seekable(); @@ -1585,7 +1574,6 @@ NS_IMETHODIMP HTMLMediaElement::GetSeekable(nsIDOMTimeRanges** aSeekable) return NS_OK; } -/* readonly attribute boolean paused; */ NS_IMETHODIMP HTMLMediaElement::GetPaused(bool* aPaused) { *aPaused = Paused(); @@ -1621,7 +1609,6 @@ HTMLMediaElement::Played() return ranges.forget(); } -/* readonly attribute nsIDOMHTMLTimeRanges played; */ NS_IMETHODIMP HTMLMediaElement::GetPlayed(nsIDOMTimeRanges** aPlayed) { nsRefPtr ranges = Played(); @@ -1629,7 +1616,6 @@ NS_IMETHODIMP HTMLMediaElement::GetPlayed(nsIDOMTimeRanges** aPlayed) return NS_OK; } -/* void pause (); */ void HTMLMediaElement::Pause(ErrorResult& aRv) { @@ -1665,7 +1651,6 @@ NS_IMETHODIMP HTMLMediaElement::Pause() return rv.StealNSResult(); } -/* attribute double volume; */ NS_IMETHODIMP HTMLMediaElement::GetVolume(double* aVolume) { *aVolume = Volume(); @@ -1770,7 +1755,6 @@ HTMLMediaElement::MozGetMetadata(JSContext* cx, JS::MutableHandle aVa return rv.StealNSResult(); } -/* attribute boolean muted; */ NS_IMETHODIMP HTMLMediaElement::GetMuted(bool* aMuted) { *aMuted = Muted(); @@ -4270,7 +4254,6 @@ void HTMLMediaElement::GetCurrentSpec(nsCString& aString) } } -/* attribute double mozFragmentEnd; */ double HTMLMediaElement::MozFragmentEnd() { @@ -4301,7 +4284,6 @@ static double ClampPlaybackRate(double aPlaybackRate) return aPlaybackRate; } -/* attribute double defaultPlaybackRate; */ NS_IMETHODIMP HTMLMediaElement::GetDefaultPlaybackRate(double* aDefaultPlaybackRate) { *aDefaultPlaybackRate = DefaultPlaybackRate(); @@ -4327,7 +4309,6 @@ NS_IMETHODIMP HTMLMediaElement::SetDefaultPlaybackRate(double aDefaultPlaybackRa return rv.StealNSResult(); } -/* attribute double playbackRate; */ NS_IMETHODIMP HTMLMediaElement::GetPlaybackRate(double* aPlaybackRate) { *aPlaybackRate = PlaybackRate(); @@ -4367,7 +4348,6 @@ NS_IMETHODIMP HTMLMediaElement::SetPlaybackRate(double aPlaybackRate) return rv.StealNSResult(); } -/* attribute bool mozPreservesPitch; */ NS_IMETHODIMP HTMLMediaElement::GetMozPreservesPitch(bool* aPreservesPitch) { *aPreservesPitch = MozPreservesPitch(); @@ -4495,7 +4475,6 @@ HTMLMediaElement::VideoTracks() return mVideoTrackList; } -/* readonly attribute TextTrackList? textTracks; */ TextTrackList* HTMLMediaElement::GetTextTracks() { diff --git a/dom/html/UndoManager.cpp b/dom/html/UndoManager.cpp index 40a37d08ca..d8bb0af1de 100644 --- a/dom/html/UndoManager.cpp +++ b/dom/html/UndoManager.cpp @@ -57,7 +57,6 @@ protected: virtual ~UndoTxn() {} }; -/* void doTransaction (); */ NS_IMETHODIMP UndoTxn::DoTransaction() { @@ -66,21 +65,18 @@ UndoTxn::DoTransaction() return NS_OK; } -/* void doTransaction (); */ NS_IMETHODIMP UndoTxn::RedoTransaction() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void doTransaction (); */ NS_IMETHODIMP UndoTxn::UndoTransaction() { return NS_ERROR_NOT_IMPLEMENTED; } -/* readonly attribute boolean isTransient; */ NS_IMETHODIMP UndoTxn::GetIsTransient(bool* aIsTransient) { @@ -88,7 +84,6 @@ UndoTxn::GetIsTransient(bool* aIsTransient) return NS_OK; } -/* boolean merge (in nsITransaction aTransaction); */ NS_IMETHODIMP UndoTxn::Merge(nsITransaction* aTransaction, bool* aResult) { diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp index 53ae16cdb6..163360fe13 100644 --- a/dom/html/nsHTMLDocument.cpp +++ b/dom/html/nsHTMLDocument.cpp @@ -2493,7 +2493,6 @@ nsHTMLDocument::GenerateParserKey(void) return script; } -/* attribute DOMString designMode; */ NS_IMETHODIMP nsHTMLDocument::GetDesignMode(nsAString & aDesignMode) { @@ -3315,7 +3314,6 @@ nsHTMLDocument::ExecCommand(const nsAString& commandID, return !rv.Failed(); } -/* boolean queryCommandEnabled(in DOMString commandID); */ NS_IMETHODIMP nsHTMLDocument::QueryCommandEnabled(const nsAString& commandID, bool* _retval) @@ -3370,7 +3368,6 @@ nsHTMLDocument::QueryCommandEnabled(const nsAString& commandID, ErrorResult& rv) return retval; } -/* boolean queryCommandIndeterm (in DOMString commandID); */ NS_IMETHODIMP nsHTMLDocument::QueryCommandIndeterm(const nsAString & commandID, bool *_retval) @@ -3428,7 +3425,6 @@ nsHTMLDocument::QueryCommandIndeterm(const nsAString& commandID, ErrorResult& rv return retval; } -/* boolean queryCommandState(in DOMString commandID); */ NS_IMETHODIMP nsHTMLDocument::QueryCommandState(const nsAString & commandID, bool *_retval) { @@ -3512,7 +3508,6 @@ nsHTMLDocument::QueryCommandState(const nsAString& commandID, ErrorResult& rv) return retval; } -/* boolean queryCommandSupported(in DOMString commandID); */ NS_IMETHODIMP nsHTMLDocument::QueryCommandSupported(const nsAString & commandID, bool *_retval) @@ -3529,7 +3524,6 @@ nsHTMLDocument::QueryCommandSupported(const nsAString& commandID) return ConvertToMidasInternalCommand(commandID, cmdToDispatch); } -/* DOMString queryCommandValue(in DOMString commandID); */ NS_IMETHODIMP nsHTMLDocument::QueryCommandValue(const nsAString & commandID, nsAString &_retval) diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index c88dac168f..4e4dec45c9 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -3501,7 +3501,6 @@ NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) NS_IMPL_ADDREF_INHERITED(TabChildGlobal, DOMEventTargetHelper) NS_IMPL_RELEASE_INHERITED(TabChildGlobal, DOMEventTargetHelper) -/* [notxpcom] boolean markForCC (); */ // This method isn't automatically forwarded safely because it's notxpcom, so // the IDL binding doesn't know what value to return. NS_IMETHODIMP_(bool) diff --git a/dom/svg/SVGGradientElement.cpp b/dom/svg/SVGGradientElement.cpp index f664213d2f..e841e11285 100644 --- a/dom/svg/SVGGradientElement.cpp +++ b/dom/svg/SVGGradientElement.cpp @@ -77,7 +77,6 @@ SVGGradientElement::GradientUnits() return mEnumAttributes[GRADIENTUNITS].ToDOMAnimatedEnum(this); } -/* readonly attribute SVGAnimatedTransformList gradientTransform; */ already_AddRefed SVGGradientElement::GradientTransform() { diff --git a/dom/svg/SVGSVGElement.cpp b/dom/svg/SVGSVGElement.cpp index 97295713f1..3c538565b5 100644 --- a/dom/svg/SVGSVGElement.cpp +++ b/dom/svg/SVGSVGElement.cpp @@ -291,14 +291,12 @@ SVGSVGElement::SuspendRedraw(uint32_t max_wait_milliseconds) return 1; } -/* void unsuspendRedraw (in unsigned long suspend_handle_id); */ void SVGSVGElement::UnsuspendRedraw(uint32_t suspend_handle_id) { // no-op } -/* void unsuspendRedrawAll (); */ void SVGSVGElement::UnsuspendRedrawAll() { diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index e31a963f35..dc0433e708 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -101,7 +101,6 @@ nsSVGElement::WrapNode(JSContext *aCx, JS::Handle aGivenProto) //---------------------------------------------------------------------- -/* readonly attribute SVGAnimatedString className; */ NS_IMETHODIMP nsSVGElement::GetSVGClassName(nsISupports** aClassName) { @@ -109,7 +108,6 @@ nsSVGElement::GetSVGClassName(nsISupports** aClassName) return NS_OK; } -/* readonly attribute nsIDOMCSSStyleDeclaration style; */ NS_IMETHODIMP nsSVGElement::GetStyle(nsIDOMCSSStyleDeclaration** aStyle) { @@ -1084,7 +1082,6 @@ nsSVGElement::sMaskMap[] = { //---------------------------------------------------------------------- // nsIDOMSVGElement methods -/* readonly attribute nsIDOMSVGSVGElement ownerSVGElement; */ NS_IMETHODIMP nsSVGElement::GetOwnerSVGElement(nsIDOMSVGElement * *aOwnerSVGElement) { @@ -1098,7 +1095,6 @@ nsSVGElement::GetOwnerSVGElement() return GetCtx(); // this may return nullptr } -/* readonly attribute nsIDOMSVGElement viewportElement; */ NS_IMETHODIMP nsSVGElement::GetViewportElement(nsIDOMSVGElement * *aViewportElement) { diff --git a/dom/system/gonk/nsVolumeMountLock.cpp b/dom/system/gonk/nsVolumeMountLock.cpp index 0bb4fbd111..75a323985d 100644 --- a/dom/system/gonk/nsVolumeMountLock.cpp +++ b/dom/system/gonk/nsVolumeMountLock.cpp @@ -81,7 +81,6 @@ nsresult nsVolumeMountLock::Init() return Lock(vol); } -/* void unlock (); */ NS_IMETHODIMP nsVolumeMountLock::Unlock() { LOG("nsVolumeMountLock released for '%s'", diff --git a/dom/system/gonk/nsVolumeStat.cpp b/dom/system/gonk/nsVolumeStat.cpp index 87cbc94e21..11976237f7 100644 --- a/dom/system/gonk/nsVolumeStat.cpp +++ b/dom/system/gonk/nsVolumeStat.cpp @@ -17,14 +17,12 @@ nsVolumeStat::nsVolumeStat(const nsAString& aPath) } } -/* readonly attribute long long totalBytes; */ NS_IMETHODIMP nsVolumeStat::GetTotalBytes(int64_t* aTotalBytes) { *aTotalBytes = mStat.f_blocks * mStat.f_bsize; return NS_OK; } -/* readonly attribute long long freeBytes; */ NS_IMETHODIMP nsVolumeStat::GetFreeBytes(int64_t* aFreeBytes) { *aFreeBytes = mStat.f_bfree * mStat.f_bsize; diff --git a/dom/xul/nsXULControllers.cpp b/dom/xul/nsXULControllers.cpp index d7b5bd24b6..57869faf29 100644 --- a/dom/xul/nsXULControllers.cpp +++ b/dom/xul/nsXULControllers.cpp @@ -201,7 +201,6 @@ nsXULControllers::RemoveController(nsIController *controller) return NS_ERROR_FAILURE; // right thing to return if no controller found? } -/* unsigned long getControllerId (in nsIController controller); */ NS_IMETHODIMP nsXULControllers::GetControllerId(nsIController *controller, uint32_t *_retval) { @@ -225,7 +224,6 @@ nsXULControllers::GetControllerId(nsIController *controller, uint32_t *_retval) return NS_ERROR_FAILURE; // none found } -/* nsIController getControllerById (in unsigned long controllerID); */ NS_IMETHODIMP nsXULControllers::GetControllerById(uint32_t controllerID, nsIController **_retval) { diff --git a/dom/xul/templates/nsXULTreeBuilder.cpp b/dom/xul/templates/nsXULTreeBuilder.cpp index f94fbd9d1c..440390db68 100644 --- a/dom/xul/templates/nsXULTreeBuilder.cpp +++ b/dom/xul/templates/nsXULTreeBuilder.cpp @@ -1840,7 +1840,6 @@ nsXULTreeBuilder::SortSubtree(nsTreeRows::Subtree* aSubtree) } -/* boolean canDrop (in long index, in long orientation); */ NS_IMETHODIMP nsXULTreeBuilder::CanDrop(int32_t index, int32_t orientation, nsIDOMDataTransfer* dataTransfer, bool *_retval) diff --git a/editor/composer/nsEditorSpellCheck.cpp b/editor/composer/nsEditorSpellCheck.cpp index 55f11d26d2..e3a287a8f4 100644 --- a/editor/composer/nsEditorSpellCheck.cpp +++ b/editor/composer/nsEditorSpellCheck.cpp @@ -652,7 +652,6 @@ nsEditorSpellCheck::UninitSpellChecker() } -/* void setFilter (in nsITextServicesFilter filter); */ NS_IMETHODIMP nsEditorSpellCheck::SetFilter(nsITextServicesFilter *filter) { diff --git a/editor/libeditor/nsEditor.cpp b/editor/libeditor/nsEditor.cpp index 5f4ffac16d..af01c4326a 100644 --- a/editor/libeditor/nsEditor.cpp +++ b/editor/libeditor/nsEditor.cpp @@ -607,7 +607,6 @@ nsEditor::GetWidget() return widget.forget(); } -/* attribute string contentsMIMEType; */ NS_IMETHODIMP nsEditor::GetContentsMIMEType(char * *aContentsMIMEType) { diff --git a/editor/txmgr/nsTransactionList.cpp b/editor/txmgr/nsTransactionList.cpp index 57c0a5b2a4..16c4d37473 100644 --- a/editor/txmgr/nsTransactionList.cpp +++ b/editor/txmgr/nsTransactionList.cpp @@ -39,7 +39,6 @@ nsTransactionList::~nsTransactionList() mTxnItem = 0; } -/* readonly attribute long numItems; */ NS_IMETHODIMP nsTransactionList::GetNumItems(int32_t *aNumItems) { NS_ENSURE_TRUE(aNumItems, NS_ERROR_NULL_POINTER); @@ -60,7 +59,6 @@ NS_IMETHODIMP nsTransactionList::GetNumItems(int32_t *aNumItems) return result; } -/* boolean itemIsBatch (in long aIndex); */ NS_IMETHODIMP nsTransactionList::ItemIsBatch(int32_t aIndex, bool *aIsBatch) { NS_ENSURE_TRUE(aIsBatch, NS_ERROR_NULL_POINTER); @@ -123,7 +121,6 @@ NS_IMETHODIMP nsTransactionList::GetData(int32_t aIndex, return NS_OK; } -/* nsITransaction getItem (in long aIndex); */ NS_IMETHODIMP nsTransactionList::GetItem(int32_t aIndex, nsITransaction **aItem) { NS_ENSURE_TRUE(aItem, NS_ERROR_NULL_POINTER); @@ -152,7 +149,6 @@ NS_IMETHODIMP nsTransactionList::GetItem(int32_t aIndex, nsITransaction **aItem) return NS_OK; } -/* long getNumChildrenForItem (in long aIndex); */ NS_IMETHODIMP nsTransactionList::GetNumChildrenForItem(int32_t aIndex, int32_t *aNumChildren) { NS_ENSURE_TRUE(aNumChildren, NS_ERROR_NULL_POINTER); @@ -179,7 +175,6 @@ NS_IMETHODIMP nsTransactionList::GetNumChildrenForItem(int32_t aIndex, int32_t * return item->GetNumberOfChildren(aNumChildren); } -/* nsITransactionList getChildListForItem (in long aIndex); */ NS_IMETHODIMP nsTransactionList::GetChildListForItem(int32_t aIndex, nsITransactionList **aTxnList) { NS_ENSURE_TRUE(aTxnList, NS_ERROR_NULL_POINTER); diff --git a/embedding/components/printingui/mac/nsPrintProgress.cpp b/embedding/components/printingui/mac/nsPrintProgress.cpp index 29c52daf68..e5d6325aa3 100644 --- a/embedding/components/printingui/mac/nsPrintProgress.cpp +++ b/embedding/components/printingui/mac/nsPrintProgress.cpp @@ -35,7 +35,6 @@ nsPrintProgress::~nsPrintProgress() (void)ReleaseListeners(); } -/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent, const char *dialogURL, nsISupports *parameters, @@ -49,7 +48,6 @@ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent, return NS_ERROR_NOT_IMPLEMENTED; } -/* void closeProgressDialog (in boolean forceClose); */ NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose) { MOZ_ASSERT_UNREACHABLE("The nsPrintingPromptService::ShowProgress " @@ -59,7 +57,6 @@ NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose) return NS_ERROR_NOT_IMPLEMENTED; } -/* nsIPrompt GetPrompter (); */ NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval) { NS_ENSURE_ARG_POINTER(_retval); @@ -71,7 +68,6 @@ NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval) return NS_ERROR_FAILURE; } -/* attribute boolean processCanceledByUser; */ NS_IMETHODIMP nsPrintProgress::GetProcessCanceledByUser(bool *aProcessCanceledByUser) { NS_ENSURE_ARG_POINTER(aProcessCanceledByUser); @@ -85,7 +81,6 @@ NS_IMETHODIMP nsPrintProgress::SetProcessCanceledByUser(bool aProcessCanceledByU return NS_OK; } -/* void RegisterListener (in nsIWebProgressListener listener); */ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listener) { if (!listener) //Nothing to do with a null listener! @@ -105,7 +100,6 @@ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listene return NS_OK; } -/* void UnregisterListener (in nsIWebProgressListener listener); */ NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listener) { if (listener) @@ -114,7 +108,6 @@ NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listen return NS_OK; } -/* void doneIniting (); */ NS_IMETHODIMP nsPrintProgress::DoneIniting() { if (m_observer) { @@ -123,7 +116,6 @@ NS_IMETHODIMP nsPrintProgress::DoneIniting() return NS_OK; } -/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */ NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus) { m_pendingStateFlags = aStateFlags; @@ -140,7 +132,6 @@ NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRe return NS_OK; } -/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress) { uint32_t count = m_listenerList.Count(); @@ -154,13 +145,11 @@ NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, ns return NS_OK; } -/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */ NS_IMETHODIMP nsPrintProgress::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags) { return NS_OK; } -/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage) { if (aMessage && *aMessage) @@ -177,7 +166,6 @@ NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIR return NS_OK; } -/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */ NS_IMETHODIMP nsPrintProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state) { return NS_OK; @@ -194,31 +182,26 @@ NS_IMETHODIMP nsPrintProgress::ShowStatusString(const char16_t *status) return OnStatusChange(nullptr, nullptr, NS_OK, status); } -/* void startMeteors (); */ NS_IMETHODIMP nsPrintProgress::StartMeteors() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void stopMeteors (); */ NS_IMETHODIMP nsPrintProgress::StopMeteors() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void showProgress (in long percent); */ NS_IMETHODIMP nsPrintProgress::ShowProgress(int32_t percent) { return NS_ERROR_NOT_IMPLEMENTED; } -/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */ NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void closeWindow (); */ NS_IMETHODIMP nsPrintProgress::CloseWindow() { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/embedding/components/printingui/mac/nsPrintProgressParams.cpp b/embedding/components/printingui/mac/nsPrintProgressParams.cpp index a2ffb1184b..eba86b2987 100644 --- a/embedding/components/printingui/mac/nsPrintProgressParams.cpp +++ b/embedding/components/printingui/mac/nsPrintProgressParams.cpp @@ -17,7 +17,6 @@ nsPrintProgressParams::~nsPrintProgressParams() { } -/* attribute wstring docTitle; */ NS_IMETHODIMP nsPrintProgressParams::GetDocTitle(char16_t * *aDocTitle) { NS_ENSURE_ARG(aDocTitle); @@ -32,7 +31,6 @@ NS_IMETHODIMP nsPrintProgressParams::SetDocTitle(const char16_t * aDocTitle) return NS_OK; } -/* attribute wstring docURL; */ NS_IMETHODIMP nsPrintProgressParams::GetDocURL(char16_t * *aDocURL) { NS_ENSURE_ARG(aDocURL); diff --git a/embedding/components/printingui/unixshared/nsPrintProgress.cpp b/embedding/components/printingui/unixshared/nsPrintProgress.cpp index 6f6665bee0..ddc5b07512 100644 --- a/embedding/components/printingui/unixshared/nsPrintProgress.cpp +++ b/embedding/components/printingui/unixshared/nsPrintProgress.cpp @@ -42,7 +42,6 @@ nsPrintProgress::~nsPrintProgress() (void)ReleaseListeners(); } -/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent, const char *dialogURL, nsISupports *parameters, @@ -108,7 +107,6 @@ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent, return rv; } -/* void closeProgressDialog (in boolean forceClose); */ NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose) { m_closeProgress = true; @@ -117,7 +115,6 @@ NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose) (nsresult)forceClose); } -/* nsIPrompt GetPrompter (); */ NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval) { NS_ENSURE_ARG_POINTER(_retval); @@ -129,7 +126,6 @@ NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval) return NS_ERROR_FAILURE; } -/* attribute boolean processCanceledByUser; */ NS_IMETHODIMP nsPrintProgress::GetProcessCanceledByUser(bool *aProcessCanceledByUser) { NS_ENSURE_ARG_POINTER(aProcessCanceledByUser); @@ -145,7 +141,6 @@ NS_IMETHODIMP nsPrintProgress::SetProcessCanceledByUser(bool aProcessCanceledByU return NS_OK; } -/* void RegisterListener (in nsIWebProgressListener listener); */ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listener) { if (!listener) //Nothing to do with a null listener! @@ -164,7 +159,6 @@ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listene return NS_OK; } -/* void UnregisterListener (in nsIWebProgressListener listener); */ NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listener) { if (listener) @@ -173,7 +167,6 @@ NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listen return NS_OK; } -/* void doneIniting (); */ NS_IMETHODIMP nsPrintProgress::DoneIniting() { if (m_observer) { @@ -182,7 +175,6 @@ NS_IMETHODIMP nsPrintProgress::DoneIniting() return NS_OK; } -/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */ NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus) { m_pendingStateFlags = aStateFlags; @@ -199,7 +191,6 @@ NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRe return NS_OK; } -/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress) { uint32_t count = m_listenerList.Count(); @@ -213,13 +204,11 @@ NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, ns return NS_OK; } -/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */ NS_IMETHODIMP nsPrintProgress::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage) { if (aMessage && *aMessage) @@ -236,7 +225,6 @@ NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIR return NS_OK; } -/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */ NS_IMETHODIMP nsPrintProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state) { return NS_OK; @@ -254,31 +242,26 @@ NS_IMETHODIMP nsPrintProgress::ShowStatusString(const char16_t *status) return OnStatusChange(nullptr, nullptr, NS_OK, status); } -/* void startMeteors (); */ NS_IMETHODIMP nsPrintProgress::StartMeteors() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void stopMeteors (); */ NS_IMETHODIMP nsPrintProgress::StopMeteors() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void showProgress (in long percent); */ NS_IMETHODIMP nsPrintProgress::ShowProgress(int32_t percent) { return NS_ERROR_NOT_IMPLEMENTED; } -/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */ NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void closeWindow (); */ NS_IMETHODIMP nsPrintProgress::CloseWindow() { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/embedding/components/printingui/unixshared/nsPrintProgressParams.cpp b/embedding/components/printingui/unixshared/nsPrintProgressParams.cpp index a2ffb1184b..eba86b2987 100644 --- a/embedding/components/printingui/unixshared/nsPrintProgressParams.cpp +++ b/embedding/components/printingui/unixshared/nsPrintProgressParams.cpp @@ -17,7 +17,6 @@ nsPrintProgressParams::~nsPrintProgressParams() { } -/* attribute wstring docTitle; */ NS_IMETHODIMP nsPrintProgressParams::GetDocTitle(char16_t * *aDocTitle) { NS_ENSURE_ARG(aDocTitle); @@ -32,7 +31,6 @@ NS_IMETHODIMP nsPrintProgressParams::SetDocTitle(const char16_t * aDocTitle) return NS_OK; } -/* attribute wstring docURL; */ NS_IMETHODIMP nsPrintProgressParams::GetDocURL(char16_t * *aDocURL) { NS_ENSURE_ARG(aDocURL); diff --git a/embedding/components/printingui/unixshared/nsPrintingPromptService.cpp b/embedding/components/printingui/unixshared/nsPrintingPromptService.cpp index 9b94e3fdb2..1cdce8c50b 100644 --- a/embedding/components/printingui/unixshared/nsPrintingPromptService.cpp +++ b/embedding/components/printingui/unixshared/nsPrintingPromptService.cpp @@ -71,7 +71,6 @@ nsPrintingPromptService::Init() return rv; } -/* void showPrintDialog (in nsIDOMWindow parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings); */ NS_IMETHODIMP nsPrintingPromptService::ShowPrintDialog(nsIDOMWindow *parent, nsIWebBrowserPrint *webBrowserPrint, nsIPrintSettings *printSettings) { @@ -94,7 +93,6 @@ nsPrintingPromptService::ShowPrintDialog(nsIDOMWindow *parent, nsIWebBrowserPrin return DoDialog(parent, block, webBrowserPrint, printSettings, kPrintDialogURL); } -/* void showProgress (in nsIDOMWindow parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen); */ NS_IMETHODIMP nsPrintingPromptService::ShowProgress(nsIDOMWindow* parent, nsIWebBrowserPrint* webBrowserPrint, // ok to be null @@ -135,7 +133,6 @@ nsPrintingPromptService::ShowProgress(nsIDOMWindow* parent, return NS_OK; } -/* void showPageSetup (in nsIDOMWindow parent, in nsIPrintSettings printSettings); */ NS_IMETHODIMP nsPrintingPromptService::ShowPageSetup(nsIDOMWindow *parent, nsIPrintSettings *printSettings, nsIObserver *aObs) { @@ -156,7 +153,6 @@ nsPrintingPromptService::ShowPageSetup(nsIDOMWindow *parent, nsIPrintSettings *p return DoDialog(parent, block, nullptr, printSettings, kPageSetupDialogURL); } -/* void showPrinterProperties (in nsIDOMWindow parent, in wstring printerName, in nsIPrintSettings printSettings); */ NS_IMETHODIMP nsPrintingPromptService::ShowPrinterProperties(nsIDOMWindow *parent, const char16_t *printerName, nsIPrintSettings *printSettings) { @@ -251,7 +247,6 @@ nsPrintingPromptService::DoDialog(nsIDOMWindow *aParent, // nsIWebProgressListener ////////////////////////////////////////////////////////////////////// -/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */ NS_IMETHODIMP nsPrintingPromptService::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus) { @@ -266,7 +261,6 @@ nsPrintingPromptService::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest return NS_OK; } -/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ NS_IMETHODIMP nsPrintingPromptService::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress) { @@ -276,7 +270,6 @@ nsPrintingPromptService::OnProgressChange(nsIWebProgress *aWebProgress, nsIReque return NS_OK; } -/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */ NS_IMETHODIMP nsPrintingPromptService::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags) { @@ -286,7 +279,6 @@ nsPrintingPromptService::OnLocationChange(nsIWebProgress *aWebProgress, nsIReque return NS_OK; } -/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ NS_IMETHODIMP nsPrintingPromptService::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage) { @@ -296,7 +288,6 @@ nsPrintingPromptService::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest return NS_OK; } -/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */ NS_IMETHODIMP nsPrintingPromptService::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state) { diff --git a/embedding/components/printingui/win/nsPrintProgress.cpp b/embedding/components/printingui/win/nsPrintProgress.cpp index 33ef58bdd2..2da96bcdea 100644 --- a/embedding/components/printingui/win/nsPrintProgress.cpp +++ b/embedding/components/printingui/win/nsPrintProgress.cpp @@ -69,7 +69,6 @@ nsPrintProgress::~nsPrintProgress() (void)ReleaseListeners(); } -/* void openProgressDialog (in nsIDOMWindow parent, in string dialogURL, in nsISupports parameters); */ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent, const char *dialogURL, nsISupports *parameters, @@ -135,7 +134,6 @@ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindow *parent, return rv; } -/* void closeProgressDialog (in boolean forceClose); */ NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose) { m_closeProgress = true; @@ -144,7 +142,6 @@ NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose) static_cast(forceClose)); } -/* nsIPrompt GetPrompter (); */ NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval) { NS_ENSURE_ARG_POINTER(_retval); @@ -156,7 +153,6 @@ NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval) return NS_ERROR_FAILURE; } -/* attribute boolean processCanceledByUser; */ NS_IMETHODIMP nsPrintProgress::GetProcessCanceledByUser(bool *aProcessCanceledByUser) { NS_ENSURE_ARG_POINTER(aProcessCanceledByUser); @@ -170,7 +166,6 @@ NS_IMETHODIMP nsPrintProgress::SetProcessCanceledByUser(bool aProcessCanceledByU return NS_OK; } -/* void RegisterListener (in nsIWebProgressListener listener); */ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listener) { if (!listener) //Nothing to do with a null listener! @@ -190,7 +185,6 @@ NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listene return NS_OK; } -/* void UnregisterListener (in nsIWebProgressListener listener); */ NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listener) { if (listener) @@ -199,7 +193,6 @@ NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listen return NS_OK; } -/* void doneIniting (); */ NS_IMETHODIMP nsPrintProgress::DoneIniting() { if (m_observer) { @@ -208,7 +201,6 @@ NS_IMETHODIMP nsPrintProgress::DoneIniting() return NS_OK; } -/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long aStateFlags, in nsresult aStatus); */ NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus) { m_pendingStateFlags = aStateFlags; @@ -225,7 +217,6 @@ NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRe return NS_OK; } -/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress) { uint32_t count = m_listenerList.Count(); @@ -239,13 +230,11 @@ NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, ns return NS_OK; } -/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */ NS_IMETHODIMP nsPrintProgress::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags) { return NS_OK; } -/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage) { if (aMessage && *aMessage) @@ -262,7 +251,6 @@ NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIR return NS_OK; } -/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */ NS_IMETHODIMP nsPrintProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state) { return NS_OK; @@ -279,31 +267,26 @@ NS_IMETHODIMP nsPrintProgress::ShowStatusString(const char16_t *status) return OnStatusChange(nullptr, nullptr, NS_OK, status); } -/* void startMeteors (); */ NS_IMETHODIMP nsPrintProgress::StartMeteors() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void stopMeteors (); */ NS_IMETHODIMP nsPrintProgress::StopMeteors() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void showProgress (in long percent); */ NS_IMETHODIMP nsPrintProgress::ShowProgress(int32_t percent) { return NS_ERROR_NOT_IMPLEMENTED; } -/* [noscript] void setDocShell (in nsIDocShell shell, in nsIDOMWindow window); */ NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, nsIDOMWindow *window) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void closeWindow (); */ NS_IMETHODIMP nsPrintProgress::CloseWindow() { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/embedding/components/printingui/win/nsPrintProgressParams.cpp b/embedding/components/printingui/win/nsPrintProgressParams.cpp index a2ffb1184b..eba86b2987 100644 --- a/embedding/components/printingui/win/nsPrintProgressParams.cpp +++ b/embedding/components/printingui/win/nsPrintProgressParams.cpp @@ -17,7 +17,6 @@ nsPrintProgressParams::~nsPrintProgressParams() { } -/* attribute wstring docTitle; */ NS_IMETHODIMP nsPrintProgressParams::GetDocTitle(char16_t * *aDocTitle) { NS_ENSURE_ARG(aDocTitle); @@ -32,7 +31,6 @@ NS_IMETHODIMP nsPrintProgressParams::SetDocTitle(const char16_t * aDocTitle) return NS_OK; } -/* attribute wstring docURL; */ NS_IMETHODIMP nsPrintProgressParams::GetDocURL(char16_t * *aDocURL) { NS_ENSURE_ARG(aDocURL); diff --git a/embedding/components/printingui/win/nsPrintingPromptService.cpp b/embedding/components/printingui/win/nsPrintingPromptService.cpp index e769a1bf2f..088b4540ba 100644 --- a/embedding/components/printingui/win/nsPrintingPromptService.cpp +++ b/embedding/components/printingui/win/nsPrintingPromptService.cpp @@ -157,7 +157,6 @@ nsPrintingPromptService::ShowPrintDialog(nsIDOMWindow *parent, nsIWebBrowserPrin } -/* void showProgress (in nsIDOMWindow parent, in nsIWebBrowserPrint webBrowserPrint, in nsIPrintSettings printSettings, in nsIObserver openDialogObserver, in boolean isForPrinting, out nsIWebProgressListener webProgressListener, out nsIPrintProgressParams printProgressParams, out boolean notifyOnOpen); */ NS_IMETHODIMP nsPrintingPromptService::ShowProgress(nsIDOMWindow* parent, nsIWebBrowserPrint* webBrowserPrint, // ok to be null @@ -203,7 +202,6 @@ nsPrintingPromptService::ShowProgress(nsIDOMWindow* parent, return NS_OK; } -/* void showPageSetup (in nsIDOMWindow parent, in nsIPrintSettings printSettings); */ NS_IMETHODIMP nsPrintingPromptService::ShowPageSetup(nsIDOMWindow *parent, nsIPrintSettings *printSettings, nsIObserver *aObs) { @@ -229,7 +227,6 @@ nsPrintingPromptService::ShowPageSetup(nsIDOMWindow *parent, nsIPrintSettings *p return rv; } -/* void showPrinterProperties (in nsIDOMWindow parent, in wstring printerName, in nsIPrintSettings printSettings); */ NS_IMETHODIMP nsPrintingPromptService::ShowPrinterProperties(nsIDOMWindow *parent, const char16_t *printerName, nsIPrintSettings *printSettings) { @@ -293,7 +290,6 @@ nsPrintingPromptService::DoDialog(nsIDOMWindow *aParent, // nsIWebProgressListener ////////////////////////////////////////////////////////////////////// -/* void onStateChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aStateFlags, in nsresult aStatus); */ NS_IMETHODIMP nsPrintingPromptService::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus) { @@ -310,7 +306,6 @@ nsPrintingPromptService::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest return NS_OK; } -/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */ NS_IMETHODIMP nsPrintingPromptService::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress) { @@ -321,7 +316,6 @@ nsPrintingPromptService::OnProgressChange(nsIWebProgress *aWebProgress, nsIReque return NS_ERROR_FAILURE; } -/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */ NS_IMETHODIMP nsPrintingPromptService::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags) { @@ -332,7 +326,6 @@ nsPrintingPromptService::OnLocationChange(nsIWebProgress *aWebProgress, nsIReque return NS_ERROR_FAILURE; } -/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */ NS_IMETHODIMP nsPrintingPromptService::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage) { @@ -343,7 +336,6 @@ nsPrintingPromptService::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest return NS_ERROR_FAILURE; } -/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */ NS_IMETHODIMP nsPrintingPromptService::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state) { diff --git a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp index 2d1e0c3955..19339d608d 100644 --- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp @@ -270,7 +270,6 @@ NS_IMETHODIMP nsWebBrowserPersist::GetInterface(const nsIID & aIID, void **aIFac // nsWebBrowserPersist::nsIWebBrowserPersist //***************************************************************************** -/* attribute unsigned long persistFlags; */ NS_IMETHODIMP nsWebBrowserPersist::GetPersistFlags(uint32_t *aPersistFlags) { NS_ENSURE_ARG_POINTER(aPersistFlags); @@ -285,7 +284,6 @@ NS_IMETHODIMP nsWebBrowserPersist::SetPersistFlags(uint32_t aPersistFlags) return NS_OK; } -/* readonly attribute unsigned long currentState; */ NS_IMETHODIMP nsWebBrowserPersist::GetCurrentState(uint32_t *aCurrentState) { NS_ENSURE_ARG_POINTER(aCurrentState); @@ -304,7 +302,6 @@ NS_IMETHODIMP nsWebBrowserPersist::GetCurrentState(uint32_t *aCurrentState) return NS_OK; } -/* readonly attribute unsigned long result; */ NS_IMETHODIMP nsWebBrowserPersist::GetResult(nsresult *aResult) { NS_ENSURE_ARG_POINTER(aResult); @@ -312,7 +309,6 @@ NS_IMETHODIMP nsWebBrowserPersist::GetResult(nsresult *aResult) return NS_OK; } -/* attribute nsIWebBrowserPersistProgress progressListener; */ NS_IMETHODIMP nsWebBrowserPersist::GetProgressListener( nsIWebProgressListener * *aProgressListener) { @@ -366,7 +362,6 @@ NS_IMETHODIMP nsWebBrowserPersist::SavePrivacyAwareURI( return NS_FAILED(rv) ? rv : NS_OK; } -/* void saveChannel (in nsIChannel aChannel, in nsISupports aFile); */ NS_IMETHODIMP nsWebBrowserPersist::SaveChannel( nsIChannel *aChannel, nsISupports *aFile) { @@ -480,7 +475,6 @@ NS_IMETHODIMP nsWebBrowserPersist::SaveDocument( return rv; } -/* void cancel(nsresult aReason); */ NS_IMETHODIMP nsWebBrowserPersist::Cancel(nsresult aReason) { mCancel = true; @@ -489,7 +483,6 @@ NS_IMETHODIMP nsWebBrowserPersist::Cancel(nsresult aReason) } -/* void cancelSave(); */ NS_IMETHODIMP nsWebBrowserPersist::CancelSave() { return Cancel(NS_BINDING_ABORTED); diff --git a/extensions/spellcheck/hunspell/glue/mozHunspell.cpp b/extensions/spellcheck/hunspell/glue/mozHunspell.cpp index a5c4035b92..ecd7a4bb83 100644 --- a/extensions/spellcheck/hunspell/glue/mozHunspell.cpp +++ b/extensions/spellcheck/hunspell/glue/mozHunspell.cpp @@ -136,7 +136,6 @@ mozHunspell::~mozHunspell() delete mHunspell; } -/* attribute wstring dictionary; */ NS_IMETHODIMP mozHunspell::GetDictionary(char16_t **aDictionary) { NS_ENSURE_ARG_POINTER(aDictionary); @@ -237,7 +236,6 @@ NS_IMETHODIMP mozHunspell::SetDictionary(const char16_t *aDictionary) return NS_OK; } -/* readonly attribute wstring language; */ NS_IMETHODIMP mozHunspell::GetLanguage(char16_t **aLanguage) { NS_ENSURE_ARG_POINTER(aLanguage); @@ -249,7 +247,6 @@ NS_IMETHODIMP mozHunspell::GetLanguage(char16_t **aLanguage) return *aLanguage ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute boolean providesPersonalDictionary; */ NS_IMETHODIMP mozHunspell::GetProvidesPersonalDictionary(bool *aProvidesPersonalDictionary) { NS_ENSURE_ARG_POINTER(aProvidesPersonalDictionary); @@ -258,7 +255,6 @@ NS_IMETHODIMP mozHunspell::GetProvidesPersonalDictionary(bool *aProvidesPersonal return NS_OK; } -/* readonly attribute boolean providesWordUtils; */ NS_IMETHODIMP mozHunspell::GetProvidesWordUtils(bool *aProvidesWordUtils) { NS_ENSURE_ARG_POINTER(aProvidesWordUtils); @@ -267,19 +263,16 @@ NS_IMETHODIMP mozHunspell::GetProvidesWordUtils(bool *aProvidesWordUtils) return NS_OK; } -/* readonly attribute wstring name; */ NS_IMETHODIMP mozHunspell::GetName(char16_t * *aName) { return NS_ERROR_NOT_IMPLEMENTED; } -/* readonly attribute wstring copyright; */ NS_IMETHODIMP mozHunspell::GetCopyright(char16_t * *aCopyright) { return NS_ERROR_NOT_IMPLEMENTED; } -/* attribute mozIPersonalDictionary personalDictionary; */ NS_IMETHODIMP mozHunspell::GetPersonalDictionary(mozIPersonalDictionary * *aPersonalDictionary) { *aPersonalDictionary = mPersonalDictionary; @@ -314,7 +307,6 @@ AppendNewString(const nsAString& aString, nsIFile* aFile, void* aClosure) return PL_DHASH_NEXT; } -/* void GetDictionaryList ([array, size_is (count)] out wstring dictionaries, out uint32_t count); */ NS_IMETHODIMP mozHunspell::GetDictionaryList(char16_t ***aDictionaries, uint32_t *aCount) { @@ -530,7 +522,6 @@ mozHunspell::CollectReports(nsIHandleReportCallback* aHandleReport, "Memory used by the spell-checking engine."); } -/* boolean Check (in wstring word); */ NS_IMETHODIMP mozHunspell::Check(const char16_t *aWord, bool *aResult) { NS_ENSURE_ARG_POINTER(aWord); @@ -549,7 +540,6 @@ NS_IMETHODIMP mozHunspell::Check(const char16_t *aWord, bool *aResult) return rv; } -/* void Suggest (in wstring word, [array, size_is (count)] out wstring suggestions, out uint32_t count); */ NS_IMETHODIMP mozHunspell::Suggest(const char16_t *aWord, char16_t ***aSuggestions, uint32_t *aSuggestionCount) { NS_ENSURE_ARG_POINTER(aSuggestions); @@ -612,7 +602,6 @@ mozHunspell::Observe(nsISupports* aSubj, const char *aTopic, return NS_OK; } -/* void addDirectory(in nsIFile dir); */ NS_IMETHODIMP mozHunspell::AddDirectory(nsIFile *aDir) { mDynamicDirectories.AppendObject(aDir); @@ -620,7 +609,6 @@ NS_IMETHODIMP mozHunspell::AddDirectory(nsIFile *aDir) return NS_OK; } -/* void removeDirectory(in nsIFile dir); */ NS_IMETHODIMP mozHunspell::RemoveDirectory(nsIFile *aDir) { mDynamicDirectories.RemoveObject(aDir); diff --git a/extensions/spellcheck/src/mozEnglishWordUtils.cpp b/extensions/spellcheck/src/mozEnglishWordUtils.cpp index f08b3f8f83..6d0856f3e3 100644 --- a/extensions/spellcheck/src/mozEnglishWordUtils.cpp +++ b/extensions/spellcheck/src/mozEnglishWordUtils.cpp @@ -36,7 +36,6 @@ mozEnglishWordUtils::~mozEnglishWordUtils() { } -/* attribute wstring language; */ NS_IMETHODIMP mozEnglishWordUtils::GetLanguage(char16_t * *aLanguage) { nsresult rv = NS_OK; @@ -47,7 +46,6 @@ NS_IMETHODIMP mozEnglishWordUtils::GetLanguage(char16_t * *aLanguage) return rv; } -/* void GetRootForm (in wstring aWord, in uint32_t type, [array, size_is (count)] out wstring words, out uint32_t count); */ // return the possible root forms of aWord. NS_IMETHODIMP mozEnglishWordUtils::GetRootForm(const char16_t *aWord, uint32_t type, char16_t ***words, uint32_t *count) { @@ -138,7 +136,6 @@ bool mozEnglishWordUtils::ucIsAlpha(char16_t aChar) return nsIUGenCategory::kLetter == mozilla::unicode::GetGenCategory(aChar); } -/* void FindNextWord (in wstring word, in uint32_t length, in uint32_t offset, out uint32_t begin, out uint32_t end); */ NS_IMETHODIMP mozEnglishWordUtils::FindNextWord(const char16_t *word, uint32_t length, uint32_t offset, int32_t *begin, int32_t *end) { const char16_t *p = word + offset; diff --git a/extensions/spellcheck/src/mozGenericWordUtils.cpp b/extensions/spellcheck/src/mozGenericWordUtils.cpp index e83d0906c7..75346d6a79 100644 --- a/extensions/spellcheck/src/mozGenericWordUtils.cpp +++ b/extensions/spellcheck/src/mozGenericWordUtils.cpp @@ -18,25 +18,21 @@ mozGenericWordUtils::~mozGenericWordUtils() /* destructor code */ } -/* readonly attribute wstring language; */ NS_IMETHODIMP mozGenericWordUtils::GetLanguage(char16_t * *aLanguage) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void GetRootForm (in wstring word, in uint32_t type, [array, size_is (count)] out wstring words, out uint32_t count); */ NS_IMETHODIMP mozGenericWordUtils::GetRootForm(const char16_t *word, uint32_t type, char16_t ***words, uint32_t *count) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void FromRootForm (in wstring word, [array, size_is (icount)] in wstring iwords, in uint32_t icount, [array, size_is (ocount)] out wstring owords, out uint32_t ocount); */ NS_IMETHODIMP mozGenericWordUtils::FromRootForm(const char16_t *word, const char16_t **iwords, uint32_t icount, char16_t ***owords, uint32_t *ocount) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void FindNextWord (in wstring word, in uint32_t length, in uint32_t offset, out uint32_t begin, out uint32_t end); */ NS_IMETHODIMP mozGenericWordUtils::FindNextWord(const char16_t *word, uint32_t length, uint32_t offset, int32_t *begin, int32_t *end) { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/extensions/spellcheck/src/mozPersonalDictionary.cpp b/extensions/spellcheck/src/mozPersonalDictionary.cpp index 302d02d7bd..44f2fc405a 100644 --- a/extensions/spellcheck/src/mozPersonalDictionary.cpp +++ b/extensions/spellcheck/src/mozPersonalDictionary.cpp @@ -389,7 +389,6 @@ NS_IMETHODIMP mozPersonalDictionary::Save() return res; } -/* readonly attribute nsIStringEnumerator GetWordList() */ NS_IMETHODIMP mozPersonalDictionary::GetWordList(nsIStringEnumerator **aWords) { NS_ENSURE_ARG_POINTER(aWords); @@ -407,7 +406,6 @@ NS_IMETHODIMP mozPersonalDictionary::GetWordList(nsIStringEnumerator **aWords) return NS_NewAdoptingStringEnumerator(aWords, array); } -/* boolean Check (in wstring word, in wstring language); */ NS_IMETHODIMP mozPersonalDictionary::Check(const char16_t *aWord, const char16_t *aLanguage, bool *aResult) { NS_ENSURE_ARG_POINTER(aWord); @@ -419,7 +417,6 @@ NS_IMETHODIMP mozPersonalDictionary::Check(const char16_t *aWord, const char16_t return NS_OK; } -/* void AddWord (in wstring word); */ NS_IMETHODIMP mozPersonalDictionary::AddWord(const char16_t *aWord, const char16_t *aLang) { nsresult res; @@ -430,7 +427,6 @@ NS_IMETHODIMP mozPersonalDictionary::AddWord(const char16_t *aWord, const char16 return res; } -/* void RemoveWord (in wstring word); */ NS_IMETHODIMP mozPersonalDictionary::RemoveWord(const char16_t *aWord, const char16_t *aLang) { nsresult res; @@ -441,7 +437,6 @@ NS_IMETHODIMP mozPersonalDictionary::RemoveWord(const char16_t *aWord, const cha return res; } -/* void IgnoreWord (in wstring word); */ NS_IMETHODIMP mozPersonalDictionary::IgnoreWord(const char16_t *aWord) { // avoid adding duplicate words to the ignore list @@ -450,7 +445,6 @@ NS_IMETHODIMP mozPersonalDictionary::IgnoreWord(const char16_t *aWord) return NS_OK; } -/* void EndSession (); */ NS_IMETHODIMP mozPersonalDictionary::EndSession() { WaitForLoad(); @@ -460,25 +454,21 @@ NS_IMETHODIMP mozPersonalDictionary::EndSession() return NS_OK; } -/* void AddCorrection (in wstring word, in wstring correction); */ NS_IMETHODIMP mozPersonalDictionary::AddCorrection(const char16_t *word, const char16_t *correction, const char16_t *lang) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void RemoveCorrection (in wstring word, in wstring correction); */ NS_IMETHODIMP mozPersonalDictionary::RemoveCorrection(const char16_t *word, const char16_t *correction, const char16_t *lang) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void GetCorrection (in wstring word, [array, size_is (count)] out wstring words, out uint32_t count); */ NS_IMETHODIMP mozPersonalDictionary::GetCorrection(const char16_t *word, char16_t ***words, uint32_t *count) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void observe (in nsISupports aSubject, in string aTopic, in wstring aData); */ NS_IMETHODIMP mozPersonalDictionary::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) { if (!nsCRT::strcmp(aTopic, "profile-do-change")) { diff --git a/extensions/spellcheck/src/mozSpellI18NManager.cpp b/extensions/spellcheck/src/mozSpellI18NManager.cpp index 7e4b94bde9..41d3b628b8 100644 --- a/extensions/spellcheck/src/mozSpellI18NManager.cpp +++ b/extensions/spellcheck/src/mozSpellI18NManager.cpp @@ -20,7 +20,6 @@ mozSpellI18NManager::~mozSpellI18NManager() /* destructor code */ } -/* mozISpellI18NUtil GetUtil (in wstring language); */ NS_IMETHODIMP mozSpellI18NManager::GetUtil(const char16_t *aLanguage, mozISpellI18NUtil **_retval) { if( nullptr == _retval) { diff --git a/gfx/thebes/gfxPrefs.h b/gfx/thebes/gfxPrefs.h index 1995160366..814fd736d0 100644 --- a/gfx/thebes/gfxPrefs.h +++ b/gfx/thebes/gfxPrefs.h @@ -278,6 +278,7 @@ private: DECL_GFX_PREF(Live, "image.mozsamplesize.enabled", ImageMozSampleSizeEnabled, bool, false); DECL_GFX_PREF(Once, "image.multithreaded_decoding.limit", ImageMTDecodingLimit, int32_t, -1); DECL_GFX_PREF(Live, "image.single-color-optimization.enabled", ImageSingleColorOptimizationEnabled, bool, true); + DECL_GFX_PREF(Live, "image.webp.enabled", ImageWebPEnabled, bool, true); DECL_GFX_PREF(Once, "layers.acceleration.disabled", LayersAccelerationDisabled, bool, false); DECL_GFX_PREF(Live, "layers.acceleration.draw-fps", LayersDrawFPS, bool, false); diff --git a/image/DecodePool.cpp b/image/DecodePool.cpp index 3e708c7e1e..09ed7e965f 100644 --- a/image/DecodePool.cpp +++ b/image/DecodePool.cpp @@ -96,7 +96,6 @@ public: NS_IMETHOD Run() override { MOZ_ASSERT(NS_IsMainThread()); - mDecoder->Finish(); mDecoder->GetImage()->FinalizeDecoder(mDecoder); return NS_OK; } @@ -203,8 +202,8 @@ public: return; } - if (aDecoder->IsSizeDecode()) { - mSizeDecodeQueue.AppendElement(Move(decoder)); + if (aDecoder->IsMetadataDecode()) { + mMetadataDecodeQueue.AppendElement(Move(decoder)); } else { mFullDecodeQueue.AppendElement(Move(decoder)); } @@ -218,14 +217,9 @@ public: MonitorAutoLock lock(mMonitor); do { - // XXX(seth): The queue popping code below is NOT efficient, obviously, - // since we're removing an element from the front of the array. However, - // it's not worth implementing something better right now, because we are - // replacing this FIFO behavior with LIFO behavior very soon. - - // Prioritize size decodes over full decodes. - if (!mSizeDecodeQueue.IsEmpty()) { - return PopWorkFromQueue(mSizeDecodeQueue); + // Prioritize metadata decodes over full decodes. + if (!mMetadataDecodeQueue.IsEmpty()) { + return PopWorkFromQueue(mMetadataDecodeQueue); } if (!mFullDecodeQueue.IsEmpty()) { @@ -250,17 +244,17 @@ private: { Work work; work.mType = Work::Type::DECODE; - work.mDecoder = aQueue.ElementAt(0); - aQueue.RemoveElementAt(0); + work.mDecoder = aQueue.LastElement(); + aQueue.RemoveElementAt(aQueue.Length() - 1); return work; } nsThreadPoolNaming mThreadNaming; - // mMonitor guards mQueue and mShuttingDown. + // mMonitor guards the queues and mShuttingDown. Monitor mMonitor; - nsTArray> mSizeDecodeQueue; + nsTArray> mMetadataDecodeQueue; nsTArray> mFullDecodeQueue; bool mShuttingDown; }; @@ -497,7 +491,6 @@ DecodePool::NotifyDecodeComplete(Decoder* aDecoder) return; } - aDecoder->Finish(); aDecoder->GetImage()->FinalizeDecoder(aDecoder); } diff --git a/image/Decoder.cpp b/image/Decoder.cpp index 282bf0b94b..0be2575c60 100644 --- a/image/Decoder.cpp +++ b/image/Decoder.cpp @@ -10,8 +10,6 @@ #include "DecodePool.h" #include "GeckoProfiler.h" #include "imgIContainer.h" -#include "nsIConsoleService.h" -#include "nsIScriptError.h" #include "nsProxyRelease.h" #include "nsServiceManagerUtils.h" #include "nsComponentManagerUtils.h" @@ -24,27 +22,30 @@ namespace mozilla { namespace image { Decoder::Decoder(RasterImage* aImage) - : mImage(aImage) - , mProgress(NoProgress) - , mImageData(nullptr) + : mImageData(nullptr) + , mImageDataLength(0) , mColormap(nullptr) + , mColormapSize(0) + , mImage(aImage) + , mProgress(NoProgress) + , mFrameCount(0) + , mFailCode(NS_OK) , mChunkCount(0) , mFlags(0) , mBytesDecoded(0) + , mInitialized(false) + , mMetadataDecode(false) , mSendPartialInvalidations(false) + , mImageIsTransient(false) + , mImageIsLocked(false) + , mFirstFrameDecode(false) + , mInFrame(false) + , mIsAnimated(false) , mDataDone(false) , mDecodeDone(false) , mDataError(false) , mDecodeAborted(false) , mShouldReportError(false) - , mImageIsTransient(false) - , mImageIsLocked(false) - , mFrameCount(0) - , mFailCode(NS_OK) - , mInitialized(false) - , mSizeDecode(false) - , mInFrame(false) - , mIsAnimated(false) { } Decoder::~Decoder() @@ -55,7 +56,7 @@ Decoder::~Decoder() "Destroying Decoder without taking all its invalidations"); mInitialized = false; - if (!NS_IsMainThread()) { + if (mImage && !NS_IsMainThread()) { // Dispatch mImage to main thread to prevent it from being destructed by the // decode thread. nsCOMPtr mainThread = do_GetMainThread(); @@ -81,6 +82,11 @@ Decoder::Init() // No re-initializing MOZ_ASSERT(!mInitialized, "Can't re-initialize a decoder!"); + // It doesn't make sense to decode anything but the first frame if we can't + // store anything in the SurfaceCache, since only the last frame we decode + // will be retrievable. + MOZ_ASSERT(ShouldUseSurfaceCache() || IsFirstFrameDecode()); + // Implementation-specific initialization InitInternal(); @@ -169,7 +175,7 @@ Decoder::Write(const char* aBuffer, uint32_t aCount) return; } - if (IsSizeDecode() && HasSize()) { + if (IsMetadataDecode() && HasSize()) { // More data came in since we found the size. We have nothing to do here. return; } @@ -200,7 +206,7 @@ Decoder::CompleteDecode() // early because of low-memory conditions or losing a race with another // decoder, we need to send teardown notifications (and report an error to the // console later). - if (!IsSizeDecode() && !mDecodeDone && !WasAborted()) { + if (!IsMetadataDecode() && !mDecodeDone && !WasAborted()) { mShouldReportError = true; // If we only have a data error, we're usable if we have at least one @@ -218,52 +224,14 @@ Decoder::CompleteDecode() PostDecodeDone(); } else { // We're not usable. Record some final progress indicating the error. - if (!IsSizeDecode()) { + if (!IsMetadataDecode()) { mProgress |= FLAG_DECODE_COMPLETE; } mProgress |= FLAG_HAS_ERROR; } } -} -void -Decoder::Finish() -{ - MOZ_ASSERT(NS_IsMainThread()); - - MOZ_ASSERT(HasError() || !mInFrame, "Finishing while we're still in a frame"); - - // If we detected an error in CompleteDecode(), log it to the error console. - if (mShouldReportError && !WasAborted()) { - nsCOMPtr consoleService = - do_GetService(NS_CONSOLESERVICE_CONTRACTID); - nsCOMPtr errorObject = - do_CreateInstance(NS_SCRIPTERROR_CONTRACTID); - - if (consoleService && errorObject && !HasDecoderError()) { - nsAutoString msg(NS_LITERAL_STRING("Image corrupt or truncated: ") + - NS_ConvertUTF8toUTF16(mImage->GetURIString())); - - if (NS_SUCCEEDED(errorObject->InitWithWindowID( - msg, - NS_ConvertUTF8toUTF16(mImage->GetURIString()), - EmptyString(), 0, 0, nsIScriptError::errorFlag, - "Image", mImage->InnerWindowID() - ))) { - consoleService->LogMessage(errorObject); - } - } - } - - // Set image metadata before calling DecodingComplete, because - // DecodingComplete calls Optimize(). - mImageMetadata.SetOnImage(mImage); - - if (HasSize()) { - SetSizeOnImage(); - } - - if (mDecodeDone && !IsSizeDecode()) { + if (mDecodeDone && !IsMetadataDecode()) { MOZ_ASSERT(HasError() || mCurrentFrame, "Should have an error or a frame"); // If this image wasn't animated and isn't a transient image, mark its frame @@ -272,8 +240,6 @@ Decoder::Finish() if (!mIsAnimated && !mImageIsTransient && mCurrentFrame) { mCurrentFrame->SetOptimizable(); } - - mImage->OnDecodingComplete(mIsAnimated); } } @@ -399,26 +365,11 @@ Decoder::AllocateFrameInternal(uint32_t aFrameNum, return ref; } -void -Decoder::SetSizeOnImage() -{ - MOZ_ASSERT(mImageMetadata.HasSize(), "Should have size"); - MOZ_ASSERT(mImageMetadata.HasOrientation(), "Should have orientation"); - - nsresult rv = mImage->SetSize(mImageMetadata.GetWidth(), - mImageMetadata.GetHeight(), - mImageMetadata.GetOrientation()); - if (NS_FAILED(rv)) { - PostResizeError(); - } -} - /* * Hook stubs. Override these as necessary in decoder implementations. */ void Decoder::InitInternal() { } -void Decoder::WriteInternal(const char* aBuffer, uint32_t aCount) { } void Decoder::FinishInternal() { } void Decoder::FinishWithErrorInternal() { } @@ -472,7 +423,7 @@ Decoder::PostFrameStop(Opacity aFrameOpacity /* = Opacity::TRANSPARENT */, BlendMethod aBlendMethod /* = BlendMethod::OVER */) { // We should be mid-frame - MOZ_ASSERT(!IsSizeDecode(), "Stopping frame during a size decode"); + MOZ_ASSERT(!IsMetadataDecode(), "Stopping frame during metadata decode"); MOZ_ASSERT(mInFrame, "Stopping frame when we didn't start one"); MOZ_ASSERT(mCurrentFrame, "Stopping frame when we don't have one"); @@ -511,7 +462,7 @@ Decoder::PostInvalidation(const nsIntRect& aRect, void Decoder::PostDecodeDone(int32_t aLoopCount /* = 0 */) { - MOZ_ASSERT(!IsSizeDecode(), "Can't be done with decoding with size decode!"); + MOZ_ASSERT(!IsMetadataDecode(), "Done with decoding in metadata decode"); MOZ_ASSERT(!mInFrame, "Can't be done decoding if we're mid-frame!"); MOZ_ASSERT(!mDecodeDone, "Decode already done!"); mDecodeDone = true; diff --git a/image/Decoder.h b/image/Decoder.h index d6deafb7c9..11ffbe802b 100644 --- a/image/Decoder.h +++ b/image/Decoder.h @@ -42,12 +42,6 @@ public: */ nsresult Decode(); - /** - * Cleans up the decoder's state and notifies our image about success or - * failure. May only be called on the main thread. - */ - void Finish(); - /** * Given a maximum number of bytes we're willing to decode, @aByteLimit, * returns true if we should attempt to run this decoder synchronously. @@ -97,15 +91,17 @@ public: * State. */ - // If we're doing a "size decode", we more or less pass through the image - // data, stopping only to scoop out the image dimensions. A size decode - // must be enabled by SetSizeDecode() _before_calling Init(). - bool IsSizeDecode() { return mSizeDecode; } - void SetSizeDecode(bool aSizeDecode) + /** + * If we're doing a metadata decode, we only decode the image's headers, which + * is enough to determine the image's intrinsic size. A metadata decode is + * enabled by calling SetMetadataDecode() *before* calling Init(). + */ + void SetMetadataDecode(bool aMetadataDecode) { MOZ_ASSERT(!mInitialized, "Shouldn't be initialized yet"); - mSizeDecode = aSizeDecode; + mMetadataDecode = aMetadataDecode; } + bool IsMetadataDecode() const { return mMetadataDecode; } /** * If this decoder supports downscale-during-decode, sets the target size that @@ -125,6 +121,22 @@ public: return NS_ERROR_NOT_AVAILABLE; } + /** + * Set the requested sample size for this decoder. Used to implement the + * -moz-sample-size media fragment. + * + * XXX(seth): Support for -moz-sample-size will be removed in bug 1120056. + */ + virtual void SetSampleSize(int aSampleSize) { } + + /** + * Set the requested resolution for this decoder. Used to implement the + * -moz-resolution media fragment. + * + * XXX(seth): Support for -moz-resolution will be removed in bug 1118926. + */ + virtual void SetResolution(const gfx::IntSize& aResolution) { } + /** * Set whether should send partial invalidations. * @@ -182,6 +194,18 @@ public: bool ImageIsLocked() const { return mImageIsLocked; } + + /** + * Set whether we should stop decoding after the first frame. + */ + void SetIsFirstFrameDecode() + { + MOZ_ASSERT(!mInitialized, "Shouldn't be initialized yet"); + mFirstFrameDecode = true; + } + + bool IsFirstFrameDecode() const { return mFirstFrameDecode; } + size_t BytesDecoded() const { return mBytesDecoded; } // The amount of time we've spent inside Write() so far for this decoder. @@ -200,18 +224,31 @@ public: return mInFrame ? mFrameCount - 1 : mFrameCount; } + // Did we discover that the image we're decoding is animated? + bool HasAnimation() const { return mIsAnimated; } + // Error tracking bool HasError() const { return HasDataError() || HasDecoderError(); } bool HasDataError() const { return mDataError; } bool HasDecoderError() const { return NS_FAILED(mFailCode); } + bool ShouldReportError() const { return mShouldReportError; } nsresult GetDecoderError() const { return mFailCode; } void PostResizeError() { PostDataError(); } + /// Did we finish decoding enough that calling Decode() again would be useless? bool GetDecodeDone() const { - return mDecodeDone || (mSizeDecode && HasSize()) || HasError() || mDataDone; + return mDecodeDone || (mMetadataDecode && HasSize()) || + HasError() || mDataDone; } + /// Did we finish decoding enough to set |RasterImage::mHasBeenDecoded|? + // XXX(seth): This will be removed in bug 1187401. + bool GetDecodeTotallyDone() const { return mDecodeDone && !IsMetadataDecode(); } + + /// Are we in the middle of a frame right now? Used for assertions only. + bool InFrame() const { return mInFrame; } + /** * Returns true if this decoder was aborted. * @@ -234,7 +271,6 @@ public: uint32_t GetDecodeFlags() const { return DecodeFlags(mFlags); } bool HasSize() const { return mImageMetadata.HasSize(); } - void SetSizeOnImage(); nsIntSize GetSize() const { @@ -251,9 +287,6 @@ public: */ RasterImage* GetImage() const { MOZ_ASSERT(mImage); return mImage.get(); } - // XXX(seth): This should be removed once we can optimize imgFrame objects - // off-main-thread. It only exists to support the code in Finish() for - // nsICODecoder. RawAccessFrameRef GetCurrentFrameRef() { return mCurrentFrame ? mCurrentFrame->RawAccessRef() @@ -282,7 +315,7 @@ protected: * only these methods. */ virtual void InitInternal(); - virtual void WriteInternal(const char* aBuffer, uint32_t aCount); + virtual void WriteInternal(const char* aBuffer, uint32_t aCount) = 0; virtual void FinishInternal(); virtual void FinishWithErrorInternal(); @@ -386,10 +419,13 @@ protected: uint8_t aPaletteDepth, imgFrame* aPreviousFrame); - /* - * Member variables. - * - */ +protected: + uint8_t* mImageData; // Pointer to image data in either Cairo or 8bit format + uint32_t mImageDataLength; + uint32_t* mColormap; // Current colormap to be used in Cairo format + uint32_t mColormapSize; + +private: nsRefPtr mImage; Maybe mIterator; RawAccessFrameRef mCurrentFrame; @@ -397,10 +433,9 @@ protected: nsIntRect mInvalidRect; // Tracks an invalidation region in the current frame. Progress mProgress; - uint8_t* mImageData; // Pointer to image data in either Cairo or 8bit format - uint32_t mImageDataLength; - uint32_t* mColormap; // Current colormap to be used in Cairo format - uint32_t mColormapSize; + uint32_t mFrameCount; // Number of frames, including anything in-progress + + nsresult mFailCode; // Telemetry data for this decoder. TimeDuration mDecodeTime; @@ -408,24 +443,20 @@ protected: uint32_t mFlags; size_t mBytesDecoded; - bool mSendPartialInvalidations; - bool mDataDone; - bool mDecodeDone; - bool mDataError; - bool mDecodeAborted; - bool mShouldReportError; - bool mImageIsTransient; - bool mImageIsLocked; -private: - uint32_t mFrameCount; // Number of frames, including anything in-progress - - nsresult mFailCode; - - bool mInitialized; - bool mSizeDecode; - bool mInFrame; - bool mIsAnimated; + bool mInitialized : 1; + bool mMetadataDecode : 1; + bool mSendPartialInvalidations : 1; + bool mImageIsTransient : 1; + bool mImageIsLocked : 1; + bool mFirstFrameDecode : 1; + bool mInFrame : 1; + bool mIsAnimated : 1; + bool mDataDone : 1; + bool mDecodeDone : 1; + bool mDataError : 1; + bool mDecodeAborted : 1; + bool mShouldReportError : 1; }; } // namespace image diff --git a/image/DecoderFactory.cpp b/image/DecoderFactory.cpp new file mode 100644 index 0000000000..16e328f36c --- /dev/null +++ b/image/DecoderFactory.cpp @@ -0,0 +1,244 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "DecoderFactory.h" + +#include "nsMimeTypes.h" +#include "mozilla/RefPtr.h" +#include "nsString.h" + +#include "Decoder.h" +#include "nsPNGDecoder.h" +#include "nsGIFDecoder2.h" +#include "nsJPEGDecoder.h" +#ifdef MOZ_JXR +#include "nsJXRDecoder.h" +#endif +#include "nsBMPDecoder.h" +#include "nsICODecoder.h" +#include "nsIconDecoder.h" +#include "nsWEBPDecoder.h" + +namespace mozilla { + +using namespace gfx; + +namespace image { + +/* static */ DecoderType +DecoderFactory::GetDecoderType(const char* aMimeType) +{ + // By default we don't know. + DecoderType type = DecoderType::UNKNOWN; + + // PNG + if (!strcmp(aMimeType, IMAGE_PNG)) { + type = DecoderType::PNG; + } else if (!strcmp(aMimeType, IMAGE_X_PNG)) { + type = DecoderType::PNG; + + // GIF + } else if (!strcmp(aMimeType, IMAGE_GIF)) { + type = DecoderType::GIF; + + // JPEG + } else if (!strcmp(aMimeType, IMAGE_JPEG)) { + type = DecoderType::JPEG; + } else if (!strcmp(aMimeType, IMAGE_PJPEG)) { + type = DecoderType::JPEG; + } else if (!strcmp(aMimeType, IMAGE_JPG)) { + type = DecoderType::JPEG; + + // BMP + } else if (!strcmp(aMimeType, IMAGE_BMP)) { + type = DecoderType::BMP; + } else if (!strcmp(aMimeType, IMAGE_BMP_MS)) { + type = DecoderType::BMP; + + // ICO + } else if (!strcmp(aMimeType, IMAGE_ICO)) { + type = DecoderType::ICO; + } else if (!strcmp(aMimeType, IMAGE_ICO_MS)) { + type = DecoderType::ICO; + + // Icon + } else if (!strcmp(aMimeType, IMAGE_ICON_MS)) { + type = DecoderType::ICON; + + // WebP + } else if (!strcmp(aMimeType, IMAGE_WEBP) && + gfxPrefs::ImageWebPEnabled()) { + type = DecoderType::WEBP; + +#ifdef MOZ_JXR + } else if (!strcmp(aMimeType, IMAGE_JXR) || !strcmp(aMimeType, IMAGE_MS_PHOTO)) { + if (gfxPrefs::MediaJXREnabled()) { + type = DecoderType::JXR; + } +#endif + + } + + return type; +} + +/* static */ already_AddRefed +DecoderFactory::GetDecoder(DecoderType aType, + RasterImage* aImage, + bool aIsRedecode) +{ + nsRefPtr decoder; + + switch (aType) { + case DecoderType::PNG: + decoder = new nsPNGDecoder(aImage); + break; + case DecoderType::GIF: + decoder = new nsGIFDecoder2(aImage); + break; + case DecoderType::JPEG: + // If we have all the data we don't want to waste cpu time doing + // a progressive decode. + decoder = new nsJPEGDecoder(aImage, + aIsRedecode ? Decoder::SEQUENTIAL + : Decoder::PROGRESSIVE); + break; + case DecoderType::BMP: + decoder = new nsBMPDecoder(aImage); + break; + case DecoderType::ICO: + decoder = new nsICODecoder(aImage); + break; + case DecoderType::ICON: + decoder = new nsIconDecoder(aImage); + break; + case DecoderType::WEBP: + decoder = new nsWEBPDecoder(aImage); + break; +#ifdef MOZ_JXR + case DecoderType::JXR: + decoder = new nsJXRDecoder(aImage, aIsRedecode); + break; +#endif + default: + MOZ_ASSERT_UNREACHABLE("Unknown decoder type"); + } + + return decoder.forget(); +} + +/* static */ already_AddRefed +DecoderFactory::CreateDecoder(DecoderType aType, + RasterImage* aImage, + SourceBuffer* aSourceBuffer, + const Maybe& aTargetSize, + uint32_t aFlags, + int aSampleSize, + const IntSize& aResolution, + bool aIsRedecode, + bool aImageIsTransient, + bool aImageIsLocked) +{ + if (aType == DecoderType::UNKNOWN) { + return nullptr; + } + + nsRefPtr decoder = GetDecoder(aType, aImage, aIsRedecode); + MOZ_ASSERT(decoder, "Should have a decoder now"); + + // Initialize the decoder. + decoder->SetMetadataDecode(false); + decoder->SetIterator(aSourceBuffer->Iterator()); + decoder->SetFlags(aFlags); + decoder->SetSampleSize(aSampleSize); + decoder->SetResolution(aResolution); + decoder->SetSendPartialInvalidations(!aIsRedecode); + decoder->SetImageIsTransient(aImageIsTransient); + + if (aImageIsLocked) { + decoder->SetImageIsLocked(); + } + + // Set a target size for downscale-during-decode if applicable. + if (aTargetSize) { + DebugOnly rv = decoder->SetTargetSize(*aTargetSize); + MOZ_ASSERT(nsresult(rv) != NS_ERROR_NOT_AVAILABLE, + "We're downscale-during-decode but decoder doesn't support it?"); + MOZ_ASSERT(NS_SUCCEEDED(rv), "Bad downscale-during-decode target size?"); + } + + decoder->Init(); + if (NS_FAILED(decoder->GetDecoderError())) { + return nullptr; + } + + return decoder.forget(); +} + +/* static */ already_AddRefed +DecoderFactory::CreateMetadataDecoder(DecoderType aType, + RasterImage* aImage, + SourceBuffer* aSourceBuffer, + int aSampleSize, + const IntSize& aResolution) +{ + if (aType == DecoderType::UNKNOWN) { + return nullptr; + } + + nsRefPtr decoder = + GetDecoder(aType, aImage, /* aIsRedecode = */ false); + MOZ_ASSERT(decoder, "Should have a decoder now"); + + // Initialize the decoder. + decoder->SetMetadataDecode(true); + decoder->SetIterator(aSourceBuffer->Iterator()); + decoder->SetSampleSize(aSampleSize); + decoder->SetResolution(aResolution); + + decoder->Init(); + if (NS_FAILED(decoder->GetDecoderError())) { + return nullptr; + } + + return decoder.forget(); +} + +/* static */ already_AddRefed +DecoderFactory::CreateAnonymousDecoder(DecoderType aType, + SourceBuffer* aSourceBuffer, + uint32_t aFlags) +{ + if (aType == DecoderType::UNKNOWN) { + return nullptr; + } + + nsRefPtr decoder = + GetDecoder(aType, /* aImage = */ nullptr, /* aIsRedecode = */ false); + MOZ_ASSERT(decoder, "Should have a decoder now"); + + // Initialize the decoder. + decoder->SetMetadataDecode(false); + decoder->SetIterator(aSourceBuffer->Iterator()); + decoder->SetFlags(aFlags); + decoder->SetImageIsTransient(true); + + // Without an image, the decoder can't store anything in the SurfaceCache, so + // callers will only be able to retrieve the most recent frame via + // Decoder::GetCurrentFrame(). That means that anonymous decoders should + // always be first-frame-only decoders, because nobody ever wants the *last* + // frame. + decoder->SetIsFirstFrameDecode(); + + decoder->Init(); + if (NS_FAILED(decoder->GetDecoderError())) { + return nullptr; + } + + return decoder.forget(); +} + +} // namespace image +} // namespace mozilla diff --git a/image/DecoderFactory.h b/image/DecoderFactory.h new file mode 100644 index 0000000000..b90e3c3343 --- /dev/null +++ b/image/DecoderFactory.h @@ -0,0 +1,125 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_image_DecoderFactory_h +#define mozilla_image_DecoderFactory_h + +#include "mozilla/Maybe.h" +#include "mozilla/gfx/2D.h" +#include "nsCOMPtr.h" + +class nsACString; + +namespace mozilla { +namespace image { + +class Decoder; +class RasterImage; +class SourceBuffer; + +enum class DecoderType +{ + PNG, + GIF, + JPEG, + BMP, + ICO, + ICON, + WEBP, + JXR, + UNKNOWN +}; + +class DecoderFactory +{ +public: + /// @return the type of decoder which is appropriate for @aMimeType. + static DecoderType GetDecoderType(const char* aMimeType); + + /** + * Creates and initializes a decoder of type @aType. The decoder will send + * notifications to @aImage. + * + * XXX(seth): @aIsRedecode, @aImageIsTransient, and @aImageIsLocked should + * really be part of @aFlags. This requires changes to the way that decoder + * flags work, though. See bug 1185800. + * + * @param aType Which type of decoder to create - JPEG, PNG, etc. + * @param aImage The image will own the decoder and which should receive + * notifications as decoding progresses. + * @param aSourceBuffer The SourceBuffer which the decoder will read its data + * from. + * @param aTargetSize If not Nothing(), the target size which the image should + * be scaled to during decoding. It's an error to specify + * a target size for a decoder type which doesn't support + * downscale-during-decode. + * @param aFlags Flags specifying what type of output the decoder should + * produce; see GetDecodeFlags() in RasterImage.h. + * @param aSampleSize The sample size requested using #-moz-samplesize (or 0 + * if none). + * @param aResolution The resolution requested using #-moz-resolution (or an + * empty rect if none). + * @param aIsRedecode Specify 'true' if this image has been decoded before. + * @param aImageIsTransient Specify 'true' if this image is transient. + * @param aImageIsLocked Specify 'true' if this image is locked for the + * lifetime of this decoder, and should be unlocked + * when the decoder finishes. + */ + static already_AddRefed + CreateDecoder(DecoderType aType, + RasterImage* aImage, + SourceBuffer* aSourceBuffer, + const Maybe& aTargetSize, + uint32_t aFlags, + int aSampleSize, + const gfx::IntSize& aResolution, + bool aIsRedecode, + bool aImageIsTransient, + bool aImageIsLocked); + + /** + * Creates and initializes a metadata decoder of type @aType. This decoder + * will only decode the image's header, extracting metadata like the size of + * the image. No actual image data will be decoded and no surfaces will be + * allocated. The decoder will send notifications to @aImage. + * + * @param aType Which type of decoder to create - JPEG, PNG, etc. + * @param aImage The image will own the decoder and which should receive + * notifications as decoding progresses. + * @param aSourceBuffer The SourceBuffer which the decoder will read its data + * from. + * @param aSampleSize The sample size requested using #-moz-samplesize (or 0 + * if none). + * @param aResolution The resolution requested using #-moz-resolution (or an + * empty rect if none). + */ + static already_AddRefed + CreateMetadataDecoder(DecoderType aType, + RasterImage* aImage, + SourceBuffer* aSourceBuffer, + int aSampleSize, + const gfx::IntSize& aResolution); + + static already_AddRefed + CreateAnonymousDecoder(DecoderType aType, + SourceBuffer* aSourceBuffer, + uint32_t aFlags); + +private: + virtual ~DecoderFactory() = 0; + + /** + * An internal method which allocates a new decoder of the requested @aType. + */ + static already_AddRefed GetDecoder(DecoderType aType, + RasterImage* aImage, + bool aIsRedecode); +}; + +} // namespace image +} // namespace mozilla + +#endif // mozilla_image_DecoderFactory_h diff --git a/image/Image.cpp b/image/Image.cpp index d2d63c7cf4..3f8fa1dc94 100644 --- a/image/Image.cpp +++ b/image/Image.cpp @@ -3,8 +3,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "nsMimeTypes.h" - #include "Image.h" #include "nsRefreshDriver.h" #include "mozilla/TimeStamp.h" @@ -69,65 +67,6 @@ ImageResource::~ImageResource() mProgressTracker->ResetImage(); } -// Translates a mimetype into a concrete decoder -Image::eDecoderType -Image::GetDecoderType(const char* aMimeType) -{ - // By default we don't know - eDecoderType rv = eDecoderType_unknown; - - // PNG - if (!strcmp(aMimeType, IMAGE_PNG)) { - rv = eDecoderType_png; - } else if (!strcmp(aMimeType, IMAGE_X_PNG)) { - rv = eDecoderType_png; - - // GIF - } else if (!strcmp(aMimeType, IMAGE_GIF)) { - rv = eDecoderType_gif; - - // JPEG - } else if (!strcmp(aMimeType, IMAGE_JPEG)) { - rv = eDecoderType_jpeg; - } else if (!strcmp(aMimeType, IMAGE_PJPEG)) { - rv = eDecoderType_jpeg; - } else if (!strcmp(aMimeType, IMAGE_JPG)) { - rv = eDecoderType_jpeg; - -#ifdef MOZ_JXR - // JXR (JPEG XR) - } else if ( - !strcmp(aMimeType, IMAGE_JXR) || !strcmp(aMimeType, IMAGE_MS_PHOTO) - ) { - if (gfxPrefs::MediaJXREnabled()) { - rv = eDecoderType_jxr; - } -#endif - - // WEBP - } else if (!strcmp(aMimeType, IMAGE_WEBP)) { - rv = eDecoderType_webp; - - // BMP - } else if (!strcmp(aMimeType, IMAGE_BMP)) { - rv = eDecoderType_bmp; - } else if (!strcmp(aMimeType, IMAGE_BMP_MS)) { - rv = eDecoderType_bmp; - - // ICO - } else if (!strcmp(aMimeType, IMAGE_ICO)) { - rv = eDecoderType_ico; - } else if (!strcmp(aMimeType, IMAGE_ICO_MS)) { - rv = eDecoderType_ico; - - // Icon - } else if (!strcmp(aMimeType, IMAGE_ICON_MS)) { - rv = eDecoderType_icon; - } - - return rv; -} - void ImageResource::IncrementAnimationConsumers() { diff --git a/image/Image.h b/image/Image.h index 057c67ca23..130d484423 100644 --- a/image/Image.h +++ b/image/Image.h @@ -129,24 +129,6 @@ private: class Image : public imgIContainer { public: - // Mimetype translation - enum eDecoderType { - eDecoderType_png = 0, - eDecoderType_gif = 1, - eDecoderType_jpeg = 2, - eDecoderType_bmp = 3, - eDecoderType_ico = 4, - eDecoderType_icon = 5, - eDecoderType_webp = 6, -#ifdef MOZ_JXR - eDecoderType_jxr = 7, - eDecoderType_unknown = 8 -#else - eDecoderType_unknown = 7 -#endif - }; - static eDecoderType GetDecoderType(const char* aMimeType); - /** * Flags for Image initialization. * diff --git a/image/ImageFactory.cpp b/image/ImageFactory.cpp index f5cacffb29..3f534cb0ef 100644 --- a/image/ImageFactory.cpp +++ b/image/ImageFactory.cpp @@ -221,6 +221,29 @@ ImageFactory::CreateRasterImage(nsIRequest* aRequest, aProgressTracker->SetImage(newImage); newImage->SetProgressTracker(aProgressTracker); + nsAutoCString ref; + aURI->GetRef(ref); + net::nsMediaFragmentURIParser parser(ref); + if (parser.HasResolution()) { + newImage->SetRequestedResolution(parser.GetResolution()); + } + + if (parser.HasSampleSize()) { + /* Get our principal */ + nsCOMPtr chan(do_QueryInterface(aRequest)); + nsCOMPtr principal; + if (chan) { + nsContentUtils::GetSecurityManager() + ->GetChannelResultPrincipal(chan, getter_AddRefs(principal)); + } + + if ((principal && + principal->GetAppStatus() == nsIPrincipal::APP_STATUS_CERTIFIED) || + gfxPrefs::ImageMozSampleSizeEnabled()) { + newImage->SetRequestedSampleSize(parser.GetSampleSize()); + } + } + rv = newImage->Init(aMimeType.get(), aImageFlags); NS_ENSURE_SUCCESS(rv, BadImage(newImage)); @@ -245,29 +268,6 @@ ImageFactory::CreateRasterImage(nsIRequest* aRequest, } } - nsAutoCString ref; - aURI->GetRef(ref); - net::nsMediaFragmentURIParser parser(ref); - if (parser.HasResolution()) { - newImage->SetRequestedResolution(parser.GetResolution()); - } - - if (parser.HasSampleSize()) { - /* Get our principal */ - nsCOMPtr chan(do_QueryInterface(aRequest)); - nsCOMPtr principal; - if (chan) { - nsContentUtils::GetSecurityManager() - ->GetChannelResultPrincipal(chan, getter_AddRefs(principal)); - } - - if ((principal && - principal->GetAppStatus() == nsIPrincipal::APP_STATUS_CERTIFIED) || - gfxPrefs::ImageMozSampleSizeEnabled()) { - newImage->SetRequestedSampleSize(parser.GetSampleSize()); - } - } - return newImage.forget(); } diff --git a/image/ImageMetadata.cpp b/image/ImageMetadata.cpp index e30e208b22..236228520a 100644 --- a/image/ImageMetadata.cpp +++ b/image/ImageMetadata.cpp @@ -14,9 +14,11 @@ namespace mozilla { namespace image { -void -ImageMetadata::SetOnImage(RasterImage* image) +nsresult +ImageMetadata::SetOnImage(RasterImage* aImage) { + nsresult rv = NS_OK; + if (mHotspotX != -1 && mHotspotY != -1) { nsCOMPtr intwrapx = do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID); @@ -24,11 +26,18 @@ ImageMetadata::SetOnImage(RasterImage* image) do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID); intwrapx->SetData(mHotspotX); intwrapy->SetData(mHotspotY); - image->Set("hotspotX", intwrapx); - image->Set("hotspotY", intwrapy); + aImage->Set("hotspotX", intwrapx); + aImage->Set("hotspotY", intwrapy); } - image->SetLoopCount(mLoopCount); + aImage->SetLoopCount(mLoopCount); + + if (HasSize()) { + MOZ_ASSERT(HasOrientation(), "Should have orientation"); + rv = aImage->SetSize(GetWidth(), GetHeight(), GetOrientation()); + } + + return rv; } } // namespace image diff --git a/image/ImageMetadata.h b/image/ImageMetadata.h index a8d374bb82..c257612e02 100644 --- a/image/ImageMetadata.h +++ b/image/ImageMetadata.h @@ -28,7 +28,7 @@ public: { } // Set the metadata this object represents on an image. - void SetOnImage(RasterImage* image); + nsresult SetOnImage(RasterImage* aImage); void SetHotspot(uint16_t hotspotx, uint16_t hotspoty) { diff --git a/image/ImageOps.cpp b/image/ImageOps.cpp index 350dc6cd21..0a1e460c88 100644 --- a/image/ImageOps.cpp +++ b/image/ImageOps.cpp @@ -4,14 +4,22 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "imgIContainer.h" +#include "ImageOps.h" + #include "ClippedImage.h" +#include "DecodePool.h" +#include "Decoder.h" +#include "DecoderFactory.h" #include "DynamicImage.h" #include "FrozenImage.h" -#include "OrientedImage.h" #include "Image.h" +#include "imgIContainer.h" +#include "mozilla/gfx/2D.h" +#include "nsStreamUtils.h" +#include "OrientedImage.h" +#include "SourceBuffer.h" -#include "ImageOps.h" +using namespace mozilla::gfx; namespace mozilla { namespace image { @@ -68,5 +76,70 @@ ImageOps::CreateFromDrawable(gfxDrawable* aDrawable) return drawableImage.forget(); } +/* static */ already_AddRefed +ImageOps::DecodeToSurface(nsIInputStream* aInputStream, + const nsACString& aMimeType, + uint32_t aFlags) +{ + MOZ_ASSERT(aInputStream); + + nsresult rv; + + // Prepare the input stream. + nsCOMPtr inputStream = aInputStream; + if (!NS_InputStreamIsBuffered(aInputStream)) { + nsCOMPtr bufStream; + rv = NS_NewBufferedInputStream(getter_AddRefs(bufStream), + aInputStream, 1024); + if (NS_SUCCEEDED(rv)) { + inputStream = bufStream; + } + } + + // Figure out how much data we've been passed. + uint64_t length; + rv = inputStream->Available(&length); + if (NS_FAILED(rv) || length > UINT32_MAX) { + return nullptr; + } + + // Write the data into a SourceBuffer. + nsRefPtr sourceBuffer = new SourceBuffer(); + sourceBuffer->ExpectLength(length); + rv = sourceBuffer->AppendFromInputStream(inputStream, length); + if (NS_FAILED(rv)) { + return nullptr; + } + sourceBuffer->Complete(NS_OK); + + // Create a decoder. + DecoderType decoderType = + DecoderFactory::GetDecoderType(PromiseFlatCString(aMimeType).get()); + nsRefPtr decoder = + DecoderFactory::CreateAnonymousDecoder(decoderType, sourceBuffer, aFlags); + if (!decoder) { + return nullptr; + } + + // Run the decoder synchronously. + decoder->Decode(); + if (!decoder->GetDecodeDone() || decoder->HasError()) { + return nullptr; + } + + // Pull out the surface. + RawAccessFrameRef frame = decoder->GetCurrentFrameRef(); + if (!frame) { + return nullptr; + } + + RefPtr surface = frame->GetSurface(); + if (!surface) { + return nullptr; + } + + return surface.forget(); +} + } // namespace image } // namespace mozilla diff --git a/image/ImageOps.h b/image/ImageOps.h index d080a54e4d..9dcfc286f8 100644 --- a/image/ImageOps.h +++ b/image/ImageOps.h @@ -12,8 +12,14 @@ class gfxDrawable; class imgIContainer; +class nsIInputStream; namespace mozilla { + +namespace gfx { +class SourceSurface; +} + namespace image { class Image; @@ -61,6 +67,23 @@ public: static already_AddRefed CreateFromDrawable(gfxDrawable* aDrawable); + /** + * Decodes an image from an nsIInputStream directly into a SourceSurface, + * without ever creating an Image or imgIContainer (which are mostly + * main-thread-only). That means that this function may be called + * off-main-thread. + * + * @param aInputStream An input stream containing an encoded image. + * @param aMimeType The MIME type of the image. + * @param aFlags Flags of the imgIContainer::FLAG_DECODE_* variety. + * @return A SourceSurface containing the first frame of the image at its + * intrinsic size, or nullptr if the image cannot be decoded. + */ + static already_AddRefed + DecodeToSurface(nsIInputStream* aInputStream, + const nsACString& aMimeType, + uint32_t aFlags); + private: // This is a static utility class, so disallow instantiation. virtual ~ImageOps() = 0; diff --git a/image/ImageURL.h b/image/ImageURL.h index b2994cd6f6..4e5b34674b 100644 --- a/image/ImageURL.h +++ b/image/ImageURL.h @@ -47,6 +47,23 @@ public: /// A weak pointer to the URI spec for this ImageURL. For logging only. const char* Spec() const { return mSpec.get(); } + enum TruncatedSpecStatus { + FitsInto1k, + TruncatedTo1k + }; + TruncatedSpecStatus GetSpecTruncatedTo1k(nsACString& result) + { + static const size_t sMaxTruncatedLength = 1024; + + if (sMaxTruncatedLength >= mSpec.Length()) { + result = mSpec; + return FitsInto1k; + } + + result = Substring(mSpec, 0, sMaxTruncatedLength); + return TruncatedTo1k; + } + nsresult GetScheme(nsACString& result) { result = mScheme; diff --git a/image/RasterImage.cpp b/image/RasterImage.cpp index 061b6d3a99..0b6061ceb1 100644 --- a/image/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -21,6 +21,9 @@ #include "ImageRegion.h" #include "Layers.h" #include "LookupResult.h" +#include "nsIConsoleService.h" +#include "nsIInputStream.h" +#include "nsIScriptError.h" #include "nsPresContext.h" #include "SourceBuffer.h" #include "SurfaceCache.h" @@ -47,7 +50,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/Services.h" #include -#include "mozilla/Telemetry.h" #include "mozilla/TimeStamp.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/gfx/Scale.h" @@ -235,7 +237,7 @@ RasterImage::RasterImage(ImageURL* aURI /* = nullptr */) : mAnimationFinished(false), mWantFullDecode(false) { - Telemetry::GetHistogramById(Telemetry::IMAGE_DECODE_COUNT)->Add(0); + //Telemetry::GetHistogramById(Telemetry::IMAGE_DECODE_COUNT)->Add(0); } //****************************************************************************** @@ -286,8 +288,8 @@ RasterImage::Init(const char* aMimeType, // Use the MIME type to select a decoder type, and make sure there *is* a // decoder for this MIME type. NS_ENSURE_ARG_POINTER(aMimeType); - mDecoderType = GetDecoderType(aMimeType); - if (mDecoderType == eDecoderType_unknown) { + mDecoderType = DecoderFactory::GetDecoderType(aMimeType); + if (mDecoderType == DecoderType::UNKNOWN) { return NS_ERROR_FAILURE; } @@ -298,8 +300,8 @@ RasterImage::Init(const char* aMimeType, } if (!mSyncLoad) { - // Create an async size decoder and verify that we succeed in doing so. - nsresult rv = Decode(Nothing(), DECODE_FLAGS_DEFAULT); + // Create an async metadata decoder and verify we succeed in doing so. + nsresult rv = DecodeMetadata(DECODE_FLAGS_DEFAULT); if (NS_FAILED(rv)) { return NS_ERROR_FAILURE; } @@ -349,7 +351,6 @@ RasterImage::RequestRefresh(const TimeStamp& aTime) } //****************************************************************************** -/* readonly attribute int32_t width; */ NS_IMETHODIMP RasterImage::GetWidth(int32_t* aWidth) { @@ -365,7 +366,6 @@ RasterImage::GetWidth(int32_t* aWidth) } //****************************************************************************** -/* readonly attribute int32_t height; */ NS_IMETHODIMP RasterImage::GetHeight(int32_t* aHeight) { @@ -381,7 +381,6 @@ RasterImage::GetHeight(int32_t* aHeight) } //****************************************************************************** -/* [noscript] readonly attribute nsSize intrinsicSize; */ NS_IMETHODIMP RasterImage::GetIntrinsicSize(nsSize* aSize) { @@ -395,7 +394,6 @@ RasterImage::GetIntrinsicSize(nsSize* aSize) } //****************************************************************************** -/* [noscript] readonly attribute nsSize intrinsicRatio; */ NS_IMETHODIMP RasterImage::GetIntrinsicRatio(nsSize* aRatio) { @@ -414,7 +412,6 @@ RasterImage::GetOrientation() } //****************************************************************************** -/* unsigned short GetType(); */ NS_IMETHODIMP RasterImage::GetType(uint16_t* aType) { @@ -492,7 +489,7 @@ RasterImage::LookupFrame(uint32_t aFrameNum, // yet.) Trigger decoding so it'll be available next time. MOZ_ASSERT(!mAnim, "Animated frames should be locked"); - Decode(Some(requestedSize), aFlags); + Decode(requestedSize, aFlags); // If we can sync decode, we should already have the frame. if (aFlags & FLAG_SYNC_DECODE) { @@ -578,7 +575,6 @@ RasterImage::OnSurfaceDiscarded() } //****************************************************************************** -/* readonly attribute boolean animated; */ NS_IMETHODIMP RasterImage::GetAnimated(bool* aAnimated) { @@ -607,7 +603,6 @@ RasterImage::GetAnimated(bool* aAnimated) } //****************************************************************************** -/* [notxpcom] int32_t getFirstFrameDelay (); */ NS_IMETHODIMP_(int32_t) RasterImage::GetFirstFrameDelay() { @@ -985,42 +980,6 @@ RasterImage::SetSize(int32_t aWidth, int32_t aHeight, Orientation aOrientation) return NS_OK; } -void -RasterImage::OnDecodingComplete(bool aIsAnimated) -{ - MOZ_ASSERT(NS_IsMainThread()); - - if (mError) { - return; - } - - // Flag that we've been decoded before. - mHasBeenDecoded = true; - - if (aIsAnimated) { - if (mAnim) { - mAnim->SetDoneDecoding(true); - } else { - // The OnAddedFrame event that will create mAnim is still in the event - // queue. Wait for it. - nsCOMPtr runnable = - NS_NewRunnableMethod(this, &RasterImage::MarkAnimationDecoded); - NS_DispatchToMainThread(runnable); - } - } -} - -void -RasterImage::MarkAnimationDecoded() -{ - MOZ_ASSERT(mAnim, "Should have an animation now"); - if (!mAnim) { - return; - } - - mAnim->SetDoneDecoding(true); -} - NS_IMETHODIMP RasterImage::SetAnimationMode(uint16_t aAnimationMode) { @@ -1031,7 +990,7 @@ RasterImage::SetAnimationMode(uint16_t aAnimationMode) } //****************************************************************************** -/* void StartAnimation () */ + nsresult RasterImage::StartAnimation() { @@ -1063,7 +1022,6 @@ RasterImage::StartAnimation() } //****************************************************************************** -/* void stopAnimation (); */ nsresult RasterImage::StopAnimation() { @@ -1081,7 +1039,6 @@ RasterImage::StopAnimation() } //****************************************************************************** -/* void resetAnimation (); */ NS_IMETHODIMP RasterImage::ResetAnimation() { @@ -1166,21 +1123,22 @@ RasterImage::OnImageDataComplete(nsIRequest*, nsISupports*, nsresult aStatus, // Let decoders know that there won't be any more data coming. mSourceBuffer->Complete(aStatus); - // Allow a synchronous size decode if mSyncLoad was set, or if we're running - // on a single thread (in which case waiting for the async size decoder could - // delay this image's load event quite a bit), or if this image is transient. - bool canSyncSizeDecode = mSyncLoad || mTransient || - DecodePool::NumberOfCores() < 2; + // Allow a synchronous metadata decode if mSyncLoad was set, or if we're + // running on a single thread (in which case waiting for the async metadata + // decoder could delay this image's load event quite a bit), or if this image + // is transient. + bool canSyncDecodeMetadata = mSyncLoad || mTransient || + DecodePool::NumberOfCores() < 2; - if (canSyncSizeDecode && !mHasSize) { + if (canSyncDecodeMetadata && !mHasSize) { // We're loading this image synchronously, so it needs to be usable after // this call returns. Since we haven't gotten our size yet, we need to do a - // synchronous size decode here. - Decode(Nothing(), FLAG_SYNC_DECODE); + // synchronous metadata decode here. + DecodeMetadata(FLAG_SYNC_DECODE); } // Determine our final status, giving precedence to Necko failure codes. We - // check after running the size decode above in case it triggered an error. + // check after running the metadata decode in case it triggered an error. nsresult finalStatus = mError ? NS_ERROR_FAILURE : NS_OK; if (NS_FAILED(aStatus)) { finalStatus = aStatus; @@ -1195,7 +1153,8 @@ RasterImage::OnImageDataComplete(nsIRequest*, nsISupports*, nsresult aStatus, if (!mHasSize && !mError) { // We don't have our size yet, so we'll fire the load event in SetSize(). - MOZ_ASSERT(!canSyncSizeDecode, "Firing load async but canSyncSizeDecode?"); + MOZ_ASSERT(!canSyncDecodeMetadata, + "Firing load async after metadata sync decode?"); NotifyProgress(FLAG_ONLOAD_BLOCKED); mLoadProgress = Some(loadProgress); return finalStatus; @@ -1226,20 +1185,16 @@ RasterImage::NotifyForLoadEvent(Progress aProgress) nsresult RasterImage::OnImageDataAvailable(nsIRequest*, nsISupports*, - nsIInputStream* aInStr, - uint64_t aOffset, + nsIInputStream* aInputStream, + uint64_t, uint32_t aCount) { - nsresult rv; + nsresult rv = mSourceBuffer->AppendFromInputStream(aInputStream, aCount); + MOZ_ASSERT(rv == NS_OK || rv == NS_ERROR_OUT_OF_MEMORY); - // WriteToSourceBuffer always consumes everything it gets if it doesn't run - // out of memory. - uint32_t bytesRead; - rv = aInStr->ReadSegments(WriteToSourceBuffer, this, aCount, &bytesRead); - - MOZ_ASSERT(bytesRead == aCount || HasError() || NS_FAILED(rv), - "WriteToSourceBuffer should consume everything if ReadSegments succeeds or " - "the image must be in error!"); + if (MOZ_UNLIKELY(rv == NS_ERROR_OUT_OF_MEMORY)) { + DoError(); + } return rv; } @@ -1325,132 +1280,15 @@ RasterImage::CanDiscard() { !mAnim; // Can never discard animated images } -// Sets up a decoder for this image. -already_AddRefed -RasterImage::CreateDecoder(const Maybe& aSize, uint32_t aFlags) -{ - // Make sure we actually get size before doing a full decode. - if (aSize) { - MOZ_ASSERT(mHasSize, "Must do a size decode before a full decode!"); - MOZ_ASSERT(mDownscaleDuringDecode || *aSize == mSize, - "Can only decode to our intrinsic size if we're not allowed to " - "downscale-during-decode"); - } else { - MOZ_ASSERT(!mHasSize, "Should not do unnecessary size decodes"); - } - - // Instantiate the appropriate decoder. - nsRefPtr decoder; - switch (mDecoderType) { - case eDecoderType_png: - decoder = new nsPNGDecoder(this); - break; - case eDecoderType_gif: - decoder = new nsGIFDecoder2(this); - break; - case eDecoderType_jpeg: - // If we have all the data we don't want to waste cpu time doing - // a progressive decode. - decoder = new nsJPEGDecoder(this, - mHasBeenDecoded ? Decoder::SEQUENTIAL : - Decoder::PROGRESSIVE); - break; -#ifdef MOZ_JXR - case eDecoderType_jxr: - decoder = new nsJXRDecoder(this, mHasBeenDecoded); - break; -#endif - case eDecoderType_bmp: - decoder = new nsBMPDecoder(this); - break; - case eDecoderType_ico: - decoder = new nsICODecoder(this); - break; - case eDecoderType_icon: - decoder = new nsIconDecoder(this); - break; - case eDecoderType_webp: - decoder = new nsWEBPDecoder(this); - break; - default: - MOZ_ASSERT_UNREACHABLE("Unknown decoder type"); - } - - MOZ_ASSERT(decoder, "Should have a decoder now"); - - // Initialize the decoder. - decoder->SetSizeDecode(!aSize); - decoder->SetSendPartialInvalidations(!mHasBeenDecoded); - decoder->SetImageIsTransient(mTransient); - decoder->SetFlags(aFlags); - - if (!mHasBeenDecoded && aSize) { - // Lock the image while we're decoding, so that it doesn't get evicted from - // the SurfaceCache before we have a chance to realize that it's animated. - // The corresponding unlock happens in FinalizeDecoder. - LockImage(); - decoder->SetImageIsLocked(); - } - - decoder->SetIterator(mSourceBuffer->Iterator()); - - // Set a target size for downscale-during-decode if applicable. - if (mDownscaleDuringDecode && aSize && *aSize != mSize) { - DebugOnly rv = decoder->SetTargetSize(*aSize); - MOZ_ASSERT(nsresult(rv) != NS_ERROR_NOT_AVAILABLE, - "We're downscale-during-decode but decoder doesn't support it?"); - MOZ_ASSERT(NS_SUCCEEDED(rv), "Bad downscale-during-decode target size?"); - } - - decoder->Init(); - - if (NS_FAILED(decoder->GetDecoderError())) { - return nullptr; - } - - if (aSize) { - // Add a placeholder for the first frame to the SurfaceCache so we won't - // trigger any more decoders with the same parameters. - InsertOutcome outcome = - SurfaceCache::InsertPlaceholder(ImageKey(this), - RasterSurfaceKey(*aSize, - decoder->GetDecodeFlags(), - /* aFrameNum = */ 0)); - if (outcome != InsertOutcome::SUCCESS) { - return nullptr; - } - - Telemetry::GetHistogramById( - Telemetry::IMAGE_DECODE_COUNT)->Subtract(mDecodeCount); - mDecodeCount++; - Telemetry::GetHistogramById( - Telemetry::IMAGE_DECODE_COUNT)->Add(mDecodeCount); - - if (mDecodeCount > sMaxDecodeCount) { - // Don't subtract out 0 from the histogram, because that causes its count - // to go negative, which is not kosher. - if (sMaxDecodeCount > 0) { - Telemetry::GetHistogramById( - Telemetry::IMAGE_MAX_DECODE_COUNT)->Subtract(sMaxDecodeCount); - } - sMaxDecodeCount = mDecodeCount; - Telemetry::GetHistogramById( - Telemetry::IMAGE_MAX_DECODE_COUNT)->Add(sMaxDecodeCount); - } - } - - return decoder.forget(); -} - //****************************************************************************** -/* void requestDecode() */ + NS_IMETHODIMP RasterImage::RequestDecode() { return RequestDecodeForSize(mSize, DECODE_FLAGS_DEFAULT); } -/* void startDecode() */ + NS_IMETHODIMP RasterImage::StartDecoding() { @@ -1492,22 +1330,52 @@ RasterImage::RequestDecodeForSize(const IntSize& aSize, uint32_t aFlags) return NS_OK; } -NS_IMETHODIMP -RasterImage::Decode(const Maybe& aSize, uint32_t aFlags) +static void +LaunchDecoder(Decoder* aDecoder, + RasterImage* aImage, + uint32_t aFlags, + bool aHaveSourceData) { - MOZ_ASSERT(!aSize || NS_IsMainThread()); + if (aHaveSourceData) { + // If we have all the data, we can sync decode if requested. + if (aFlags & imgIContainer::FLAG_SYNC_DECODE) { + PROFILER_LABEL_PRINTF("DecodePool", "SyncDecodeIfPossible", + js::ProfileEntry::Category::GRAPHICS, + "%s", aImage->GetURIString().get()); + DecodePool::Singleton()->SyncDecodeIfPossible(aDecoder); + return; + } + + if (aFlags & imgIContainer::FLAG_SYNC_DECODE_IF_FAST) { + PROFILER_LABEL_PRINTF("DecodePool", "SyncDecodeIfSmall", + js::ProfileEntry::Category::GRAPHICS, + "%s", aImage->GetURIString().get()); + DecodePool::Singleton()->SyncDecodeIfSmall(aDecoder); + return; + } + } + + // Perform an async decode. We also take this path if we don't have all the + // source data yet, since sync decoding is impossible in that situation. + DecodePool::Singleton()->AsyncDecode(aDecoder); +} + +NS_IMETHODIMP +RasterImage::Decode(const IntSize& aSize, uint32_t aFlags) +{ + MOZ_ASSERT(NS_IsMainThread()); if (mError) { return NS_ERROR_FAILURE; } // If we don't have a size yet, we can't do any other decoding. - if (!mHasSize && aSize) { + if (!mHasSize) { mWantFullDecode = true; return NS_OK; } - if (mDownscaleDuringDecode && aSize) { + if (mDownscaleDuringDecode) { // We're about to decode again, which may mean that some of the previous // sizes we've decoded at aren't useful anymore. We can allow them to // expire from the cache by unlocking them here. When the decode finishes, @@ -1518,32 +1386,80 @@ RasterImage::Decode(const Maybe& aSize, uint32_t aFlags) SurfaceCache::UnlockSurfaces(ImageKey(this)); } + MOZ_ASSERT(mDownscaleDuringDecode || aSize == mSize, + "Can only decode to our intrinsic size if we're not allowed to " + "downscale-during-decode"); + + Maybe targetSize = mSize != aSize ? Some(aSize) : Nothing(); + + bool imageIsLocked = false; + if (!mHasBeenDecoded) { + // Lock the image while we're decoding, so that it doesn't get evicted from + // the SurfaceCache before we have a chance to realize that it's animated. + // The corresponding unlock happens in FinalizeDecoder. + LockImage(); + imageIsLocked = true; + } + // Create a decoder. - nsRefPtr decoder = CreateDecoder(aSize, aFlags); + nsRefPtr decoder = + DecoderFactory::CreateDecoder(mDecoderType, this, mSourceBuffer, targetSize, + aFlags, mRequestedSampleSize, mRequestedResolution, + mHasBeenDecoded, mTransient, imageIsLocked); + + // Make sure DecoderFactory was able to create a decoder successfully. if (!decoder) { return NS_ERROR_FAILURE; } - if (mHasSourceData) { - // If we have all the data, we can sync decode if requested. - if (aFlags & FLAG_SYNC_DECODE) { - PROFILER_LABEL_PRINTF("DecodePool", "SyncDecodeIfPossible", - js::ProfileEntry::Category::GRAPHICS, "%s", GetURIString().get()); - DecodePool::Singleton()->SyncDecodeIfPossible(decoder); - return NS_OK; - } - - if (aFlags & FLAG_SYNC_DECODE_IF_FAST) { - PROFILER_LABEL_PRINTF("DecodePool", "SyncDecodeIfSmall", - js::ProfileEntry::Category::GRAPHICS, "%s", GetURIString().get()); - DecodePool::Singleton()->SyncDecodeIfSmall(decoder); - return NS_OK; - } + // Add a placeholder for the first frame to the SurfaceCache so we won't + // trigger any more decoders with the same parameters. + InsertOutcome outcome = + SurfaceCache::InsertPlaceholder(ImageKey(this), + RasterSurfaceKey(aSize, + decoder->GetDecodeFlags(), + /* aFrameNum = */ 0)); + if (outcome != InsertOutcome::SUCCESS) { + return NS_ERROR_FAILURE; } - // Perform an async decode. We also take this path if we don't have all the - // source data yet, since sync decoding is impossible in that situation. - DecodePool::Singleton()->AsyncDecode(decoder); + if (mDecodeCount > sMaxDecodeCount) { + // Don't subtract out 0 from the histogram, because that causes its count + // to go negative, which is not kosher. + if (sMaxDecodeCount > 0) { + /*Telemetry::GetHistogramById(Telemetry::IMAGE_MAX_DECODE_COUNT) + ->Subtract(sMaxDecodeCount);*/ + } + sMaxDecodeCount = mDecodeCount; + } + + // We're ready to decode; start the decoder. + LaunchDecoder(decoder, this, aFlags, mHasSourceData); + return NS_OK; +} + +NS_IMETHODIMP +RasterImage::DecodeMetadata(uint32_t aFlags) +{ + if (mError) { + return NS_ERROR_FAILURE; + } + + MOZ_ASSERT(!mHasSize, "Should not do unnecessary metadata decodes"); + + // Create a decoder. + nsRefPtr decoder = + DecoderFactory::CreateMetadataDecoder(mDecoderType, this, mSourceBuffer, + mRequestedSampleSize, + mRequestedResolution); + + // Make sure DecoderFactory was able to create a decoder successfully. + if (!decoder) { + return NS_ERROR_FAILURE; + } + + // We're ready to decode; start the decoder. + LaunchDecoder(decoder, this, aFlags, mHasSourceData); return NS_OK; } @@ -1562,13 +1478,13 @@ RasterImage::RecoverFromLossOfFrames(const IntSize& aSize, uint32_t aFlags) // Animated images require some special handling, because we normally require // that they never be discarded. if (mAnim) { - Decode(Some(mSize), aFlags | FLAG_SYNC_DECODE); + Decode(mSize, aFlags | FLAG_SYNC_DECODE); ResetAnimation(); return; } // For non-animated images, it's fine to recover using an async decode. - Decode(Some(aSize), aFlags); + Decode(aSize, aFlags); } bool @@ -1829,24 +1745,14 @@ RasterImage::Draw(gfxContext* aContext, return DrawResult::NOT_READY; } - bool shouldRecordTelemetry = !mDrawStartTime.IsNull() && - ref->IsImageComplete(); - auto result = DrawWithPreDownscaleIfNeeded(Move(ref), aContext, aSize, aRegion, aFilter, flags); - if (shouldRecordTelemetry) { - TimeDuration drawLatency = TimeStamp::Now() - mDrawStartTime; - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_ON_DRAW_LATENCY, - int32_t(drawLatency.ToMicroseconds())); - mDrawStartTime = TimeStamp(); - } - return result; } //****************************************************************************** -/* void lockImage() */ + NS_IMETHODIMP RasterImage::LockImage() { @@ -1868,7 +1774,7 @@ RasterImage::LockImage() } //****************************************************************************** -/* void unlockImage() */ + NS_IMETHODIMP RasterImage::UnlockImage() { @@ -1897,7 +1803,7 @@ RasterImage::UnlockImage() } //****************************************************************************** -/* void requestDiscard() */ + NS_IMETHODIMP RasterImage::RequestDiscard() { @@ -1970,36 +1876,6 @@ RasterImage::HandleErrorWorker::Run() return NS_OK; } -// nsIInputStream callback to copy the incoming image data directly to the -// RasterImage without processing. The RasterImage is passed as the closure. -// Always reads everything it gets, even if the data is erroneous. -NS_METHOD -RasterImage::WriteToSourceBuffer(nsIInputStream* /* unused */, - void* aClosure, - const char* aFromRawSegment, - uint32_t /* unused */, - uint32_t aCount, - uint32_t* aWriteCount) -{ - // Retrieve the RasterImage - RasterImage* image = static_cast(aClosure); - - // Copy the source data. Unless we hit OOM, we squelch the return value - // here, because returning an error means that ReadSegments stops - // reading data, violating our invariant that we read everything we get. - // If we hit OOM then we fail and the load is aborted. - nsresult rv = image->mSourceBuffer->Append(aFromRawSegment, aCount); - if (rv == NS_ERROR_OUT_OF_MEMORY) { - image->DoError(); - return rv; - } - - // We wrote everything we got - *aWriteCount = aCount; - - return NS_OK; -} - bool RasterImage::ShouldAnimate() { @@ -2007,7 +1883,6 @@ RasterImage::ShouldAnimate() !mAnimationFinished; } -/* readonly attribute uint32_t framesNotified; */ #ifdef DEBUG NS_IMETHODIMP RasterImage::GetFramesNotified(uint32_t* aFramesNotified) @@ -2046,47 +1921,63 @@ RasterImage::FinalizeDecoder(Decoder* aDecoder) { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(aDecoder); + MOZ_ASSERT(aDecoder->HasError() || !aDecoder->InFrame(), + "Finalizing a decoder in the middle of a frame"); + + // If the decoder detected an error, log it to the error console. + if (aDecoder->ShouldReportError() && !aDecoder->WasAborted()) { + ReportDecoderError(aDecoder); + } + + // Record all the metadata the decoder gathered about this image. + nsresult rv = aDecoder->GetImageMetadata().SetOnImage(this); + if (NS_FAILED(rv)) { + aDecoder->PostResizeError(); + } + MOZ_ASSERT(mError || mHasSize || !aDecoder->HasSize(), "Should have handed off size by now"); + if (aDecoder->GetDecodeTotallyDone() && !mError) { + // Flag that we've been decoded before. + mHasBeenDecoded = true; + + if (aDecoder->HasAnimation()) { + if (mAnim) { + mAnim->SetDoneDecoding(true); + } else { + // The OnAddedFrame event that will create mAnim is still in the event + // queue. Wait for it. + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &RasterImage::MarkAnimationDecoded); + NS_DispatchToMainThread(runnable); + } + } + } + // Send out any final notifications. NotifyProgress(aDecoder->TakeProgress(), aDecoder->TakeInvalidRect(), aDecoder->GetDecodeFlags()); - bool wasSize = aDecoder->IsSizeDecode(); + bool wasMetadata = aDecoder->IsMetadataDecode(); bool done = aDecoder->GetDecodeDone(); - if (!wasSize && aDecoder->ChunkCount()) { - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_CHUNKS, - aDecoder->ChunkCount()); + if (!wasMetadata && aDecoder->ChunkCount()) { + /*Telemetry::Accumulate(Telemetry::IMAGE_DECODE_CHUNKS, + aDecoder->ChunkCount());*/ } if (done) { - // Do some telemetry if this isn't a size decode. - if (!wasSize) { - Telemetry::Accumulate(Telemetry::IMAGE_DECODE_TIME, - int32_t(aDecoder->DecodeTime().ToMicroseconds())); - - // We record the speed for only some decoders. The rest have - // SpeedHistogram return HistogramCount. - Telemetry::ID id = aDecoder->SpeedHistogram(); - if (id < Telemetry::HistogramCount) { - int32_t KBps = int32_t(aDecoder->BytesDecoded() / - (1024 * aDecoder->DecodeTime().ToSeconds())); - Telemetry::Accumulate(id, KBps); - } - } - // Detect errors. if (aDecoder->HasError() && !aDecoder->WasAborted()) { DoError(); - } else if (wasSize && !mHasSize) { + } else if (wasMetadata && !mHasSize) { DoError(); } // If we were waiting to fire the load event, go ahead and fire it now. - if (mLoadProgress && wasSize) { + if (mLoadProgress && wasMetadata) { NotifyForLoadEvent(*mLoadProgress); mLoadProgress = Nothing(); NotifyProgress(FLAG_ONLOAD_UNBLOCKED); @@ -2098,13 +1989,53 @@ RasterImage::FinalizeDecoder(Decoder* aDecoder) UnlockImage(); } - // If we were a size decode and a full decode was requested, now's the time. - if (done && wasSize && mWantFullDecode) { + // If we were a metadata decode and a full decode was requested, do it. + if (done && wasMetadata && mWantFullDecode) { mWantFullDecode = false; RequestDecode(); } } +void +RasterImage::MarkAnimationDecoded() +{ + MOZ_ASSERT(mAnim, "Should have an animation now"); + if (!mAnim) { + return; + } + + mAnim->SetDoneDecoding(true); +} + +void +RasterImage::ReportDecoderError(Decoder* aDecoder) +{ + nsCOMPtr consoleService = + do_GetService(NS_CONSOLESERVICE_CONTRACTID); + nsCOMPtr errorObject = + do_CreateInstance(NS_SCRIPTERROR_CONTRACTID); + + if (consoleService && errorObject && !aDecoder->HasDecoderError()) { + nsAutoString msg(NS_LITERAL_STRING("Image corrupt or truncated.")); + nsAutoString src; + if (GetURI()) { + nsCString uri; + if (GetURI()->GetSpecTruncatedTo1k(uri) == ImageURL::TruncatedTo1k) { + msg += NS_LITERAL_STRING(" URI in this note truncated due to length."); + } + src = NS_ConvertUTF8toUTF16(uri); + } + if (NS_SUCCEEDED(errorObject->InitWithWindowID( + msg, + src, + EmptyString(), 0, 0, nsIScriptError::errorFlag, + "Image", InnerWindowID() + ))) { + consoleService->LogMessage(errorObject); + } + } +} + already_AddRefed RasterImage::Unwrap() { diff --git a/image/RasterImage.h b/image/RasterImage.h index 84fb5b4274..b1cd253ec0 100644 --- a/image/RasterImage.h +++ b/image/RasterImage.h @@ -26,6 +26,7 @@ #include "LookupResult.h" #include "nsThreadUtils.h" #include "DecodePool.h" +#include "DecoderFactory.h" #include "Orientation.h" #include "nsIObserver.h" #include "mozilla/Attributes.h" @@ -169,12 +170,6 @@ public: // Methods inherited from Image virtual void OnSurfaceDiscarded() override; - // Raster-specific methods - static NS_METHOD WriteToSourceBuffer(nsIInputStream* aIn, void* aClosure, - const char* aFromRawSegment, - uint32_t aToOffset, uint32_t aCount, - uint32_t* aWriteCount); - /* The total number of frames in this image. */ uint32_t GetNumFrames() const { return mFrameCount; } @@ -205,12 +200,6 @@ public: */ void SetLoopCount(int32_t aLoopCount); - /// Notification that the entire image has been decoded. - void OnDecodingComplete(bool aIsAnimated); - - /// Helper method for OnDecodingComplete. - void MarkAnimationDecoded(); - /** * Sends the provided progress notifications to ProgressTracker. * @@ -233,6 +222,10 @@ public: */ void FinalizeDecoder(Decoder* aDecoder); + // Helper methods for FinalizeDecoder. + void MarkAnimationDecoded(); + void ReportDecoderError(Decoder* aDecoder); + ////////////////////////////////////////////////////////////////////////////// // Network callbacks. @@ -268,18 +261,11 @@ public: mRequestedResolution = requestedResolution; } - nsIntSize GetRequestedResolution() { - return mRequestedResolution; - } /* Provide a hint for the requested dimension of the resulting image. */ void SetRequestedSampleSize(int requestedSampleSize) { mRequestedSampleSize = requestedSampleSize; } - int GetRequestedSampleSize() { - return mRequestedSampleSize; - } - nsCString GetURIString() { nsCString spec; if (GetURI()) { @@ -339,19 +325,23 @@ private: /** * Creates and runs a decoder, either synchronously or asynchronously - * according to @aFlags. Passes the provided target size @aSize and decode - * flags @aFlags to CreateDecoder. If a size decode is desired, pass Nothing - * for @aSize. + * according to @aFlags. Decodes at the provided target size @aSize, using + * decode flags @aFlags. + * + * It's an error to call Decode() before this image's intrinsic size is + * available. A metadata decode must successfully complete first. + * + * If downscale-during-decode is not enabled for this image (i.e., if + * mDownscaleDuringDecode is false), it is an error to pass an @aSize value + * different from this image's intrinsic size. */ - NS_IMETHOD Decode(const Maybe& aSize, uint32_t aFlags); + NS_IMETHOD Decode(const gfx::IntSize& aSize, uint32_t aFlags); /** - * Creates a new decoder with a target size of @aSize and decode flags - * specified by @aFlags. If a size decode is desired, pass Nothing() for - * @aSize. + * Creates and runs a metadata decoder, either synchronously or + * asynchronously according to @aFlags. */ - already_AddRefed CreateDecoder(const Maybe& aSize, - uint32_t aFlags); + NS_IMETHOD DecodeMetadata(uint32_t aFlags); /** * In catastrophic circumstances like a GPU driver crash, we may lose our @@ -376,7 +366,7 @@ private: // data uint32_t mLockCount; // The type of decoder this image needs. Computed from the MIME type in Init(). - eDecoderType mDecoderType; + DecoderType mDecoderType; // How many times we've decoded this image. // This is currently only used for statistics @@ -425,8 +415,8 @@ private: // data // of frames, or no more owning request bool mAnimationFinished:1; - // Whether, once we are done doing a size decode, we should immediately kick - // off a full decode. + // Whether, once we are done doing a metadata decode, we should immediately + // kick off a full decode. bool mWantFullDecode:1; TimeStamp mDrawStartTime; diff --git a/image/SVGDocumentWrapper.cpp b/image/SVGDocumentWrapper.cpp index 4db9277e1d..345c0d8f22 100644 --- a/image/SVGDocumentWrapper.cpp +++ b/image/SVGDocumentWrapper.cpp @@ -33,9 +33,11 @@ // undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK #undef GetCurrentTime -using namespace mozilla::dom; - namespace mozilla { + +using namespace dom; +using namespace gfx; + namespace image { NS_IMPL_ISUPPORTS(SVGDocumentWrapper, @@ -213,7 +215,6 @@ SVGDocumentWrapper::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt, /** nsIRequestObserver methods **/ -/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */ NS_IMETHODIMP SVGDocumentWrapper::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) { diff --git a/image/SourceBuffer.cpp b/image/SourceBuffer.cpp index 7b425e9494..f283c7f79f 100644 --- a/image/SourceBuffer.cpp +++ b/image/SourceBuffer.cpp @@ -9,6 +9,7 @@ #include #include #include "mozilla/Likely.h" +#include "nsIInputStream.h" #include "MainThreadUtils.h" #include "SurfaceCache.h" @@ -354,6 +355,46 @@ SourceBuffer::Append(const char* aData, size_t aLength) return NS_OK; } +static NS_METHOD +AppendToSourceBuffer(nsIInputStream*, + void* aClosure, + const char* aFromRawSegment, + uint32_t, + uint32_t aCount, + uint32_t* aWriteCount) +{ + SourceBuffer* sourceBuffer = static_cast(aClosure); + + // Copy the source data. Unless we hit OOM, we squelch the return value here, + // because returning an error means that ReadSegments stops reading data, and + // we want to ensure that we read everything we get. If we hit OOM then we + // return a failed status to the caller. + nsresult rv = sourceBuffer->Append(aFromRawSegment, aCount); + if (rv == NS_ERROR_OUT_OF_MEMORY) { + return rv; + } + + // Report that we wrote everything we got. + *aWriteCount = aCount; + + return NS_OK; +} + +nsresult +SourceBuffer::AppendFromInputStream(nsIInputStream* aInputStream, + uint32_t aCount) +{ + uint32_t bytesRead; + nsresult rv = aInputStream->ReadSegments(AppendToSourceBuffer, this, + aCount, &bytesRead); + + MOZ_ASSERT(bytesRead == aCount || rv == NS_ERROR_OUT_OF_MEMORY, + "AppendToSourceBuffer should consume everything unless " + "we run out of memory"); + + return rv; +} + void SourceBuffer::Complete(nsresult aStatus) { diff --git a/image/SourceBuffer.h b/image/SourceBuffer.h index 9dbef1860e..b87ea6f029 100644 --- a/image/SourceBuffer.h +++ b/image/SourceBuffer.h @@ -22,6 +22,8 @@ #include "mozilla/nsRefPtr.h" #include "nsTArray.h" +class nsIInputStream; + namespace mozilla { namespace image { @@ -235,6 +237,9 @@ public: /// Append the provided data to the buffer. nsresult Append(const char* aData, size_t aLength); + /// Append the data available on the provided nsIInputStream to the buffer. + nsresult AppendFromInputStream(nsIInputStream* aInputStream, uint32_t aCount); + /** * Mark the buffer complete, with a status that will be available to * consumers. Further calls to Append() are forbidden after Complete(). diff --git a/image/VectorImage.cpp b/image/VectorImage.cpp index d3b43d9d91..15262e5055 100644 --- a/image/VectorImage.cpp +++ b/image/VectorImage.cpp @@ -484,7 +484,6 @@ VectorImage::SetAnimationStartTime(const TimeStamp& aTime) // imgIContainer methods //****************************************************************************** -/* readonly attribute int32_t width; */ NS_IMETHODIMP VectorImage::GetWidth(int32_t* aWidth) { @@ -500,7 +499,6 @@ VectorImage::GetWidth(int32_t* aWidth) } //****************************************************************************** -/* [notxpcom] void requestRefresh ([const] in TimeStamp aTime); */ NS_IMETHODIMP_(void) VectorImage::RequestRefresh(const TimeStamp& aTime) { @@ -550,7 +548,6 @@ VectorImage::GetImageSpaceInvalidationRect(const IntRect& aRect) } //****************************************************************************** -/* readonly attribute int32_t height; */ NS_IMETHODIMP VectorImage::GetHeight(int32_t* aHeight) { @@ -566,7 +563,6 @@ VectorImage::GetHeight(int32_t* aHeight) } //****************************************************************************** -/* [noscript] readonly attribute nsSize intrinsicSize; */ NS_IMETHODIMP VectorImage::GetIntrinsicSize(nsSize* aSize) { @@ -592,7 +588,6 @@ VectorImage::GetIntrinsicSize(nsSize* aSize) } //****************************************************************************** -/* [noscript] readonly attribute nsSize intrinsicRatio; */ NS_IMETHODIMP VectorImage::GetIntrinsicRatio(nsSize* aRatio) { @@ -616,7 +611,6 @@ VectorImage::GetOrientation() } //****************************************************************************** -/* readonly attribute unsigned short type; */ NS_IMETHODIMP VectorImage::GetType(uint16_t* aType) { @@ -627,7 +621,6 @@ VectorImage::GetType(uint16_t* aType) } //****************************************************************************** -/* readonly attribute boolean animated; */ NS_IMETHODIMP VectorImage::GetAnimated(bool* aAnimated) { @@ -640,7 +633,6 @@ VectorImage::GetAnimated(bool* aAnimated) } //****************************************************************************** -/* [notxpcom] int32_t getFirstFrameDelay (); */ int32_t VectorImage::GetFirstFrameDelay() { @@ -722,7 +714,6 @@ VectorImage::IsImageContainerAvailable(LayerManager* aManager, uint32_t aFlags) } //****************************************************************************** -/* [noscript] ImageContainer getImageContainer(); */ NS_IMETHODIMP_(already_AddRefed) VectorImage::GetImageContainer(LayerManager* aManager, uint32_t aFlags) { @@ -970,7 +961,7 @@ VectorImage::RecoverFromLossOfSurfaces() } //****************************************************************************** -/* void requestDecode() */ + NS_IMETHODIMP VectorImage::RequestDecode() { @@ -995,7 +986,7 @@ VectorImage::RequestDecodeForSize(const nsIntSize& aSize, uint32_t aFlags) } //****************************************************************************** -/* void lockImage() */ + NS_IMETHODIMP VectorImage::LockImage() { @@ -1016,7 +1007,7 @@ VectorImage::LockImage() } //****************************************************************************** -/* void unlockImage() */ + NS_IMETHODIMP VectorImage::UnlockImage() { @@ -1042,7 +1033,7 @@ VectorImage::UnlockImage() } //****************************************************************************** -/* void requestDiscard() */ + NS_IMETHODIMP VectorImage::RequestDiscard() { @@ -1067,7 +1058,6 @@ VectorImage::OnSurfaceDiscarded() } //****************************************************************************** -/* void resetAnimation (); */ NS_IMETHODIMP VectorImage::ResetAnimation() { @@ -1097,7 +1087,6 @@ VectorImage::GetFrameIndex(uint32_t aWhichFrame) // nsIRequestObserver methods //****************************************************************************** -/* void onStartRequest(in nsIRequest request, in nsISupports ctxt); */ NS_IMETHODIMP VectorImage::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt) { diff --git a/image/decoders/nsBMPDecoder.cpp b/image/decoders/nsBMPDecoder.cpp index dbccfe30d1..4c70262370 100644 --- a/image/decoders/nsBMPDecoder.cpp +++ b/image/decoders/nsBMPDecoder.cpp @@ -140,7 +140,7 @@ nsBMPDecoder::FinishInternal() MOZ_ASSERT(GetFrameCount() <= 1, "Multiple BMP frames?"); // Send notifications if appropriate - if (!IsSizeDecode() && HasSize()) { + if (!IsMetadataDecode() && HasSize()) { // Invalidate nsIntRect r(0, 0, mBIH.width, GetHeight()); @@ -368,9 +368,8 @@ nsBMPDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) return; } - // We have the size. If we're doing a size decode, we got what - // we came for. - if (IsSizeDecode()) { + // We have the size. If we're doing a metadata decode, we're done. + if (IsMetadataDecode()) { return; } diff --git a/image/decoders/nsBMPDecoder.h b/image/decoders/nsBMPDecoder.h index 46ce442788..c471db97d9 100644 --- a/image/decoders/nsBMPDecoder.h +++ b/image/decoders/nsBMPDecoder.h @@ -22,8 +22,6 @@ class RasterImage; class nsBMPDecoder : public Decoder { public: - - explicit nsBMPDecoder(RasterImage* aImage); ~nsBMPDecoder(); // Specifies whether or not the BMP file will contain alpha data @@ -55,6 +53,12 @@ public: virtual void FinishInternal() override; private: + friend class DecoderFactory; + friend class nsICODecoder; + + // Decoders should only be instantiated via DecoderFactory. + // XXX(seth): nsICODecoder is temporarily an exception to this rule. + explicit nsBMPDecoder(RasterImage* aImage); /// Calculates the red-, green- and blueshift in mBitFields using /// the bitmasks from mBitFields diff --git a/image/decoders/nsGIFDecoder2.cpp b/image/decoders/nsGIFDecoder2.cpp index a4c2908c61..bfdf8c5060 100644 --- a/image/decoders/nsGIFDecoder2.cpp +++ b/image/decoders/nsGIFDecoder2.cpp @@ -103,7 +103,7 @@ nsGIFDecoder2::FinishInternal() MOZ_ASSERT(!HasError(), "Shouldn't call FinishInternal after error!"); // If the GIF got cut off, handle it anyway - if (!IsSizeDecode() && mGIFOpen) { + if (!IsMetadataDecode() && mGIFOpen) { if (mCurrentFrameIndex == mGIFStruct.images_decoded) { EndImageFrame(); } @@ -689,7 +689,7 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount) mGIFStruct.screen_height = GETINT16(q + 2); mGIFStruct.global_colormap_depth = (q[4]&0x07) + 1; - if (IsSizeDecode()) { + if (IsMetadataDecode()) { MOZ_ASSERT(!mGIFOpen, "Gif should not be open at this point"); PostSize(mGIFStruct.screen_width, mGIFStruct.screen_height); return; @@ -901,6 +901,13 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount) break; case gif_image_header: { + if (mGIFStruct.images_decoded > 0 && IsFirstFrameDecode()) { + // We're about to get a second frame, but we only want the first. Stop + // decoding now. + mGIFStruct.state = gif_done; + break; + } + // Get image offsets, with respect to the screen origin mGIFStruct.x_offset = GETINT16(q); mGIFStruct.y_offset = GETINT16(q + 2); @@ -929,8 +936,8 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount) return; } - // If we were doing a size decode, we're done - if (IsSizeDecode()) { + // If we were doing a metadata decode, we're done. + if (IsMetadataDecode()) { return; } } @@ -1090,7 +1097,8 @@ nsGIFDecoder2::WriteInternal(const char* aBuffer, uint32_t aCount) break; case gif_done: - MOZ_ASSERT(!IsSizeDecode(), "Size decodes shouldn't reach gif_done"); + MOZ_ASSERT(!IsMetadataDecode(), + "Metadata decodes shouldn't reach gif_done"); FinishInternal(); goto done; diff --git a/image/decoders/nsGIFDecoder2.h b/image/decoders/nsGIFDecoder2.h index 956c9de613..ca5a4223a6 100644 --- a/image/decoders/nsGIFDecoder2.h +++ b/image/decoders/nsGIFDecoder2.h @@ -22,8 +22,6 @@ class RasterImage; class nsGIFDecoder2 : public Decoder { public: - - explicit nsGIFDecoder2(RasterImage* aImage); ~nsGIFDecoder2(); virtual void WriteInternal(const char* aBuffer, uint32_t aCount) override; @@ -31,9 +29,13 @@ public: virtual Telemetry::ID SpeedHistogram() override; private: + friend class DecoderFactory; + + // Decoders should only be instantiated via DecoderFactory. + explicit nsGIFDecoder2(RasterImage* aImage); + // These functions will be called when the decoder has a decoded row, // frame size information, etc. - void BeginGIF(); nsresult BeginImageFrame(uint16_t aDepth); void EndImageFrame(); diff --git a/image/decoders/nsICODecoder.cpp b/image/decoders/nsICODecoder.cpp index 1ead667d8e..bbe6ab417c 100644 --- a/image/decoders/nsICODecoder.cpp +++ b/image/decoders/nsICODecoder.cpp @@ -266,9 +266,10 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount) } uint16_t colorDepth = 0; - nsIntSize prefSize = mImage->GetRequestedResolution(); - if (prefSize.width == 0 && prefSize.height == 0) { - prefSize.SizeTo(PREFICONSIZE, PREFICONSIZE); + + // If we didn't get a #-moz-resolution, default to PREFICONSIZE. + if (mResolution.width == 0 && mResolution.height == 0) { + mResolution.SizeTo(PREFICONSIZE, PREFICONSIZE); } // A measure of the difference in size between the entry we've found @@ -306,8 +307,8 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount) // Calculate the delta between this image's size and the desired size, // so we can see if it is better than our current-best option. // In the case of several equally-good images, we use the last one. - int32_t delta = (e.mWidth == 0 ? 256 : e.mWidth) - prefSize.width + - (e.mHeight == 0 ? 256 : e.mHeight) - prefSize.height; + int32_t delta = (e.mWidth == 0 ? 256 : e.mWidth) - mResolution.width + + (e.mHeight == 0 ? 256 : e.mHeight) - mResolution.height; if (e.mBitCount >= colorDepth && ((diff < 0 && delta >= diff) || (delta >= 0 && delta <= diff))) { diff = delta; @@ -358,8 +359,11 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount) PNGSIGNATURESIZE); if (mIsPNG) { mContainedDecoder = new nsPNGDecoder(mImage); - mContainedDecoder->SetSizeDecode(IsSizeDecode()); + mContainedDecoder->SetMetadataDecode(IsMetadataDecode()); mContainedDecoder->SetSendPartialInvalidations(mSendPartialInvalidations); + if (mFirstFrameDecode) { + mContainedDecoder->SetIsFirstFrameDecode(); + } mContainedDecoder->Init(); if (!WriteToContainedDecoder(mSignature, PNGSIGNATURESIZE)) { return; @@ -384,7 +388,7 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount) // Raymond Chen says that 32bpp only are valid PNG ICOs // http://blogs.msdn.com/b/oldnewthing/archive/2010/10/22/10079192.aspx - if (!IsSizeDecode() && + if (!IsMetadataDecode() && !static_cast(mContainedDecoder.get())->IsValidICO()) { PostDataError(); } @@ -435,8 +439,11 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount) nsBMPDecoder* bmpDecoder = new nsBMPDecoder(mImage); mContainedDecoder = bmpDecoder; bmpDecoder->SetUseAlphaData(true); - mContainedDecoder->SetSizeDecode(IsSizeDecode()); + mContainedDecoder->SetMetadataDecode(IsMetadataDecode()); mContainedDecoder->SetSendPartialInvalidations(mSendPartialInvalidations); + if (mFirstFrameDecode) { + mContainedDecoder->SetIsFirstFrameDecode(); + } mContainedDecoder->Init(); // The ICO format when containing a BMP does not include the 14 byte @@ -470,9 +477,8 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount) PostSize(mContainedDecoder->GetImageMetadata().GetWidth(), mContainedDecoder->GetImageMetadata().GetHeight()); - // We have the size. If we're doing a size decode, we got what - // we came for. - if (IsSizeDecode()) { + // We have the size. If we're doing a metadata decode, we're done. + if (IsMetadataDecode()) { return; } diff --git a/image/decoders/nsICODecoder.h b/image/decoders/nsICODecoder.h index a71822b659..27bf7e6055 100644 --- a/image/decoders/nsICODecoder.h +++ b/image/decoders/nsICODecoder.h @@ -22,8 +22,6 @@ class RasterImage; class nsICODecoder : public Decoder { public: - - explicit nsICODecoder(RasterImage* aImage); virtual ~nsICODecoder(); // Obtains the width of the icon directory entry @@ -38,11 +36,21 @@ public: return mDirEntry.mHeight == 0 ? 256 : mDirEntry.mHeight; } + virtual void SetResolution(const gfx::IntSize& aResolution) override + { + mResolution = aResolution; + } + virtual void WriteInternal(const char* aBuffer, uint32_t aCount) override; virtual void FinishInternal() override; virtual void FinishWithErrorInternal() override; private: + friend class DecoderFactory; + + // Decoders should only be instantiated via DecoderFactory. + explicit nsICODecoder(RasterImage* aImage); + // Writes to the contained decoder and sets the appropriate errors // Returns true if there are no errors. bool WriteToContainedDecoder(const char* aBuffer, uint32_t aCount); @@ -74,6 +82,7 @@ private: // Obtains the number of colors from the BPP, mBPP must be filled in uint16_t GetNumColors(); + gfx::IntSize mResolution; // The requested -moz-resolution for this icon. uint16_t mBPP; // Stores the images BPP uint32_t mPos; // Keeps track of the position we have decoded up until uint16_t mNumIcons; // Stores the number of icons in the ICO file diff --git a/image/decoders/nsIconDecoder.cpp b/image/decoders/nsIconDecoder.cpp index 661183259c..a14a4add05 100644 --- a/image/decoders/nsIconDecoder.cpp +++ b/image/decoders/nsIconDecoder.cpp @@ -67,8 +67,8 @@ nsIconDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) return; } - // If We're doing a size decode, we're done - if (IsSizeDecode()) { + // If we're doing a metadata decode, we're done. + if (IsMetadataDecode()) { mState = iconStateFinished; break; } diff --git a/image/decoders/nsIconDecoder.h b/image/decoders/nsIconDecoder.h index 42ae2591b3..78bef54671 100644 --- a/image/decoders/nsIconDecoder.h +++ b/image/decoders/nsIconDecoder.h @@ -37,12 +37,17 @@ class RasterImage; class nsIconDecoder : public Decoder { public: - - explicit nsIconDecoder(RasterImage* aImage); virtual ~nsIconDecoder(); virtual void WriteInternal(const char* aBuffer, uint32_t aCount) override; +private: + friend class DecoderFactory; + + // Decoders should only be instantiated via DecoderFactory. + explicit nsIconDecoder(RasterImage* aImage); + +public: uint8_t mWidth; uint8_t mHeight; uint32_t mPixBytesRead; diff --git a/image/decoders/nsJPEGDecoder.cpp b/image/decoders/nsJPEGDecoder.cpp index 28fe3f9a54..0b3f452599 100644 --- a/image/decoders/nsJPEGDecoder.cpp +++ b/image/decoders/nsJPEGDecoder.cpp @@ -85,6 +85,7 @@ nsJPEGDecoder::nsJPEGDecoder(RasterImage* aImage, Decoder::DecodeStyle aDecodeStyle) : Decoder(aImage) , mDecodeStyle(aDecodeStyle) + , mSampleSize(0) { mState = JPEG_HEADER; mReading = true; @@ -196,7 +197,7 @@ nsJPEGDecoder::FinishInternal() // If we're not in any sort of error case, force our state to JPEG_DONE. if ((mState != JPEG_DONE && mState != JPEG_SINK_NON_JPEG_TRAILER) && (mState != JPEG_ERROR) && - !IsSizeDecode()) { + !IsMetadataDecode()) { mState = JPEG_DONE; } } @@ -249,10 +250,10 @@ nsJPEGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) return; // I/O suspension } - int sampleSize = mImage->GetRequestedSampleSize(); - if (sampleSize > 0) { + // If we have a sample size specified for -moz-sample-size, use it. + if (mSampleSize > 0) { mInfo.scale_num = 1; - mInfo.scale_denom = sampleSize; + mInfo.scale_denom = mSampleSize; } // Used to set up image size so arrays can be allocated @@ -267,8 +268,8 @@ nsJPEGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) return; } - // If we're doing a size decode, we're done. - if (IsSizeDecode()) { + // If we're doing a metadata decode, we're done. + if (IsMetadataDecode()) { return; } diff --git a/image/decoders/nsJPEGDecoder.h b/image/decoders/nsJPEGDecoder.h index 7904f2570f..d476b43e32 100644 --- a/image/decoders/nsJPEGDecoder.h +++ b/image/decoders/nsJPEGDecoder.h @@ -53,11 +53,15 @@ struct Orientation; class nsJPEGDecoder : public Decoder { public: - nsJPEGDecoder(RasterImage* aImage, Decoder::DecodeStyle aDecodeStyle); virtual ~nsJPEGDecoder(); virtual nsresult SetTargetSize(const nsIntSize& aSize) override; + virtual void SetSampleSize(int aSampleSize) override + { + mSampleSize = aSampleSize; + } + virtual void InitInternal() override; virtual void WriteInternal(const char* aBuffer, uint32_t aCount) override; virtual void FinishInternal() override; @@ -71,6 +75,12 @@ protected: Maybe mDownscaler; +private: + friend class DecoderFactory; + + // Decoders should only be instantiated via DecoderFactory. + nsJPEGDecoder(RasterImage* aImage, Decoder::DecodeStyle aDecodeStyle); + public: struct jpeg_decompress_struct mInfo; struct jpeg_source_mgr mSourceMgr; @@ -98,6 +108,8 @@ public: const Decoder::DecodeStyle mDecodeStyle; uint32_t mCMSMode; + + int mSampleSize; }; } // namespace image diff --git a/image/decoders/nsJXRDecoder.cpp b/image/decoders/nsJXRDecoder.cpp index b5d073aa41..a41bfa8eb6 100644 --- a/image/decoders/nsJXRDecoder.cpp +++ b/image/decoders/nsJXRDecoder.cpp @@ -2599,7 +2599,7 @@ void nsJXRDecoder::WriteInternal(const char *aBuffer, uint32_t aCount) // We have the size. If we're doing a size decode, we got what // we came for. - if (IsSizeDecode()) + if (IsMetadataDecode()) return; CreateColorTransform(); @@ -2671,7 +2671,7 @@ void nsJXRDecoder::FinishInternal() //MOZ_ASSERT(GetFrameCount() <= 1, "Multiple JPEG-XR frames?"); // Send notifications if appropriate - if (!IsSizeDecode() && HasSize()) + if (!IsMetadataDecode() && HasSize()) { if (DecodeAtEnd()) { diff --git a/image/decoders/nsJXRDecoder.h b/image/decoders/nsJXRDecoder.h index 8cb002b081..922848668b 100644 --- a/image/decoders/nsJXRDecoder.h +++ b/image/decoders/nsJXRDecoder.h @@ -51,8 +51,6 @@ class RasterImage; class nsJXRDecoder : public Decoder { public: - - nsJXRDecoder(RasterImage* aImage, bool hasBeenDecoded); ~nsJXRDecoder(); virtual void InitInternal(); @@ -60,6 +58,10 @@ public: virtual void FinishInternal(); private: + friend class DecoderFactory; + + // Decoders should only be instantiated via DecoderFactory. + nsJXRDecoder(RasterImage* aImage, bool hasBeenDecoded); tagPKImageDecode *m_pDecoder; tagPKFormatConverter *m_pConverter; diff --git a/image/decoders/nsPNGDecoder.cpp b/image/decoders/nsPNGDecoder.cpp index 5f5e7a96ee..56ec234b00 100644 --- a/image/decoders/nsPNGDecoder.cpp +++ b/image/decoders/nsPNGDecoder.cpp @@ -54,7 +54,7 @@ GetPNGDecoderAccountingLog() # define MOZ_PNG_MAX_PIX 268435456 // 256 Mpix = 16Ki x 16Ki #endif -// For size decodes +// For metadata decodes. #define WIDTH_OFFSET 16 #define HEIGHT_OFFSET (WIDTH_OFFSET + 4) #define BYTES_NEEDED_FOR_DIMENSIONS (HEIGHT_OFFSET + 4) @@ -122,6 +122,7 @@ nsPNGDecoder::nsPNGDecoder(RasterImage* aImage) mHeaderBytesRead(0), mCMSMode(0), mChannels(0), mFrameIsHidden(false), mDisablePremultipliedAlpha(false), + mSuccessfulEarlyFinish(false), mNumFrames(0) { } @@ -183,9 +184,8 @@ nsPNGDecoder::CreateFrame(png_uint_32 aXOffset, png_uint_32 aYOffset, MOZ_LOG(GetPNGDecoderAccountingLog(), LogLevel::Debug, ("PNGDecoderAccounting: nsPNGDecoder::CreateFrame -- created " - "image frame with %dx%d pixels in container %p", - aWidth, aHeight, - &mImage)); + "image frame with %dx%d pixels for decoder %p", + aWidth, aHeight, this)); #ifdef PNG_APNG_SUPPORTED if (png_get_valid(mPNG, mInfo, PNG_INFO_acTL)) { @@ -233,8 +233,8 @@ nsPNGDecoder::EndImageFrame() void nsPNGDecoder::InitInternal() { - // For size decodes, we don't need to initialize the png decoder - if (IsSizeDecode()) { + // For metadata decodes, we don't need to initialize the PNG decoder. + if (IsMetadataDecode()) { return; } @@ -337,8 +337,8 @@ nsPNGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) { MOZ_ASSERT(!HasError(), "Shouldn't call WriteInternal after error!"); - // If we only want width/height, we don't need to go through libpng - if (IsSizeDecode()) { + // If we only want width/height, we don't need to go through libpng. + if (IsMetadataDecode()) { // Are we done? if (mHeaderBytesRead == BYTES_NEEDED_FOR_DIMENSIONS) { @@ -392,7 +392,7 @@ nsPNGDecoder::WriteInternal(const char* aBuffer, uint32_t aCount) // We might not really know what caused the error, but it makes more // sense to blame the data. - if (!HasError()) { + if (!mSuccessfulEarlyFinish && !HasError()) { PostDataError(); } @@ -846,6 +846,14 @@ nsPNGDecoder::frame_info_callback(png_structp png_ptr, png_uint_32 frame_num) // old frame is done decoder->EndImageFrame(); + if (!decoder->mFrameIsHidden && decoder->IsFirstFrameDecode()) { + // We're about to get a second non-hidden frame, but we only want the first. + // Stop decoding now. + decoder->PostDecodeDone(); + decoder->mSuccessfulEarlyFinish = true; + png_longjmp(decoder->mPNG, 1); + } + // Only the first frame can be hidden, so unhide unconditionally here. decoder->mFrameIsHidden = false; diff --git a/image/decoders/nsPNGDecoder.h b/image/decoders/nsPNGDecoder.h index ac2bf3cae0..af8fdf365d 100644 --- a/image/decoders/nsPNGDecoder.h +++ b/image/decoders/nsPNGDecoder.h @@ -24,7 +24,6 @@ class RasterImage; class nsPNGDecoder : public Decoder { public: - explicit nsPNGDecoder(RasterImage* aImage); virtual ~nsPNGDecoder(); virtual void InitInternal() override; @@ -67,6 +66,14 @@ public: } } +private: + friend class DecoderFactory; + friend class nsICODecoder; + + // Decoders should only be instantiated via DecoderFactory. + // XXX(seth): nsICODecoder is temporarily an exception to this rule. + explicit nsPNGDecoder(RasterImage* aImage); + public: png_structp mPNG; png_infop mInfo; @@ -78,7 +85,7 @@ public: gfx::SurfaceFormat format; - // For size decodes + // For metadata decodes. uint8_t mSizeBytes[8]; // Space for width and height, both 4 bytes uint32_t mHeaderBytesRead; @@ -88,6 +95,7 @@ public: uint8_t mChannels; bool mFrameIsHidden; bool mDisablePremultipliedAlpha; + bool mSuccessfulEarlyFinish; struct AnimFrameInfo { diff --git a/image/decoders/nsWEBPDecoder.cpp b/image/decoders/nsWEBPDecoder.cpp index a428330410..deac1c8f78 100644 --- a/image/decoders/nsWEBPDecoder.cpp +++ b/image/decoders/nsWEBPDecoder.cpp @@ -65,7 +65,7 @@ nsWEBPDecoder::FinishInternal() MOZ_ASSERT(GetFrameCount() <= 1, "Multiple WebP frames?"); // Send notifications if appropriate - if (!IsSizeDecode() && (GetFrameCount() == 1)) { + if (!IsMetadataDecode() && (GetFrameCount() == 1)) { PostFrameStop(); PostDecodeDone(); } @@ -115,7 +115,7 @@ nsWEBPDecoder::WriteInternal(const char *aBuffer, uint32_t aCount) if (!HasSize()) PostSize(width, height); - if (IsSizeDecode()) + if (IsMetadataDecode()) return; // The only valid format for WebP decoding for both alpha and non-alpha diff --git a/image/decoders/nsWEBPDecoder.h b/image/decoders/nsWEBPDecoder.h index 754ed5faa9..ee61b95af4 100644 --- a/image/decoders/nsWEBPDecoder.h +++ b/image/decoders/nsWEBPDecoder.h @@ -21,13 +21,17 @@ class RasterImage; class nsWEBPDecoder : public Decoder { public: - nsWEBPDecoder(RasterImage* aImage); - ~nsWEBPDecoder() override; + virtual ~nsWEBPDecoder(); void InitInternal() override; void WriteInternal(const char* aBuffer, uint32_t aCount) override; void FinishInternal() override; private: + friend class DecoderFactory; + + // Decoders should only be instantiated via DecoderFactory. + explicit nsWEBPDecoder(RasterImage* aImage); + WebPIDecoder *mDecoder; uint8_t *mData; // Pointer to WebP-decoded data. int mPreviousLastLine; // Last image scan-line read so far. diff --git a/image/encoders/jpeg/nsJPEGEncoder.cpp b/image/encoders/jpeg/nsJPEGEncoder.cpp index 4d04b3e2fe..998e85d05d 100644 --- a/image/encoders/jpeg/nsJPEGEncoder.cpp +++ b/image/encoders/jpeg/nsJPEGEncoder.cpp @@ -238,7 +238,6 @@ nsJPEGEncoder::EndImageEncode() } -/* void close (); */ NS_IMETHODIMP nsJPEGEncoder::Close() { @@ -252,7 +251,6 @@ nsJPEGEncoder::Close() return NS_OK; } -/* unsigned long available (); */ NS_IMETHODIMP nsJPEGEncoder::Available(uint64_t* _retval) { @@ -264,7 +262,6 @@ nsJPEGEncoder::Available(uint64_t* _retval) return NS_OK; } -/* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */ NS_IMETHODIMP nsJPEGEncoder::Read(char* aBuf, uint32_t aCount, uint32_t* _retval) { @@ -302,7 +299,6 @@ nsJPEGEncoder::ReadSegments(nsWriteSegmentFun aWriter, return NS_OK; } -/* boolean isNonBlocking (); */ NS_IMETHODIMP nsJPEGEncoder::IsNonBlocking(bool* _retval) { diff --git a/image/encoders/png/nsPNGEncoder.cpp b/image/encoders/png/nsPNGEncoder.cpp index 028aff6ed8..f3340860e6 100644 --- a/image/encoders/png/nsPNGEncoder.cpp +++ b/image/encoders/png/nsPNGEncoder.cpp @@ -524,7 +524,6 @@ nsPNGEncoder::ParseOptions(const nsAString& aOptions, } -/* void close (); */ NS_IMETHODIMP nsPNGEncoder::Close() { @@ -538,7 +537,6 @@ nsPNGEncoder::Close() return NS_OK; } -/* unsigned long available (); */ NS_IMETHODIMP nsPNGEncoder::Available(uint64_t* _retval) { @@ -592,7 +590,6 @@ nsPNGEncoder::ReadSegments(nsWriteSegmentFun aWriter, return NS_OK; } -/* boolean isNonBlocking (); */ NS_IMETHODIMP nsPNGEncoder::IsNonBlocking(bool* _retval) { diff --git a/image/imgFrame.cpp b/image/imgFrame.cpp index 93d75f677c..11e2f7d71d 100644 --- a/image/imgFrame.cpp +++ b/image/imgFrame.cpp @@ -140,12 +140,12 @@ imgFrame::imgFrame() , mBlendMethod(BlendMethod::OVER) , mHasNoAlpha(false) , mAborted(false) + , mOptimizable(false) , mPalettedImageData(nullptr) , mPaletteDepth(0) , mNonPremult(false) , mSinglePixel(false) , mCompositingFailed(false) - , mOptimizable(false) { static bool hasCheckedOptimize = false; if (!hasCheckedOptimize) { @@ -958,8 +958,8 @@ imgFrame::UnlockImageData() void imgFrame::SetOptimizable() { - MOZ_ASSERT(NS_IsMainThread()); AssertImageDataLocked(); + MonitorAutoLock lock(mMonitor); mOptimizable = true; } diff --git a/image/imgFrame.h b/image/imgFrame.h index 9c9a026212..769fa13201 100644 --- a/image/imgFrame.h +++ b/image/imgFrame.h @@ -342,6 +342,7 @@ private: // data bool mHasNoAlpha; bool mAborted; + bool mOptimizable; ////////////////////////////////////////////////////////////////////////////// @@ -371,7 +372,6 @@ private: // data bool mSinglePixel; bool mCompositingFailed; - bool mOptimizable; }; /** diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp index badd10fcb3..4598f34edb 100644 --- a/image/imgLoader.cpp +++ b/image/imgLoader.cpp @@ -41,6 +41,7 @@ #include "nsIApplicationCacheContainer.h" #include "nsIMemoryReporter.h" +#include "DecoderFactory.h" #include "Image.h" #include "gfxPrefs.h" #include "prtime.h" @@ -1365,7 +1366,6 @@ void imgLoader::ReadAcceptHeaderPref() } } -/* void clearCache (in boolean chrome); */ NS_IMETHODIMP imgLoader::ClearCache(bool chrome) { @@ -1376,7 +1376,6 @@ imgLoader::ClearCache(bool chrome) } } -/* void removeEntry(in nsIURI uri); */ NS_IMETHODIMP imgLoader::RemoveEntry(nsIURI* aURI) { @@ -1387,7 +1386,6 @@ imgLoader::RemoveEntry(nsIURI* aURI) return NS_ERROR_NOT_AVAILABLE; } -/* imgIRequest findEntry(in nsIURI uri); */ NS_IMETHODIMP imgLoader::FindEntryProperties(nsIURI* uri, nsIProperties** _retval) { @@ -2544,7 +2542,8 @@ imgLoader::SupportImageWithMimeType(const char* aMimeType, return true; } - return Image::GetDecoderType(mimeType.get()) != Image::eDecoderType_unknown; + DecoderType type = DecoderFactory::GetDecoderType(mimeType.get()); + return type != DecoderType::UNKNOWN; } NS_IMETHODIMP @@ -2820,7 +2819,6 @@ ProxyListener::~ProxyListener() /** nsIRequestObserver methods **/ -/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */ NS_IMETHODIMP ProxyListener::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) { @@ -2973,7 +2971,6 @@ imgCacheValidator::RemoveProxy(imgRequestProxy* aProxy) /** nsIRequestObserver methods **/ -/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */ NS_IMETHODIMP imgCacheValidator::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) { diff --git a/image/imgRequest.cpp b/image/imgRequest.cpp index 333c422b36..a9168609e9 100644 --- a/image/imgRequest.cpp +++ b/image/imgRequest.cpp @@ -714,7 +714,6 @@ imgRequest::GetMultipart() const /** nsIRequestObserver methods **/ -/* void onStartRequest (in nsIRequest request, in nsISupports ctxt); */ NS_IMETHODIMP imgRequest::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) { diff --git a/image/imgRequestProxy.cpp b/image/imgRequestProxy.cpp index db4063c976..9d616ab067 100644 --- a/image/imgRequestProxy.cpp +++ b/image/imgRequestProxy.cpp @@ -281,7 +281,6 @@ imgRequestProxy::RemoveFromLoadGroup(bool releaseLoadGroup) /** nsIRequest / imgIRequest methods **/ -/* readonly attribute wstring name; */ NS_IMETHODIMP imgRequestProxy::GetName(nsACString& aName) { @@ -294,21 +293,18 @@ imgRequestProxy::GetName(nsACString& aName) return NS_OK; } -/* boolean isPending (); */ NS_IMETHODIMP imgRequestProxy::IsPending(bool* _retval) { return NS_ERROR_NOT_IMPLEMENTED; } -/* readonly attribute nsresult status; */ NS_IMETHODIMP imgRequestProxy::GetStatus(nsresult* aStatus) { return NS_ERROR_NOT_IMPLEMENTED; } -/* void cancel (in nsresult status); */ NS_IMETHODIMP imgRequestProxy::Cancel(nsresult status) { @@ -334,7 +330,6 @@ imgRequestProxy::DoCancel(nsresult status) NullOutListener(); } -/* void cancelAndForgetObserver (in nsresult aStatus); */ NS_IMETHODIMP imgRequestProxy::CancelAndForgetObserver(nsresult aStatus) { @@ -378,7 +373,6 @@ imgRequestProxy::CancelAndForgetObserver(nsresult aStatus) return NS_OK; } -/* void startDecode (); */ NS_IMETHODIMP imgRequestProxy::StartDecoding() { @@ -397,7 +391,6 @@ imgRequestProxy::StartDecoding() return NS_OK; } -/* void requestDecode (); */ NS_IMETHODIMP imgRequestProxy::RequestDecode() { @@ -417,7 +410,6 @@ imgRequestProxy::RequestDecode() } -/* void lockImage (); */ NS_IMETHODIMP imgRequestProxy::LockImage() { @@ -429,7 +421,6 @@ imgRequestProxy::LockImage() return NS_OK; } -/* void unlockImage (); */ NS_IMETHODIMP imgRequestProxy::UnlockImage() { @@ -443,7 +434,6 @@ imgRequestProxy::UnlockImage() return NS_OK; } -/* void requestDiscard (); */ NS_IMETHODIMP imgRequestProxy::RequestDiscard() { @@ -492,21 +482,18 @@ imgRequestProxy::ClearAnimationConsumers() } } -/* void suspend (); */ NS_IMETHODIMP imgRequestProxy::Suspend() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void resume (); */ NS_IMETHODIMP imgRequestProxy::Resume() { return NS_ERROR_NOT_IMPLEMENTED; } -/* attribute nsILoadGroup loadGroup */ NS_IMETHODIMP imgRequestProxy::GetLoadGroup(nsILoadGroup** loadGroup) { @@ -520,7 +507,6 @@ imgRequestProxy::SetLoadGroup(nsILoadGroup* loadGroup) return NS_OK; } -/* attribute nsLoadFlags loadFlags */ NS_IMETHODIMP imgRequestProxy::GetLoadFlags(nsLoadFlags* flags) { @@ -536,7 +522,6 @@ imgRequestProxy::SetLoadFlags(nsLoadFlags flags) /** imgIRequest methods **/ -/* attribute imgIContainer image; */ NS_IMETHODIMP imgRequestProxy::GetImage(imgIContainer** aImage) { @@ -562,7 +547,6 @@ imgRequestProxy::GetImage(imgIContainer** aImage) return NS_OK; } -/* readonly attribute unsigned long imageStatus; */ NS_IMETHODIMP imgRequestProxy::GetImageStatus(uint32_t* aStatus) { @@ -572,7 +556,6 @@ imgRequestProxy::GetImageStatus(uint32_t* aStatus) return NS_OK; } -/* readonly attribute nresult imageErrorCode; */ NS_IMETHODIMP imgRequestProxy::GetImageErrorCode(nsresult* aStatus) { @@ -585,7 +568,6 @@ imgRequestProxy::GetImageErrorCode(nsresult* aStatus) return NS_OK; } -/* readonly attribute nsIURI URI; */ NS_IMETHODIMP imgRequestProxy::GetURI(nsIURI** aURI) { @@ -617,7 +599,6 @@ imgRequestProxy::GetURI(ImageURL** aURI) return NS_OK; } -/* readonly attribute imgINotificationObserver notificationObserver; */ NS_IMETHODIMP imgRequestProxy::GetNotificationObserver(imgINotificationObserver** aObserver) { @@ -626,7 +607,6 @@ imgRequestProxy::GetNotificationObserver(imgINotificationObserver** aObserver) return NS_OK; } -/* readonly attribute string mimeType; */ NS_IMETHODIMP imgRequestProxy::GetMimeType(char** aMimeType) { @@ -716,7 +696,6 @@ imgRequestProxy::PerformClone(imgINotificationObserver* aObserver, return NS_OK; } -/* readonly attribute nsIPrincipal imagePrincipal; */ NS_IMETHODIMP imgRequestProxy::GetImagePrincipal(nsIPrincipal** aPrincipal) { @@ -728,7 +707,6 @@ imgRequestProxy::GetImagePrincipal(nsIPrincipal** aPrincipal) return NS_OK; } -/* readonly attribute bool multipart; */ NS_IMETHODIMP imgRequestProxy::GetMultipart(bool* aMultipart) { @@ -741,7 +719,6 @@ imgRequestProxy::GetMultipart(bool* aMultipart) return NS_OK; } -/* readonly attribute int32_t CORSMode; */ NS_IMETHODIMP imgRequestProxy::GetCORSMode(int32_t* aCorsMode) { diff --git a/image/imgTools.cpp b/image/imgTools.cpp index 1cfd23bad4..5fd101fa4e 100644 --- a/image/imgTools.cpp +++ b/image/imgTools.cpp @@ -61,6 +61,8 @@ imgTools::DecodeImage(nsIInputStream* aInStr, const nsACString& aMimeType, imgIContainer** aContainer) { + MOZ_ASSERT(NS_IsMainThread()); + nsresult rv; NS_ENSURE_ARG_POINTER(aInStr); diff --git a/image/moz.build b/image/moz.build index d4781e3bb7..88ccea8f18 100644 --- a/image/moz.build +++ b/image/moz.build @@ -5,6 +5,11 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. DIRS += ['build', 'decoders', 'encoders'] +if CONFIG['ENABLE_TESTS']: + DIRS += ['test/gtest'] + +with Files('**'): + BUG_COMPONENT = ('Core', 'ImageLib') BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] @@ -49,6 +54,7 @@ UNIFIED_SOURCES += [ 'ClippedImage.cpp', 'DecodePool.cpp', 'Decoder.cpp', + 'DecoderFactory.cpp', 'DynamicImage.cpp', 'FrameAnimator.cpp', 'FrozenImage.cpp', diff --git a/image/test/gtest/Common.cpp b/image/test/gtest/Common.cpp new file mode 100644 index 0000000000..0cd30c61ce --- /dev/null +++ b/image/test/gtest/Common.cpp @@ -0,0 +1,157 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "Common.h" + +#include +#include "gtest/gtest.h" + +#include "nsDirectoryServiceDefs.h" +#include "nsIDirectoryService.h" +#include "nsIFile.h" +#include "nsIInputStream.h" +#include "nsIProperties.h" +#include "nsNetUtil.h" +#include "mozilla/nsRefPtr.h" +#include "nsString.h" + +namespace mozilla { + +using namespace gfx; + +using std::abs; + +/////////////////////////////////////////////////////////////////////////////// +// Helpers +/////////////////////////////////////////////////////////////////////////////// + +// These macros work like gtest's ASSERT_* macros, except that they can be used +// in functions that return values. +#define ASSERT_TRUE_OR_RETURN(e, rv) \ + EXPECT_TRUE(e); \ + if (!(e)) { \ + return rv; \ + } + +#define ASSERT_EQ_OR_RETURN(a, b, rv) \ + EXPECT_EQ(a, b); \ + if ((a) != (b)) { \ + return rv; \ + } + +#define ASSERT_LE_OR_RETURN(a, b, rv) \ + EXPECT_LE(a, b); \ + if (!((a) <= (b))) { \ + return rv; \ + } + +already_AddRefed +LoadFile(const char* aRelativePath) +{ + nsresult rv; + + nsCOMPtr dirService = + do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID); + ASSERT_TRUE_OR_RETURN(dirService != nullptr, nullptr); + + // Retrieve the current working directory. + nsCOMPtr file; + rv = dirService->Get(NS_OS_CURRENT_WORKING_DIR, + NS_GET_IID(nsIFile), getter_AddRefs(file)); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + + // Construct the final path by appending the working path to the current + // working directory. + file->AppendNative(nsAutoCString(aRelativePath)); + + // Construct an input stream for the requested file. + nsCOMPtr inputStream; + rv = NS_NewLocalFileInputStream(getter_AddRefs(inputStream), file); + ASSERT_TRUE_OR_RETURN(NS_SUCCEEDED(rv), nullptr); + + return inputStream.forget(); +} + +bool +IsSolidColor(SourceSurface* aSurface, BGRAColor aColor, bool aFuzzy) +{ + nsRefPtr dataSurface = aSurface->GetDataSurface(); + ASSERT_TRUE_OR_RETURN(dataSurface != nullptr, false); + + ASSERT_EQ_OR_RETURN(dataSurface->Stride(), aSurface->GetSize().width * 4, + false); + + DataSourceSurface::ScopedMap mapping(dataSurface, + DataSourceSurface::MapType::READ); + ASSERT_TRUE_OR_RETURN(mapping.IsMapped(), false); + + uint8_t* data = dataSurface->GetData(); + ASSERT_TRUE_OR_RETURN(data != nullptr, false); + + int32_t length = dataSurface->Stride() * aSurface->GetSize().height; + for (int32_t i = 0 ; i < length ; i += 4) { + if (aFuzzy) { + ASSERT_LE_OR_RETURN(abs(aColor.mBlue - data[i + 0]), 1, false); + ASSERT_LE_OR_RETURN(abs(aColor.mGreen - data[i + 1]), 1, false); + ASSERT_LE_OR_RETURN(abs(aColor.mRed - data[i + 2]), 1, false); + ASSERT_LE_OR_RETURN(abs(aColor.mAlpha - data[i + 3]), 1, false); + } else { + ASSERT_EQ_OR_RETURN(aColor.mBlue, data[i + 0], false); + ASSERT_EQ_OR_RETURN(aColor.mGreen, data[i + 1], false); + ASSERT_EQ_OR_RETURN(aColor.mRed, data[i + 2], false); + ASSERT_EQ_OR_RETURN(aColor.mAlpha, data[i + 3], false); + } + } + + return true; +} + + +/////////////////////////////////////////////////////////////////////////////// +// Test Data +/////////////////////////////////////////////////////////////////////////////// + +ImageTestCase GreenPNGTestCase() +{ + return ImageTestCase("green.png", "image/png", IntSize(100, 100)); +} + +ImageTestCase GreenGIFTestCase() +{ + return ImageTestCase("green.gif", "image/gif", IntSize(100, 100)); +} + +ImageTestCase GreenJPGTestCase() +{ + return ImageTestCase("green.jpg", "image/jpeg", IntSize(100, 100), + /* aFuzzy = */ true); +} + +ImageTestCase GreenBMPTestCase() +{ + return ImageTestCase("green.bmp", "image/bmp", IntSize(100, 100)); +} + +ImageTestCase GreenICOTestCase() +{ + return ImageTestCase("green.ico", "image/x-icon", IntSize(100, 100)); +} + +ImageTestCase GreenFirstFrameAnimatedGIFTestCase() +{ + return ImageTestCase("first-frame-green.gif", "image/gif", IntSize(100, 100)); +} + +ImageTestCase GreenFirstFrameAnimatedPNGTestCase() +{ + return ImageTestCase("first-frame-green.png", "image/png", IntSize(100, 100)); +} + +ImageTestCase CorruptTestCase() +{ + return ImageTestCase("corrupt.jpg", "image/jpeg", IntSize(100, 100)); +} + +} // namespace mozilla diff --git a/image/test/gtest/Common.h b/image/test/gtest/Common.h new file mode 100644 index 0000000000..b9d8efa814 --- /dev/null +++ b/image/test/gtest/Common.h @@ -0,0 +1,91 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_image_test_gtest_Common_h +#define mozilla_image_test_gtest_Common_h + +#include "mozilla/gfx/2D.h" +#include "nsCOMPtr.h" + +class nsIInputStream; + +namespace mozilla { + +/////////////////////////////////////////////////////////////////////////////// +// Types +/////////////////////////////////////////////////////////////////////////////// + +struct ImageTestCase +{ + ImageTestCase(const char* aPath, + const char* aMimeType, + gfx::IntSize aSize, + bool aFuzzy = false) + : mPath(aPath) + , mMimeType(aMimeType) + , mSize(aSize) + , mFuzzy(aFuzzy) + { } + + const char* mPath; + const char* mMimeType; + gfx::IntSize mSize; + bool mFuzzy; +}; + +struct BGRAColor +{ + BGRAColor(uint8_t aBlue, uint8_t aGreen, uint8_t aRed, uint8_t aAlpha) + : mBlue(aBlue) + , mGreen(aGreen) + , mRed(aRed) + , mAlpha(aAlpha) + { } + + static BGRAColor Green() { return BGRAColor(0x00, 0xFF, 0x00, 0xFF); } + + uint8_t mBlue; + uint8_t mGreen; + uint8_t mRed; + uint8_t mAlpha; +}; + + +/////////////////////////////////////////////////////////////////////////////// +// Helpers +/////////////////////////////////////////////////////////////////////////////// + +/// Loads a file from the current directory. @return an nsIInputStream for it. +already_AddRefed LoadFile(const char* aRelativePath); + +/** + * @returns true if every pixel of @aSurface is @aColor. + * + * If @aFuzzy is true, a tolerance of 1 is allowed in each color component. This + * may be necessary for tests that involve JPEG images. + */ +bool IsSolidColor(gfx::SourceSurface* aSurface, + BGRAColor aColor, + bool aFuzzy = false); + + +/////////////////////////////////////////////////////////////////////////////// +// Test Data +/////////////////////////////////////////////////////////////////////////////// + +ImageTestCase GreenPNGTestCase(); +ImageTestCase GreenGIFTestCase(); +ImageTestCase GreenJPGTestCase(); +ImageTestCase GreenBMPTestCase(); +ImageTestCase GreenICOTestCase(); + +ImageTestCase GreenFirstFrameAnimatedGIFTestCase(); +ImageTestCase GreenFirstFrameAnimatedPNGTestCase(); + +ImageTestCase CorruptTestCase(); + +} // namespace mozilla + +#endif // mozilla_image_test_gtest_Common_h diff --git a/image/test/gtest/TestDecodeToSurface.cpp b/image/test/gtest/TestDecodeToSurface.cpp new file mode 100644 index 0000000000..5a4696f8cd --- /dev/null +++ b/image/test/gtest/TestDecodeToSurface.cpp @@ -0,0 +1,119 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "gtest/gtest.h" + +#include "Common.h" +#include "imgIContainer.h" +#include "imgITools.h" +#include "ImageOps.h" +#include "mozilla/gfx/2D.h" +#include "nsComponentManagerUtils.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" +#include "nsIRunnable.h" +#include "nsIThread.h" +#include "mozilla/nsRefPtr.h" +#include "nsString.h" +#include "nsThreadUtils.h" + +using namespace mozilla; +using namespace mozilla::gfx; +using namespace mozilla::image; + + +TEST(ImageDecodeToSurface, ImageModuleAvailable) +{ + // We can run into problems if XPCOM modules get initialized in the wrong + // order. It's important that this test run first, both as a sanity check and + // to ensure we get the module initialization order we want. + nsCOMPtr imgTools = + do_CreateInstance("@mozilla.org/image/tools;1"); + EXPECT_TRUE(imgTools != nullptr); +} + +class DecodeToSurfaceRunnable : public nsRunnable +{ +public: + DecodeToSurfaceRunnable(nsIInputStream* aInputStream, + const ImageTestCase& aTestCase) + : mInputStream(aInputStream) + , mTestCase(aTestCase) + { } + + NS_IMETHOD Run() + { + Go(); + return NS_OK; + } + + void Go() + { + nsRefPtr surface = + ImageOps::DecodeToSurface(mInputStream, + nsAutoCString(mTestCase.mMimeType), + imgIContainer::DECODE_FLAGS_DEFAULT); + ASSERT_TRUE(surface != nullptr); + + EXPECT_EQ(SurfaceType::DATA, surface->GetType()); + EXPECT_TRUE(surface->GetFormat() == SurfaceFormat::B8G8R8X8 || + surface->GetFormat() == SurfaceFormat::B8G8R8A8); + EXPECT_EQ(mTestCase.mSize, surface->GetSize()); + + EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green(), mTestCase.mFuzzy)); + } + +private: + nsCOMPtr mInputStream; + ImageTestCase mTestCase; +}; + +static void +RunDecodeToSurface(const ImageTestCase& aTestCase) +{ + nsCOMPtr inputStream = LoadFile(aTestCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + nsCOMPtr thread; + nsresult rv = NS_NewThread(getter_AddRefs(thread), nullptr); + ASSERT_TRUE(NS_SUCCEEDED(rv)); + + // We run the DecodeToSurface tests off-main-thread to ensure that + // DecodeToSurface doesn't require any main-thread-only code. + nsCOMPtr runnable = + new DecodeToSurfaceRunnable(inputStream, aTestCase); + thread->Dispatch(runnable, nsIThread::DISPATCH_SYNC); + + thread->Shutdown(); +} + +TEST(ImageDecodeToSurface, PNG) { RunDecodeToSurface(GreenPNGTestCase()); } +TEST(ImageDecodeToSurface, GIF) { RunDecodeToSurface(GreenGIFTestCase()); } +TEST(ImageDecodeToSurface, JPG) { RunDecodeToSurface(GreenJPGTestCase()); } +TEST(ImageDecodeToSurface, BMP) { RunDecodeToSurface(GreenBMPTestCase()); } +TEST(ImageDecodeToSurface, ICO) { RunDecodeToSurface(GreenICOTestCase()); } + +TEST(ImageDecodeToSurface, AnimatedGIF) +{ + RunDecodeToSurface(GreenFirstFrameAnimatedGIFTestCase()); +} + +TEST(ImageDecodeToSurface, AnimatedPNG) +{ + RunDecodeToSurface(GreenFirstFrameAnimatedPNGTestCase()); +} + +TEST(ImageDecodeToSurface, Corrupt) +{ + ImageTestCase testCase = CorruptTestCase(); + + nsCOMPtr inputStream = LoadFile(testCase.mPath); + ASSERT_TRUE(inputStream != nullptr); + + nsRefPtr surface = + ImageOps::DecodeToSurface(inputStream, + nsAutoCString(testCase.mMimeType), + imgIContainer::DECODE_FLAGS_DEFAULT); + EXPECT_TRUE(surface == nullptr); +} diff --git a/image/test/gtest/corrupt.jpg b/image/test/gtest/corrupt.jpg new file mode 100644 index 0000000000..555a416d7d Binary files /dev/null and b/image/test/gtest/corrupt.jpg differ diff --git a/image/test/gtest/first-frame-green.gif b/image/test/gtest/first-frame-green.gif new file mode 100644 index 0000000000..cd3c7d3db8 Binary files /dev/null and b/image/test/gtest/first-frame-green.gif differ diff --git a/image/test/gtest/first-frame-green.png b/image/test/gtest/first-frame-green.png new file mode 100644 index 0000000000..115f035d89 Binary files /dev/null and b/image/test/gtest/first-frame-green.png differ diff --git a/image/test/gtest/green.bmp b/image/test/gtest/green.bmp new file mode 100644 index 0000000000..f79dd672ad Binary files /dev/null and b/image/test/gtest/green.bmp differ diff --git a/image/test/gtest/green.gif b/image/test/gtest/green.gif new file mode 100644 index 0000000000..ef215dfc94 Binary files /dev/null and b/image/test/gtest/green.gif differ diff --git a/image/test/gtest/green.ico b/image/test/gtest/green.ico new file mode 100644 index 0000000000..e69de29bb2 diff --git a/image/test/gtest/green.jpg b/image/test/gtest/green.jpg new file mode 100644 index 0000000000..48c454d27c Binary files /dev/null and b/image/test/gtest/green.jpg differ diff --git a/image/test/gtest/green.png b/image/test/gtest/green.png new file mode 100644 index 0000000000..7df25f33bd Binary files /dev/null and b/image/test/gtest/green.png differ diff --git a/image/test/gtest/moz.build b/image/test/gtest/moz.build new file mode 100644 index 0000000000..1a72c4cc89 --- /dev/null +++ b/image/test/gtest/moz.build @@ -0,0 +1,31 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +Library('imagetest') + +FAIL_ON_WARNINGS = True + +UNIFIED_SOURCES = [ + 'Common.cpp', + 'TestDecodeToSurface.cpp', +] + +TEST_HARNESS_FILES.gtest += [ + 'corrupt.jpg', + 'first-frame-green.gif', + 'first-frame-green.png', + 'green.bmp', + 'green.gif', + 'green.ico', + 'green.jpg', + 'green.png', +] + +LOCAL_INCLUDES += [ + '/image', +] + +FINAL_LIBRARY = 'xul-gtest' diff --git a/intl/lwbrk/nsSemanticUnitScanner.cpp b/intl/lwbrk/nsSemanticUnitScanner.cpp index bf51a743fc..8feb738a8c 100644 --- a/intl/lwbrk/nsSemanticUnitScanner.cpp +++ b/intl/lwbrk/nsSemanticUnitScanner.cpp @@ -18,14 +18,12 @@ nsSemanticUnitScanner::~nsSemanticUnitScanner() } -/* void start (in string characterSet); */ NS_IMETHODIMP nsSemanticUnitScanner::Start(const char *characterSet) { // do nothing for now. return NS_OK; } -/* void next (in wstring text, in long length, in long pos, out boolean hasMoreUnits, out long begin, out long end); */ NS_IMETHODIMP nsSemanticUnitScanner::Next(const char16_t *text, int32_t length, int32_t pos, bool isLastBuffer, int32_t *begin, int32_t *end, bool *_retval) { // xxx need to bullet proff and check input pointer diff --git a/intl/strres/nsStringBundle.cpp b/intl/strres/nsStringBundle.cpp index 4dd8db522a..c567f1ff1d 100644 --- a/intl/strres/nsStringBundle.cpp +++ b/intl/strres/nsStringBundle.cpp @@ -182,7 +182,6 @@ nsStringBundle::FormatStringFromName(const char16_t *aName, NS_IMPL_ISUPPORTS(nsStringBundle, nsIStringBundle) -/* void GetStringFromID (in long aID, out wstring aResult); */ NS_IMETHODIMP nsStringBundle::GetStringFromID(int32_t aID, char16_t **aResult) { @@ -202,7 +201,6 @@ nsStringBundle::GetStringFromID(int32_t aID, char16_t **aResult) return NS_OK; } -/* void GetStringFromName (in wstring aName, out wstring aResult); */ NS_IMETHODIMP nsStringBundle::GetStringFromName(const char16_t *aName, char16_t **aResult) { diff --git a/intl/uconv/nsScriptableUConv.cpp b/intl/uconv/nsScriptableUConv.cpp index 8eb46290bb..60e18e9da1 100644 --- a/intl/uconv/nsScriptableUConv.cpp +++ b/intl/uconv/nsScriptableUConv.cpp @@ -61,7 +61,6 @@ nsScriptableUnicodeConverter::ConvertFromUnicodeWithLength(const nsAString& aSrc return NS_ERROR_FAILURE; } -/* ACString ConvertFromUnicode (in AString src); */ NS_IMETHODIMP nsScriptableUnicodeConverter::ConvertFromUnicode(const nsAString& aSrc, nsACString& _retval) @@ -101,7 +100,6 @@ nsScriptableUnicodeConverter::FinishWithLength(char **_retval, int32_t* aLength) } -/* ACString Finish(); */ NS_IMETHODIMP nsScriptableUnicodeConverter::Finish(nsACString& _retval) { @@ -128,7 +126,6 @@ nsScriptableUnicodeConverter::Finish(nsACString& _retval) return rv; } -/* AString ConvertToUnicode (in ACString src); */ NS_IMETHODIMP nsScriptableUnicodeConverter::ConvertToUnicode(const nsACString& aSrc, nsAString& _retval) { @@ -215,7 +212,6 @@ nsScriptableUnicodeConverter::ConvertToByteArray(const nsAString& aString, return NS_OK; } -/* nsIInputStream convertToInputStream(in AString aString); */ NS_IMETHODIMP nsScriptableUnicodeConverter::ConvertToInputStream(const nsAString& aString, nsIInputStream** _retval) @@ -242,7 +238,6 @@ nsScriptableUnicodeConverter::ConvertToInputStream(const nsAString& aString, return rv; } -/* attribute string charset; */ NS_IMETHODIMP nsScriptableUnicodeConverter::GetCharset(char * *aCharset) { diff --git a/js/xpconnect/loader/mozJSComponentLoader.cpp b/js/xpconnect/loader/mozJSComponentLoader.cpp index d9f92aafcc..8da370b72b 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.cpp +++ b/js/xpconnect/loader/mozJSComponentLoader.cpp @@ -1051,7 +1051,6 @@ mozJSComponentLoader::ImportInto(const nsACString& aLocation, return NS_OK; } -/* boolean isModuleLoaded (in AUTF8String registryLocation); */ NS_IMETHODIMP mozJSComponentLoader::IsModuleLoaded(const nsACString& aLocation, bool* retval) diff --git a/js/xpconnect/public/xpc_map_end.h b/js/xpconnect/public/xpc_map_end.h index 8794399d56..1f6f989210 100644 --- a/js/xpconnect/public/xpc_map_end.h +++ b/js/xpconnect/public/xpc_map_end.h @@ -73,7 +73,6 @@ XPC_MAP_CLASSNAME::GetScriptableFlags() /**************************************************************/ #ifndef XPC_MAP_WANT_PRECREATE -/* void preCreate (in nsISupports nativeObj, in JSContextPtr cx, in JSObjectPtr globalObj, out JSObjectPtr parentObj); */ NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports* nativeObj, JSContext * cx, JSObject * globalObj, JSObject * *parentObj) {NS_ERROR("never called"); return NS_ERROR_NOT_IMPLEMENTED;} #endif diff --git a/js/xpconnect/src/XPCCallContext.cpp b/js/xpconnect/src/XPCCallContext.cpp index 7dd5949003..1111b8ef73 100644 --- a/js/xpconnect/src/XPCCallContext.cpp +++ b/js/xpconnect/src/XPCCallContext.cpp @@ -233,7 +233,6 @@ XPCCallContext::~XPCCallContext() } } -/* readonly attribute nsISupports Callee; */ NS_IMETHODIMP XPCCallContext::GetCallee(nsISupports * *aCallee) { @@ -242,7 +241,6 @@ XPCCallContext::GetCallee(nsISupports * *aCallee) return NS_OK; } -/* readonly attribute uint16_t CalleeMethodIndex; */ NS_IMETHODIMP XPCCallContext::GetCalleeMethodIndex(uint16_t* aCalleeMethodIndex) { @@ -250,7 +248,6 @@ XPCCallContext::GetCalleeMethodIndex(uint16_t* aCalleeMethodIndex) return NS_OK; } -/* readonly attribute XPCNativeInterface CalleeInterface; */ NS_IMETHODIMP XPCCallContext::GetCalleeInterface(nsIInterfaceInfo * *aCalleeInterface) { @@ -259,7 +256,6 @@ XPCCallContext::GetCalleeInterface(nsIInterfaceInfo * *aCalleeInterface) return NS_OK; } -/* readonly attribute nsIClassInfo CalleeClassInfo; */ NS_IMETHODIMP XPCCallContext::GetCalleeClassInfo(nsIClassInfo * *aCalleeClassInfo) { @@ -268,7 +264,6 @@ XPCCallContext::GetCalleeClassInfo(nsIClassInfo * *aCalleeClassInfo) return NS_OK; } -/* readonly attribute JSContextPtr JSContext; */ NS_IMETHODIMP XPCCallContext::GetJSContext(JSContext * *aJSContext) { @@ -277,7 +272,6 @@ XPCCallContext::GetJSContext(JSContext * *aJSContext) return NS_OK; } -/* readonly attribute uint32_t Argc; */ NS_IMETHODIMP XPCCallContext::GetArgc(uint32_t* aArgc) { @@ -285,7 +279,6 @@ XPCCallContext::GetArgc(uint32_t* aArgc) return NS_OK; } -/* readonly attribute JSValPtr ArgvPtr; */ NS_IMETHODIMP XPCCallContext::GetArgvPtr(Value** aArgvPtr) { diff --git a/js/xpconnect/src/XPCComponents.cpp b/js/xpconnect/src/XPCComponents.cpp index 383cef71dd..0131cfd779 100644 --- a/js/xpconnect/src/XPCComponents.cpp +++ b/js/xpconnect/src/XPCComponents.cpp @@ -154,7 +154,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_Interfaces::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -162,7 +161,6 @@ nsXPCComponents_Interfaces::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_Interfaces::GetContractID(char * *aContractID) { @@ -170,7 +168,6 @@ nsXPCComponents_Interfaces::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_Interfaces::GetClassDescription(char * *aClassDescription) { @@ -179,7 +176,6 @@ nsXPCComponents_Interfaces::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_Interfaces::GetClassID(nsCID * *aClassID) { @@ -187,7 +183,6 @@ nsXPCComponents_Interfaces::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_Interfaces::GetFlags(uint32_t* aFlags) { @@ -197,7 +192,6 @@ nsXPCComponents_Interfaces::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_Interfaces::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -387,7 +381,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_InterfacesByID::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -395,7 +388,6 @@ nsXPCComponents_InterfacesByID::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_InterfacesByID::GetContractID(char * *aContractID) { @@ -403,7 +395,6 @@ nsXPCComponents_InterfacesByID::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_InterfacesByID::GetClassDescription(char * *aClassDescription) { @@ -412,7 +403,6 @@ nsXPCComponents_InterfacesByID::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_InterfacesByID::GetClassID(nsCID * *aClassID) { @@ -420,7 +410,6 @@ nsXPCComponents_InterfacesByID::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_InterfacesByID::GetFlags(uint32_t* aFlags) { @@ -430,7 +419,6 @@ nsXPCComponents_InterfacesByID::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_InterfacesByID::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -622,7 +610,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_Classes::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -630,7 +617,6 @@ nsXPCComponents_Classes::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_Classes::GetContractID(char * *aContractID) { @@ -638,7 +624,6 @@ nsXPCComponents_Classes::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_Classes::GetClassDescription(char * *aClassDescription) { @@ -647,7 +632,6 @@ nsXPCComponents_Classes::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_Classes::GetClassID(nsCID * *aClassID) { @@ -655,7 +639,6 @@ nsXPCComponents_Classes::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_Classes::GetFlags(uint32_t* aFlags) { @@ -663,7 +646,6 @@ nsXPCComponents_Classes::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_Classes::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -837,7 +819,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_ClassesByID::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -845,7 +826,6 @@ nsXPCComponents_ClassesByID::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_ClassesByID::GetContractID(char * *aContractID) { @@ -853,7 +833,6 @@ nsXPCComponents_ClassesByID::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_ClassesByID::GetClassDescription(char * *aClassDescription) { @@ -862,7 +841,6 @@ nsXPCComponents_ClassesByID::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_ClassesByID::GetClassID(nsCID * *aClassID) { @@ -870,7 +848,6 @@ nsXPCComponents_ClassesByID::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_ClassesByID::GetFlags(uint32_t* aFlags) { @@ -878,7 +855,6 @@ nsXPCComponents_ClassesByID::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_ClassesByID::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -1075,7 +1051,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_Results::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -1083,7 +1058,6 @@ nsXPCComponents_Results::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_Results::GetContractID(char * *aContractID) { @@ -1091,7 +1065,6 @@ nsXPCComponents_Results::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_Results::GetClassDescription(char * *aClassDescription) { @@ -1100,7 +1073,6 @@ nsXPCComponents_Results::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_Results::GetClassID(nsCID * *aClassID) { @@ -1108,7 +1080,6 @@ nsXPCComponents_Results::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_Results::GetFlags(uint32_t* aFlags) { @@ -1118,7 +1089,6 @@ nsXPCComponents_Results::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_Results::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -1273,7 +1243,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_ID::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -1281,7 +1250,6 @@ nsXPCComponents_ID::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_ID::GetContractID(char * *aContractID) { @@ -1289,7 +1257,6 @@ nsXPCComponents_ID::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_ID::GetClassDescription(char * *aClassDescription) { @@ -1298,7 +1265,6 @@ nsXPCComponents_ID::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_ID::GetClassID(nsCID * *aClassID) { @@ -1306,7 +1272,6 @@ nsXPCComponents_ID::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_ID::GetFlags(uint32_t* aFlags) { @@ -1314,7 +1279,6 @@ nsXPCComponents_ID::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_ID::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -1350,7 +1314,6 @@ NS_IMPL_RELEASE(nsXPCComponents_ID) #include "xpc_map_end.h" /* This will #undef the above */ -/* bool call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCComponents_ID::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -1359,7 +1322,6 @@ nsXPCComponents_ID::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSOb return CallOrConstruct(wrapper, cx, obj, args, _retval); } -/* bool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCComponents_ID::Construct(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -1409,7 +1371,6 @@ nsXPCComponents_ID::CallOrConstruct(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -/* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */ NS_IMETHODIMP nsXPCComponents_ID::HasInstance(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj, @@ -1481,7 +1442,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_Exception::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -1489,7 +1449,6 @@ nsXPCComponents_Exception::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_Exception::GetContractID(char * *aContractID) { @@ -1497,7 +1456,6 @@ nsXPCComponents_Exception::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_Exception::GetClassDescription(char * *aClassDescription) { @@ -1506,7 +1464,6 @@ nsXPCComponents_Exception::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_Exception::GetClassID(nsCID * *aClassID) { @@ -1514,7 +1471,6 @@ nsXPCComponents_Exception::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_Exception::GetFlags(uint32_t* aFlags) { @@ -1522,7 +1478,6 @@ nsXPCComponents_Exception::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_Exception::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -1558,7 +1513,6 @@ NS_IMPL_RELEASE(nsXPCComponents_Exception) #include "xpc_map_end.h" /* This will #undef the above */ -/* bool call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCComponents_Exception::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -1567,7 +1521,6 @@ nsXPCComponents_Exception::Call(nsIXPConnectWrappedNative* wrapper, JSContext* c return CallOrConstruct(wrapper, cx, obj, args, _retval); } -/* bool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCComponents_Exception::Construct(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -1761,7 +1714,6 @@ nsXPCComponents_Exception::CallOrConstruct(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -/* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */ NS_IMETHODIMP nsXPCComponents_Exception::HasInstance(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, @@ -1857,7 +1809,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCConstructor::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -1865,7 +1816,6 @@ nsXPCConstructor::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCConstructor::GetContractID(char * *aContractID) { @@ -1873,7 +1823,6 @@ nsXPCConstructor::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCConstructor::GetClassDescription(char * *aClassDescription) { @@ -1882,7 +1831,6 @@ nsXPCConstructor::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCConstructor::GetClassID(nsCID * *aClassID) { @@ -1890,7 +1838,6 @@ nsXPCConstructor::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCConstructor::GetFlags(uint32_t* aFlags) { @@ -1898,7 +1845,6 @@ nsXPCConstructor::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCConstructor::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -1922,7 +1868,6 @@ nsXPCConstructor::~nsXPCConstructor() free(mInitializer); } -/* readonly attribute nsIJSCID classID; */ NS_IMETHODIMP nsXPCConstructor::GetClassID(nsIJSCID * *aClassID) { @@ -1931,7 +1876,6 @@ nsXPCConstructor::GetClassID(nsIJSCID * *aClassID) return NS_OK; } -/* readonly attribute nsIJSIID interfaceID; */ NS_IMETHODIMP nsXPCConstructor::GetInterfaceID(nsIJSIID * *aInterfaceID) { @@ -1940,7 +1884,6 @@ nsXPCConstructor::GetInterfaceID(nsIJSIID * *aInterfaceID) return NS_OK; } -/* readonly attribute string initializer; */ NS_IMETHODIMP nsXPCConstructor::GetInitializer(char * *aInitializer) { @@ -1966,7 +1909,6 @@ NS_IMPL_RELEASE(nsXPCConstructor) #include "xpc_map_end.h" /* This will #undef the above */ -/* bool call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCConstructor::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -1976,7 +1918,6 @@ nsXPCConstructor::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObje } -/* bool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCConstructor::Construct(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -2095,7 +2036,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper(); */ NS_IMETHODIMP nsXPCComponents_Constructor::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -2103,7 +2043,6 @@ nsXPCComponents_Constructor::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP nsXPCComponents_Constructor::GetContractID(char * *aContractID) { @@ -2111,7 +2050,6 @@ nsXPCComponents_Constructor::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP nsXPCComponents_Constructor::GetClassDescription(char * *aClassDescription) { @@ -2120,7 +2058,6 @@ nsXPCComponents_Constructor::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP nsXPCComponents_Constructor::GetClassID(nsCID * *aClassID) { @@ -2128,7 +2065,6 @@ nsXPCComponents_Constructor::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP nsXPCComponents_Constructor::GetFlags(uint32_t* aFlags) { @@ -2136,7 +2072,6 @@ nsXPCComponents_Constructor::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP nsXPCComponents_Constructor::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { @@ -2172,7 +2107,6 @@ NS_IMPL_RELEASE(nsXPCComponents_Constructor) #include "xpc_map_end.h" /* This will #undef the above */ -/* bool call (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCComponents_Constructor::Call(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -2181,7 +2115,6 @@ nsXPCComponents_Constructor::Call(nsIXPConnectWrappedNative* wrapper, JSContext* return CallOrConstruct(wrapper, cx, obj, args, _retval); } -/* bool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsXPCComponents_Constructor::Construct(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, const CallArgs& args, bool* _retval) @@ -2322,7 +2255,6 @@ nsXPCComponents_Constructor::CallOrConstruct(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -/* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */ NS_IMETHODIMP nsXPCComponents_Constructor::HasInstance(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * obj, @@ -2379,7 +2311,6 @@ nsXPCComponents_Utils::GetSandbox(nsIXPCComponents_utils_Sandbox** aSandbox) return NS_OK; } -/* void reportError (); */ NS_IMETHODIMP nsXPCComponents_Utils::ReportError(HandleValue error, JSContext* cx) { @@ -2449,7 +2380,6 @@ nsXPCComponents_Utils::ReportError(HandleValue error, JSContext* cx) return NS_OK; } -/* void evalInSandbox(in AString source, in nativeobj sandbox); */ NS_IMETHODIMP nsXPCComponents_Utils::EvalInSandbox(const nsAString& source, HandleValue sandboxVal, @@ -2631,7 +2561,6 @@ nsXPCComponents_Utils::ImportGlobalProperties(HandleValue aPropertyList, return NS_OK; } -/* xpcIJSWeakReference getWeakReference (); */ NS_IMETHODIMP nsXPCComponents_Utils::GetWeakReference(HandleValue object, JSContext* cx, xpcIJSWeakReference** _retval) @@ -2643,7 +2572,6 @@ nsXPCComponents_Utils::GetWeakReference(HandleValue object, JSContext* cx, return NS_OK; } -/* void forceGC (); */ NS_IMETHODIMP nsXPCComponents_Utils::ForceGC() { @@ -2653,7 +2581,6 @@ nsXPCComponents_Utils::ForceGC() return NS_OK; } -/* void forceCC (); */ NS_IMETHODIMP nsXPCComponents_Utils::ForceCC(nsICycleCollectorListener* listener) { @@ -2661,7 +2588,6 @@ nsXPCComponents_Utils::ForceCC(nsICycleCollectorListener* listener) return NS_OK; } -/* void finishCC(); */ NS_IMETHODIMP nsXPCComponents_Utils::FinishCC() { @@ -2669,7 +2595,6 @@ nsXPCComponents_Utils::FinishCC() return NS_OK; } -/* void ccSlice(in long long budget); */ NS_IMETHODIMP nsXPCComponents_Utils::CcSlice(int64_t budget) { @@ -2677,7 +2602,6 @@ nsXPCComponents_Utils::CcSlice(int64_t budget) return NS_OK; } -/* long getMaxCCSliceTimeSinceClear(); */ NS_IMETHODIMP nsXPCComponents_Utils::GetMaxCCSliceTimeSinceClear(int32_t* out) { @@ -2685,7 +2609,6 @@ nsXPCComponents_Utils::GetMaxCCSliceTimeSinceClear(int32_t* out) return NS_OK; } -/* void clearMaxCCTime(); */ NS_IMETHODIMP nsXPCComponents_Utils::ClearMaxCCTime() { @@ -2693,7 +2616,6 @@ nsXPCComponents_Utils::ClearMaxCCTime() return NS_OK; } -/* void forceShrinkingGC (); */ NS_IMETHODIMP nsXPCComponents_Utils::ForceShrinkingGC() { @@ -2734,7 +2656,6 @@ class PreciseGCRunnable : public nsRunnable bool mShrinking; }; -/* void schedulePreciseGC(in ScheduledGCCallback callback); */ NS_IMETHODIMP nsXPCComponents_Utils::SchedulePreciseGC(ScheduledGCCallback* aCallback) { @@ -2742,7 +2663,6 @@ nsXPCComponents_Utils::SchedulePreciseGC(ScheduledGCCallback* aCallback) return NS_DispatchToMainThread(event); } -/* void schedulePreciseShrinkingGC(in ScheduledGCCallback callback); */ NS_IMETHODIMP nsXPCComponents_Utils::SchedulePreciseShrinkingGC(ScheduledGCCallback* aCallback) { @@ -2750,7 +2670,6 @@ nsXPCComponents_Utils::SchedulePreciseShrinkingGC(ScheduledGCCallback* aCallback return NS_DispatchToMainThread(event); } -/* void unlinkGhostWindows(); */ NS_IMETHODIMP nsXPCComponents_Utils::UnlinkGhostWindows() { @@ -2762,7 +2681,6 @@ nsXPCComponents_Utils::UnlinkGhostWindows() #endif } -/* [implicit_jscontext] jsval nondeterministicGetWeakMapKeys(in jsval aMap); */ NS_IMETHODIMP nsXPCComponents_Utils::NondeterministicGetWeakMapKeys(HandleValue aMap, JSContext* aCx, @@ -2780,7 +2698,6 @@ nsXPCComponents_Utils::NondeterministicGetWeakMapKeys(HandleValue aMap, return NS_OK; } -/* [implicit_jscontext] jsval getJSTestingFunctions(); */ NS_IMETHODIMP nsXPCComponents_Utils::GetJSTestingFunctions(JSContext* cx, MutableHandleValue retval) @@ -2834,7 +2751,6 @@ nsXPCComponents_Utils::CallFunctionWithAsyncStack(HandleValue function, return NS_OK; } -/* void getGlobalForObject(); */ NS_IMETHODIMP nsXPCComponents_Utils::GetGlobalForObject(HandleValue object, JSContext* cx, @@ -2867,7 +2783,6 @@ nsXPCComponents_Utils::GetGlobalForObject(HandleValue object, return NS_OK; } -/* boolean isProxy(in value vobj); */ NS_IMETHODIMP nsXPCComponents_Utils::IsProxy(HandleValue vobj, JSContext* cx, bool* rval) { @@ -2884,7 +2799,6 @@ nsXPCComponents_Utils::IsProxy(HandleValue vobj, JSContext* cx, bool* rval) return NS_OK; } -/* jsval exportFunction(in jsval vfunction, in jsval vscope, in jsval voptions); */ NS_IMETHODIMP nsXPCComponents_Utils::ExportFunction(HandleValue vfunction, HandleValue vscope, HandleValue voptions, JSContext* cx, @@ -2895,7 +2809,6 @@ nsXPCComponents_Utils::ExportFunction(HandleValue vfunction, HandleValue vscope, return NS_OK; } -/* jsval createObjectIn(in jsval vobj, [optional] in jsval voptions); */ NS_IMETHODIMP nsXPCComponents_Utils::CreateObjectIn(HandleValue vobj, HandleValue voptions, JSContext* cx, MutableHandleValue rval) @@ -2914,7 +2827,6 @@ nsXPCComponents_Utils::CreateObjectIn(HandleValue vobj, HandleValue voptions, return NS_OK; } -/* void makeObjectPropsNormal(jsval vobj); */ NS_IMETHODIMP nsXPCComponents_Utils::MakeObjectPropsNormal(HandleValue vobj, JSContext* cx) { @@ -2991,7 +2903,6 @@ nsXPCComponents_Utils::GetCrossProcessWrapperTag(HandleValue obj, nsACString& ou return NS_OK; } -/* void recomputerWrappers(jsval vobj); */ NS_IMETHODIMP nsXPCComponents_Utils::RecomputeWrappers(HandleValue vobj, JSContext* cx) { @@ -3011,7 +2922,6 @@ nsXPCComponents_Utils::RecomputeWrappers(HandleValue vobj, JSContext* cx) return NS_OK; } -/* jsval setWantXrays(jsval vscope); */ NS_IMETHODIMP nsXPCComponents_Utils::SetWantXrays(HandleValue vscope, JSContext* cx) { @@ -3026,7 +2936,6 @@ nsXPCComponents_Utils::SetWantXrays(HandleValue vscope, JSContext* cx) return NS_OK; } -/* jsval forcePermissiveCOWs(); */ NS_IMETHODIMP nsXPCComponents_Utils::ForcePermissiveCOWs(JSContext* cx) { @@ -3035,7 +2944,6 @@ nsXPCComponents_Utils::ForcePermissiveCOWs(JSContext* cx) return NS_OK; } -/* jsval skipCOWCallableChecks(); */ NS_IMETHODIMP nsXPCComponents_Utils::SkipCOWCallableChecks(JSContext* cx) { @@ -3043,7 +2951,6 @@ nsXPCComponents_Utils::SkipCOWCallableChecks(JSContext* cx) return NS_OK; } -/* jsval forcePrivilegedComponentsForScope(jsval vscope); */ NS_IMETHODIMP nsXPCComponents_Utils::ForcePrivilegedComponentsForScope(HandleValue vscope, JSContext* cx) @@ -3057,7 +2964,6 @@ nsXPCComponents_Utils::ForcePrivilegedComponentsForScope(HandleValue vscope, return NS_OK; } -/* jsval getComponentsForScope(jsval vscope); */ NS_IMETHODIMP nsXPCComponents_Utils::GetComponentsForScope(HandleValue vscope, JSContext* cx, MutableHandleValue rval) @@ -3592,7 +3498,6 @@ nsXPCComponents::SetReturnCode(JSContext* aCx, HandleValue aCode) } // static -/* void reportError (); */ NS_IMETHODIMP nsXPCComponents::ReportError(HandleValue error, JSContext* cx) { NS_WARNING("Components.reportError deprecated, use Components.utils.reportError"); diff --git a/js/xpconnect/src/XPCJSID.cpp b/js/xpconnect/src/XPCJSID.cpp index 1152b6f022..8c65daa212 100644 --- a/js/xpconnect/src/XPCJSID.cpp +++ b/js/xpconnect/src/XPCJSID.cpp @@ -408,7 +408,6 @@ nsJSIID::Resolve(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -/* bool enumerate (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj); */ NS_IMETHODIMP nsJSIID::Enumerate(nsIXPConnectWrappedNative* wrapper, JSContext * cx, JSObject * objArg, bool* _retval) @@ -505,7 +504,6 @@ xpc::HasInstance(JSContext* cx, HandleObject objArg, const nsID* iid, bool* bp) return NS_OK; } -/* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */ NS_IMETHODIMP nsJSIID::HasInstance(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject * /* unused */, @@ -624,7 +622,6 @@ GetIIDArg(uint32_t argc, const JS::Value& val, JSContext* cx) return iid; } -/* nsISupports createInstance (); */ NS_IMETHODIMP nsJSCID::CreateInstance(HandleValue iidval, JSContext* cx, uint8_t optionalArgc, MutableHandleValue retval) @@ -660,7 +657,6 @@ nsJSCID::CreateInstance(HandleValue iidval, JSContext* cx, return NS_OK; } -/* nsISupports getService (); */ NS_IMETHODIMP nsJSCID::GetService(HandleValue iidval, JSContext* cx, uint8_t optionalArgc, MutableHandleValue retval) @@ -699,7 +695,6 @@ nsJSCID::GetService(HandleValue iidval, JSContext* cx, uint8_t optionalArgc, return NS_OK; } -/* bool construct (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in uint32_t argc, in JSValPtr argv, in JSValPtr vp); */ NS_IMETHODIMP nsJSCID::Construct(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* objArg, @@ -719,7 +714,6 @@ nsJSCID::Construct(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -/* bool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsval val, out bool bp); */ NS_IMETHODIMP nsJSCID::HasInstance(nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject * /* unused */, diff --git a/js/xpconnect/src/XPCRuntimeService.cpp b/js/xpconnect/src/XPCRuntimeService.cpp index cf5acac413..2ae04dba82 100644 --- a/js/xpconnect/src/XPCRuntimeService.cpp +++ b/js/xpconnect/src/XPCRuntimeService.cpp @@ -113,7 +113,6 @@ oom: return NS_ERROR_OUT_OF_MEMORY; } -/* nsIXPCScriptable getScriptableHelper (); */ NS_IMETHODIMP BackstagePass::GetScriptableHelper(nsIXPCScriptable** retval) { @@ -122,7 +121,6 @@ BackstagePass::GetScriptableHelper(nsIXPCScriptable** retval) return NS_OK; } -/* readonly attribute string contractID; */ NS_IMETHODIMP BackstagePass::GetContractID(char * *aContractID) { @@ -130,7 +128,6 @@ BackstagePass::GetContractID(char * *aContractID) return NS_ERROR_NOT_AVAILABLE; } -/* readonly attribute string classDescription; */ NS_IMETHODIMP BackstagePass::GetClassDescription(char * *aClassDescription) { @@ -139,7 +136,6 @@ BackstagePass::GetClassDescription(char * *aClassDescription) return *aClassDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute nsCIDPtr classID; */ NS_IMETHODIMP BackstagePass::GetClassID(nsCID * *aClassID) { @@ -147,7 +143,6 @@ BackstagePass::GetClassID(nsCID * *aClassID) return NS_OK; } -/* readonly attribute uint32_t flags; */ NS_IMETHODIMP BackstagePass::GetFlags(uint32_t* aFlags) { @@ -155,7 +150,6 @@ BackstagePass::GetFlags(uint32_t* aFlags) return NS_OK; } -/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ NS_IMETHODIMP BackstagePass::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) { diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp index 276f584420..80a9fe87bf 100644 --- a/js/xpconnect/src/XPCShellImpl.cpp +++ b/js/xpconnect/src/XPCShellImpl.cpp @@ -1147,7 +1147,6 @@ nsXPCFunctionThisTranslator::~nsXPCFunctionThisTranslator() { } -/* nsISupports TranslateThis (in nsISupports aInitialThis); */ NS_IMETHODIMP nsXPCFunctionThisTranslator::TranslateThis(nsISupports* aInitialThis, nsISupports** _retval) diff --git a/js/xpconnect/src/XPCVariant.cpp b/js/xpconnect/src/XPCVariant.cpp index 6263b39ceb..6ee1f61233 100644 --- a/js/xpconnect/src/XPCVariant.cpp +++ b/js/xpconnect/src/XPCVariant.cpp @@ -640,104 +640,87 @@ XPCVariant::VariantDataToJS(nsIVariant* variant, // some more interesting conversions. -/* readonly attribute uint16_t dataType; */ NS_IMETHODIMP XPCVariant::GetDataType(uint16_t* aDataType) { *aDataType = mData.GetType(); return NS_OK; } -/* uint8_t getAsInt8 (); */ NS_IMETHODIMP XPCVariant::GetAsInt8(uint8_t* _retval) { return mData.ConvertToInt8(_retval); } -/* int16_t getAsInt16 (); */ NS_IMETHODIMP XPCVariant::GetAsInt16(int16_t* _retval) { return mData.ConvertToInt16(_retval); } -/* int32_t getAsInt32 (); */ NS_IMETHODIMP XPCVariant::GetAsInt32(int32_t* _retval) { return mData.ConvertToInt32(_retval); } -/* int64_t getAsInt64 (); */ NS_IMETHODIMP XPCVariant::GetAsInt64(int64_t* _retval) { return mData.ConvertToInt64(_retval); } -/* uint8_t getAsUint8 (); */ NS_IMETHODIMP XPCVariant::GetAsUint8(uint8_t* _retval) { return mData.ConvertToUint8(_retval); } -/* uint16_t getAsUint16 (); */ NS_IMETHODIMP XPCVariant::GetAsUint16(uint16_t* _retval) { return mData.ConvertToUint16(_retval); } -/* uint32_t getAsUint32 (); */ NS_IMETHODIMP XPCVariant::GetAsUint32(uint32_t* _retval) { return mData.ConvertToUint32(_retval); } -/* uint64_t getAsUint64 (); */ NS_IMETHODIMP XPCVariant::GetAsUint64(uint64_t* _retval) { return mData.ConvertToUint64(_retval); } -/* float getAsFloat (); */ NS_IMETHODIMP XPCVariant::GetAsFloat(float* _retval) { return mData.ConvertToFloat(_retval); } -/* double getAsDouble (); */ NS_IMETHODIMP XPCVariant::GetAsDouble(double* _retval) { return mData.ConvertToDouble(_retval); } -/* bool getAsBool (); */ NS_IMETHODIMP XPCVariant::GetAsBool(bool* _retval) { return mData.ConvertToBool(_retval); } -/* char getAsChar (); */ NS_IMETHODIMP XPCVariant::GetAsChar(char* _retval) { return mData.ConvertToChar(_retval); } -/* wchar getAsWChar (); */ NS_IMETHODIMP XPCVariant::GetAsWChar(char16_t* _retval) { return mData.ConvertToWChar(_retval); } -/* [notxpcom] nsresult getAsID (out nsID retval); */ NS_IMETHODIMP_(nsresult) XPCVariant::GetAsID(nsID* retval) { return mData.ConvertToID(retval); } -/* AString getAsAString (); */ NS_IMETHODIMP XPCVariant::GetAsAString(nsAString & _retval) { return mData.ConvertToAString(_retval); } -/* DOMString getAsDOMString (); */ NS_IMETHODIMP XPCVariant::GetAsDOMString(nsAString & _retval) { // A DOMString maps to an AString internally, so we can re-use @@ -745,56 +728,47 @@ NS_IMETHODIMP XPCVariant::GetAsDOMString(nsAString & _retval) return mData.ConvertToAString(_retval); } -/* ACString getAsACString (); */ NS_IMETHODIMP XPCVariant::GetAsACString(nsACString & _retval) { return mData.ConvertToACString(_retval); } -/* AUTF8String getAsAUTF8String (); */ NS_IMETHODIMP XPCVariant::GetAsAUTF8String(nsAUTF8String & _retval) { return mData.ConvertToAUTF8String(_retval); } -/* string getAsString (); */ NS_IMETHODIMP XPCVariant::GetAsString(char** _retval) { return mData.ConvertToString(_retval); } -/* wstring getAsWString (); */ NS_IMETHODIMP XPCVariant::GetAsWString(char16_t** _retval) { return mData.ConvertToWString(_retval); } -/* nsISupports getAsISupports (); */ NS_IMETHODIMP XPCVariant::GetAsISupports(nsISupports** _retval) { return mData.ConvertToISupports(_retval); } -/* void getAsInterface (out nsIIDPtr iid, [iid_is (iid), retval] out nsQIResult iface); */ NS_IMETHODIMP XPCVariant::GetAsInterface(nsIID** iid, void** iface) { return mData.ConvertToInterface(iid, iface); } -/* [notxpcom] nsresult getAsArray (out uint16_t type, out nsIID iid, out uint32_t count, out voidPtr ptr); */ NS_IMETHODIMP_(nsresult) XPCVariant::GetAsArray(uint16_t* type, nsIID* iid, uint32_t* count, void * *ptr) { return mData.ConvertToArray(type, iid, count, ptr); } -/* void getAsStringWithSize (out uint32_t size, [size_is (size), retval] out string str); */ NS_IMETHODIMP XPCVariant::GetAsStringWithSize(uint32_t* size, char** str) { return mData.ConvertToStringWithSize(size, str); } -/* void getAsWStringWithSize (out uint32_t size, [size_is (size), retval] out wstring str); */ NS_IMETHODIMP XPCVariant::GetAsWStringWithSize(uint32_t* size, char16_t** str) { return mData.ConvertToWStringWithSize(size, str); diff --git a/js/xpconnect/src/XPCWrappedJS.cpp b/js/xpconnect/src/XPCWrappedJS.cpp index 27779fa5d3..c5c41fbc27 100644 --- a/js/xpconnect/src/XPCWrappedJS.cpp +++ b/js/xpconnect/src/XPCWrappedJS.cpp @@ -579,7 +579,6 @@ nsXPCWrappedJS::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const /***************************************************************************/ -/* readonly attribute nsISimpleEnumerator enumerator; */ NS_IMETHODIMP nsXPCWrappedJS::GetEnumerator(nsISimpleEnumerator * *aEnumerate) { @@ -592,7 +591,6 @@ nsXPCWrappedJS::GetEnumerator(nsISimpleEnumerator * *aEnumerate) aEnumerate); } -/* nsIVariant getProperty (in AString name); */ NS_IMETHODIMP nsXPCWrappedJS::GetProperty(const nsAString & name, nsIVariant** _retval) { diff --git a/js/xpconnect/src/XPCWrappedJSClass.cpp b/js/xpconnect/src/XPCWrappedJSClass.cpp index 97beab5164..314c257654 100644 --- a/js/xpconnect/src/XPCWrappedJSClass.cpp +++ b/js/xpconnect/src/XPCWrappedJSClass.cpp @@ -407,14 +407,12 @@ xpcProperty::xpcProperty(const char16_t* aName, uint32_t aNameLen, { } -/* readonly attribute AString name; */ NS_IMETHODIMP xpcProperty::GetName(nsAString & aName) { aName.Assign(mName); return NS_OK; } -/* readonly attribute nsIVariant value; */ NS_IMETHODIMP xpcProperty::GetValue(nsIVariant * *aValue) { nsCOMPtr rval = mValue; diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index a7420b55f1..c302074da2 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -2106,14 +2106,12 @@ CallMethodHelper::Invoke() /***************************************************************************/ // interface methods -/* JSObjectPtr GetJSObject(); */ JSObject* XPCWrappedNative::GetJSObject() { return GetFlatJSObject(); } -/* readonly attribute nsISupports Native; */ NS_IMETHODIMP XPCWrappedNative::GetNative(nsISupports * *aNative) { // No need to QI here, we already have the correct nsISupports @@ -2123,7 +2121,6 @@ NS_IMETHODIMP XPCWrappedNative::GetNative(nsISupports * *aNative) return NS_OK; } -/* reaonly attribute JSObjectPtr JSObjectPrototype; */ NS_IMETHODIMP XPCWrappedNative::GetJSObjectPrototype(JSObject * *aJSObjectPrototype) { *aJSObjectPrototype = HasProto() ? @@ -2152,7 +2149,6 @@ XPCWrappedNative::GetObjectPrincipal() const return principal; } -/* XPCNativeInterface FindInterfaceWithMember (in JSHandleId name); */ NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(HandleId name, nsIInterfaceInfo * *_retval) { @@ -2167,7 +2163,6 @@ NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(HandleId name, return NS_OK; } -/* XPCNativeInterface FindInterfaceWithName (in JSHandleId name); */ NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithName(HandleId name, nsIInterfaceInfo * *_retval) { @@ -2180,7 +2175,6 @@ NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithName(HandleId name, return NS_OK; } -/* [notxpcom] bool HasNativeMember (in JSHandleId name); */ NS_IMETHODIMP_(bool) XPCWrappedNative::HasNativeMember(HandleId name) { @@ -2189,7 +2183,6 @@ XPCWrappedNative::HasNativeMember(HandleId name) return GetSet()->FindMember(name, &member, &ignored) && !!member; } -/* void debugDump (in short depth); */ NS_IMETHODIMP XPCWrappedNative::DebugDump(int16_t depth) { #ifdef DEBUG diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index a56e30587c..006d15175c 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -494,7 +494,6 @@ NativeInterface2JSObject(HandleObject aScope, return NS_OK; } -/* JSObjectPtr wrapNative (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHODIMP nsXPConnect::WrapNative(JSContext * aJSContext, JSObject * aScopeArg, @@ -520,7 +519,6 @@ nsXPConnect::WrapNative(JSContext * aJSContext, return NS_OK; } -/* nsIXPConnectJSObjectHolder wrapNativeHolder(in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHODIMP nsXPConnect::WrapNativeHolder(JSContext * aJSContext, JSObject * aScopeArg, @@ -539,7 +537,6 @@ nsXPConnect::WrapNativeHolder(JSContext * aJSContext, true, &v, aHolder); } -/* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDPtr aIID, out jsval aVal); */ NS_IMETHODIMP nsXPConnect::WrapNativeToJSVal(JSContext* aJSContext, JSObject* aScopeArg, @@ -558,7 +555,6 @@ nsXPConnect::WrapNativeToJSVal(JSContext* aJSContext, aAllowWrapping, aVal, nullptr); } -/* void wrapJS (in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ NS_IMETHODIMP nsXPConnect::WrapJS(JSContext * aJSContext, JSObject * aJSObjArg, @@ -595,7 +591,6 @@ nsXPConnect::JSValToVariant(JSContext* cx, return NS_OK; } -/* void wrapJSAggregatedToNative (in nsISupports aOuter, in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ NS_IMETHODIMP nsXPConnect::WrapJSAggregatedToNative(nsISupports* aOuter, JSContext* aJSContext, @@ -618,7 +613,6 @@ nsXPConnect::WrapJSAggregatedToNative(nsISupports* aOuter, return NS_OK; } -/* nsIXPConnectWrappedNative getWrappedNativeOfJSObject (in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */ NS_IMETHODIMP nsXPConnect::GetWrappedNativeOfJSObject(JSContext * aJSContext, JSObject * aJSObjArg, @@ -662,7 +656,6 @@ xpc::UnwrapReflectorToISupports(JSObject* reflector) return canonical; } -/* nsISupports getNativeOfWrapper(in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */ NS_IMETHODIMP_(nsISupports*) nsXPConnect::GetNativeOfWrapper(JSContext* aJSContext, JSObject* aJSObj) @@ -670,7 +663,6 @@ nsXPConnect::GetNativeOfWrapper(JSContext* aJSContext, return UnwrapReflectorToISupports(aJSObj); } -/* nsIXPConnectWrappedNative getWrappedNativeOfNativeObject (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHODIMP nsXPConnect::GetWrappedNativeOfNativeObject(JSContext * aJSContext, JSObject * aScopeArg, @@ -705,7 +697,6 @@ nsXPConnect::GetWrappedNativeOfNativeObject(JSContext * aJSContext, return NS_OK; } -/* readonly attribute nsIStackFrame CurrentJSStack; */ NS_IMETHODIMP nsXPConnect::GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) { @@ -717,7 +708,6 @@ nsXPConnect::GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) return NS_OK; } -/* readonly attribute nsIXPCNativeCallContext CurrentNativeCallContext; */ NS_IMETHODIMP nsXPConnect::GetCurrentNativeCallContext(nsAXPCNativeCallContext * *aCurrentNativeCallContext) { @@ -727,7 +717,6 @@ nsXPConnect::GetCurrentNativeCallContext(nsAXPCNativeCallContext * *aCurrentNati return NS_OK; } -/* void setFunctionThisTranslator (in nsIIDRef aIID, in nsIXPCFunctionThisTranslator aTranslator); */ NS_IMETHODIMP nsXPConnect::SetFunctionThisTranslator(const nsIID & aIID, nsIXPCFunctionThisTranslator* aTranslator) @@ -778,7 +767,6 @@ nsXPConnect::EvalInSandboxObject(const nsAString& source, const char* filename, JSVERSION_DEFAULT, rval); } -/* nsIXPConnectJSObjectHolder getWrappedNativePrototype (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsIClassInfo aClassInfo); */ NS_IMETHODIMP nsXPConnect::GetWrappedNativePrototype(JSContext * aJSContext, JSObject * aScopeArg, @@ -810,7 +798,6 @@ nsXPConnect::GetWrappedNativePrototype(JSContext * aJSContext, return NS_OK; } -/* void debugDump (in short depth); */ NS_IMETHODIMP nsXPConnect::DebugDump(int16_t depth) { @@ -833,7 +820,6 @@ nsXPConnect::DebugDump(int16_t depth) return NS_OK; } -/* void debugDumpObject (in nsISupports aCOMObj, in short depth); */ NS_IMETHODIMP nsXPConnect::DebugDumpObject(nsISupports* p, int16_t depth) { @@ -876,7 +862,6 @@ nsXPConnect::DebugDumpObject(nsISupports* p, int16_t depth) return NS_OK; } -/* void debugDumpJSStack (in bool showArgs, in bool showLocals, in bool showThisProps); */ NS_IMETHODIMP nsXPConnect::DebugDumpJSStack(bool showArgs, bool showLocals, @@ -901,7 +886,6 @@ nsXPConnect::DebugPrintJSStack(bool showArgs, return nullptr; } -/* jsval variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */ NS_IMETHODIMP nsXPConnect::VariantToJS(JSContext* ctx, JSObject* scopeArg, nsIVariant* value, MutableHandleValue _retval) @@ -923,7 +907,6 @@ nsXPConnect::VariantToJS(JSContext* ctx, JSObject* scopeArg, nsIVariant* value, return NS_OK; } -/* nsIVariant JSToVariant (in JSContextPtr ctx, in jsval value); */ NS_IMETHODIMP nsXPConnect::JSToVariant(JSContext* ctx, HandleValue value, nsIVariant** _retval) { diff --git a/js/xpconnect/tests/components/native/xpctest_params.cpp b/js/xpconnect/tests/components/native/xpctest_params.cpp index 1f14b2b90f..cbaff46d26 100644 --- a/js/xpconnect/tests/components/native/xpctest_params.cpp +++ b/js/xpconnect/tests/components/native/xpctest_params.cpp @@ -70,73 +70,61 @@ nsXPCTestParams::~nsXPCTestParams() return NS_OK; \ } -/* boolean testBoolean (in boolean a, inout boolean b); */ NS_IMETHODIMP nsXPCTestParams::TestBoolean(bool a, bool* b, bool* _retval) { GENERIC_METHOD_IMPL; } -/* octet testOctet (in octet a, inout octet b); */ NS_IMETHODIMP nsXPCTestParams::TestOctet(uint8_t a, uint8_t* b, uint8_t* _retval) { GENERIC_METHOD_IMPL; } -/* short testShort (in short a, inout short b); */ NS_IMETHODIMP nsXPCTestParams::TestShort(int16_t a, int16_t* b, int16_t* _retval) { GENERIC_METHOD_IMPL; } -/* long testLong (in long a, inout long b); */ NS_IMETHODIMP nsXPCTestParams::TestLong(int32_t a, int32_t* b, int32_t* _retval) { GENERIC_METHOD_IMPL; } -/* long long testLongLong (in long long a, inout long long b); */ NS_IMETHODIMP nsXPCTestParams::TestLongLong(int64_t a, int64_t* b, int64_t* _retval) { GENERIC_METHOD_IMPL; } -/* unsigned short testUnsignedShort (in unsigned short a, inout unsigned short b); */ NS_IMETHODIMP nsXPCTestParams::TestUnsignedShort(uint16_t a, uint16_t* b, uint16_t* _retval) { GENERIC_METHOD_IMPL; } -/* unsigned long testUnsignedLong (in unsigned long a, inout unsigned long b); */ NS_IMETHODIMP nsXPCTestParams::TestUnsignedLong(uint32_t a, uint32_t* b, uint32_t* _retval) { GENERIC_METHOD_IMPL; } -/* unsigned long long testUnsignedLongLong (in unsigned long long a, inout unsigned long long b); */ NS_IMETHODIMP nsXPCTestParams::TestUnsignedLongLong(uint64_t a, uint64_t* b, uint64_t* _retval) { GENERIC_METHOD_IMPL; } -/* float testFloat (in float a, inout float b); */ NS_IMETHODIMP nsXPCTestParams::TestFloat(float a, float* b, float* _retval) { GENERIC_METHOD_IMPL; } -/* double testDouble (in double a, inout float b); */ NS_IMETHODIMP nsXPCTestParams::TestDouble(double a, float* b, double* _retval) { GENERIC_METHOD_IMPL; } -/* char testChar (in char a, inout char b); */ NS_IMETHODIMP nsXPCTestParams::TestChar(char a, char* b, char* _retval) { GENERIC_METHOD_IMPL; } -/* string testString (in string a, inout string b); */ NS_IMETHODIMP nsXPCTestParams::TestString(const char * a, char * *b, char * *_retval) { nsDependentCString aprime(a); @@ -151,13 +139,11 @@ NS_IMETHODIMP nsXPCTestParams::TestString(const char * a, char * *b, char * *_re return NS_OK; } -/* wchar testWchar (in wchar a, inout wchar b); */ NS_IMETHODIMP nsXPCTestParams::TestWchar(char16_t a, char16_t* b, char16_t* _retval) { GENERIC_METHOD_IMPL; } -/* wstring testWstring (in wstring a, inout wstring b); */ NS_IMETHODIMP nsXPCTestParams::TestWstring(const char16_t * a, char16_t * *b, char16_t * *_retval) { nsDependentString aprime(a); @@ -172,32 +158,27 @@ NS_IMETHODIMP nsXPCTestParams::TestWstring(const char16_t * a, char16_t * *b, ch return NS_OK; } -/* DOMString testDOMString (in DOMString a, inout DOMString b); */ NS_IMETHODIMP nsXPCTestParams::TestDOMString(const nsAString & a, nsAString & b, nsAString & _retval) { STRING_METHOD_IMPL; } -/* AString testAString (in AString a, inout AString b); */ NS_IMETHODIMP nsXPCTestParams::TestAString(const nsAString & a, nsAString & b, nsAString & _retval) { STRING_METHOD_IMPL; } -/* AUTF8String testAUTF8String (in AUTF8String a, inout AUTF8String b); */ NS_IMETHODIMP nsXPCTestParams::TestAUTF8String(const nsACString & a, nsACString & b, nsACString & _retval) { STRING_METHOD_IMPL; } -/* ACString testACString (in ACString a, inout ACString b); */ NS_IMETHODIMP nsXPCTestParams::TestACString(const nsACString & a, nsACString & b, nsACString & _retval) { STRING_METHOD_IMPL; } -/* jsval testJsval (in jsval a, in jsval b); */ NS_IMETHODIMP nsXPCTestParams::TestJsval(JS::Handle a, JS::MutableHandle b, JS::MutableHandle _retval) @@ -340,7 +321,6 @@ NS_IMETHODIMP nsXPCTestParams::TestInterfaceIsArray(uint32_t aLength, const nsII BUFFER_METHOD_IMPL(void*, 0, TAKE_OWNERSHIP_INTERFACE); } -/* void testOutAString (out AString o); */ NS_IMETHODIMP nsXPCTestParams::TestOutAString(nsAString & o) { o.AssignLiteral("out"); diff --git a/js/xpconnect/tests/components/native/xpctest_returncode.cpp b/js/xpconnect/tests/components/native/xpctest_returncode.cpp index 09dee46665..3ae7d42796 100644 --- a/js/xpconnect/tests/components/native/xpctest_returncode.cpp +++ b/js/xpconnect/tests/components/native/xpctest_returncode.cpp @@ -16,7 +16,6 @@ nsXPCTestReturnCodeParent::~nsXPCTestReturnCodeParent() { } -/* unsigned long callChild (in long childBehavior); */ NS_IMETHODIMP nsXPCTestReturnCodeParent::CallChild(int32_t childBehavior, nsresult* _retval) { nsresult rv; diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 613d6659e3..672319a1b7 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -2750,7 +2750,6 @@ NS_IMETHODIMP nsDocumentViewer::GetCopyable(bool *aCopyable) return NS_OK; } -/* AString getContents (in string mimeType, in boolean selectionOnly); */ NS_IMETHODIMP nsDocumentViewer::GetContents(const char *mimeType, bool selectionOnly, nsAString& aOutValue) { aOutValue.Truncate(); @@ -2775,7 +2774,6 @@ NS_IMETHODIMP nsDocumentViewer::GetContents(const char *mimeType, bool selection mDocument, aOutValue); } -/* readonly attribute boolean canGetContents; */ NS_IMETHODIMP nsDocumentViewer::GetCanGetContents(bool *aCanGetContents) { NS_ENSURE_ARG_POINTER(aCanGetContents); @@ -3994,14 +3992,12 @@ nsDocumentViewer::PrintPreviewNavigate(int16_t aType, int32_t aPageNum) } -/* readonly attribute nsIPrintSettings globalPrintSettings; */ NS_IMETHODIMP nsDocumentViewer::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return nsPrintEngine::GetGlobalPrintSettings(aGlobalPrintSettings); } -/* readonly attribute boolean doingPrint; */ // XXX This always returns false for subdocuments NS_IMETHODIMP nsDocumentViewer::GetDoingPrint(bool *aDoingPrint) @@ -4016,7 +4012,6 @@ nsDocumentViewer::GetDoingPrint(bool *aDoingPrint) return NS_OK; } -/* readonly attribute boolean doingPrintPreview; */ // XXX This always returns false for subdocuments NS_IMETHODIMP nsDocumentViewer::GetDoingPrintPreview(bool *aDoingPrintPreview) @@ -4030,7 +4025,6 @@ nsDocumentViewer::GetDoingPrintPreview(bool *aDoingPrintPreview) return NS_OK; } -/* readonly attribute nsIPrintSettings currentPrintSettings; */ NS_IMETHODIMP nsDocumentViewer::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) { @@ -4043,7 +4037,6 @@ nsDocumentViewer::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSetti } -/* readonly attribute nsIDOMWindow currentChildDOMWindow; */ NS_IMETHODIMP nsDocumentViewer::GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) { @@ -4052,7 +4045,6 @@ nsDocumentViewer::GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindo return NS_ERROR_NOT_IMPLEMENTED; } -/* void cancel (); */ NS_IMETHODIMP nsDocumentViewer::Cancel() { @@ -4060,7 +4052,6 @@ nsDocumentViewer::Cancel() return mPrintEngine->Cancelled(); } -/* void exitPrintPreview (); */ NS_IMETHODIMP nsDocumentViewer::ExitPrintPreview() { @@ -4091,7 +4082,6 @@ nsDocumentViewer::EnumerateDocumentNames(uint32_t* aCount, #endif } -/* readonly attribute boolean isFramesetFrameSelected; */ NS_IMETHODIMP nsDocumentViewer::GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected) { @@ -4105,7 +4095,6 @@ nsDocumentViewer::GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected) #endif } -/* readonly attribute long printPreviewNumPages; */ NS_IMETHODIMP nsDocumentViewer::GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages) { @@ -4119,7 +4108,6 @@ nsDocumentViewer::GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages) #endif } -/* readonly attribute boolean isFramesetDocument; */ NS_IMETHODIMP nsDocumentViewer::GetIsFramesetDocument(bool *aIsFramesetDocument) { @@ -4133,7 +4121,6 @@ nsDocumentViewer::GetIsFramesetDocument(bool *aIsFramesetDocument) #endif } -/* readonly attribute boolean isIFrameSelected; */ NS_IMETHODIMP nsDocumentViewer::GetIsIFrameSelected(bool *aIsIFrameSelected) { @@ -4147,7 +4134,6 @@ nsDocumentViewer::GetIsIFrameSelected(bool *aIsIFrameSelected) #endif } -/* readonly attribute boolean isRangeSelection; */ NS_IMETHODIMP nsDocumentViewer::GetIsRangeSelection(bool *aIsRangeSelection) { diff --git a/layout/inspector/nsFontFace.cpp b/layout/inspector/nsFontFace.cpp index 5365ce342c..35702720f7 100644 --- a/layout/inspector/nsFontFace.cpp +++ b/layout/inspector/nsFontFace.cpp @@ -37,7 +37,6 @@ NS_IMPL_ISUPPORTS(nsFontFace, nsIDOMFontFace) //////////////////////////////////////////////////////////////////////// // nsIDOMFontFace -/* readonly attribute boolean fromFontGroup; */ NS_IMETHODIMP nsFontFace::GetFromFontGroup(bool * aFromFontGroup) { @@ -46,7 +45,6 @@ nsFontFace::GetFromFontGroup(bool * aFromFontGroup) return NS_OK; } -/* readonly attribute boolean fromLanguagePrefs; */ NS_IMETHODIMP nsFontFace::GetFromLanguagePrefs(bool * aFromLanguagePrefs) { @@ -55,7 +53,6 @@ nsFontFace::GetFromLanguagePrefs(bool * aFromLanguagePrefs) return NS_OK; } -/* readonly attribute boolean fromSystemFallback; */ NS_IMETHODIMP nsFontFace::GetFromSystemFallback(bool * aFromSystemFallback) { @@ -64,7 +61,6 @@ nsFontFace::GetFromSystemFallback(bool * aFromSystemFallback) return NS_OK; } -/* readonly attribute DOMString name; */ NS_IMETHODIMP nsFontFace::GetName(nsAString & aName) { @@ -77,7 +73,6 @@ nsFontFace::GetName(nsAString & aName) return NS_OK; } -/* readonly attribute DOMString CSSFamilyName; */ NS_IMETHODIMP nsFontFace::GetCSSFamilyName(nsAString & aCSSFamilyName) { @@ -85,7 +80,6 @@ nsFontFace::GetCSSFamilyName(nsAString & aCSSFamilyName) return NS_OK; } -/* readonly attribute nsIDOMCSSFontFaceRule rule; */ NS_IMETHODIMP nsFontFace::GetRule(nsIDOMCSSFontFaceRule **aRule) { @@ -107,7 +101,6 @@ nsFontFace::GetRule(nsIDOMCSSFontFaceRule **aRule) return NS_OK; } -/* readonly attribute long srcIndex; */ NS_IMETHODIMP nsFontFace::GetSrcIndex(int32_t * aSrcIndex) { @@ -120,7 +113,6 @@ nsFontFace::GetSrcIndex(int32_t * aSrcIndex) return NS_OK; } -/* readonly attribute DOMString URI; */ NS_IMETHODIMP nsFontFace::GetURI(nsAString & aURI) { @@ -136,7 +128,6 @@ nsFontFace::GetURI(nsAString & aURI) return NS_OK; } -/* readonly attribute DOMString localName; */ NS_IMETHODIMP nsFontFace::GetLocalName(nsAString & aLocalName) { @@ -149,7 +140,6 @@ nsFontFace::GetLocalName(nsAString & aLocalName) return NS_OK; } -/* readonly attribute DOMString format; */ static void AppendToFormat(nsAString & aResult, const char* aFormat) { @@ -191,7 +181,6 @@ nsFontFace::GetFormat(nsAString & aFormat) return NS_OK; } -/* readonly attribute DOMString metadata; */ NS_IMETHODIMP nsFontFace::GetMetadata(nsAString & aMetadata) { diff --git a/layout/inspector/nsFontFaceList.cpp b/layout/inspector/nsFontFaceList.cpp index f5b45d638a..33806a9eff 100644 --- a/layout/inspector/nsFontFaceList.cpp +++ b/layout/inspector/nsFontFaceList.cpp @@ -25,7 +25,6 @@ NS_IMPL_ISUPPORTS(nsFontFaceList, nsIDOMFontFaceList) //////////////////////////////////////////////////////////////////////// // nsIDOMFontFaceList -/* nsIDOMFontFace item (in unsigned long index); */ struct FindByIndexData { uint32_t mTarget; uint32_t mCurrent; @@ -58,7 +57,6 @@ nsFontFaceList::Item(uint32_t index, nsIDOMFontFace **_retval) return NS_OK; } -/* readonly attribute unsigned long length; */ NS_IMETHODIMP nsFontFaceList::GetLength(uint32_t *aLength) { diff --git a/layout/printing/nsPrintEngine.cpp b/layout/printing/nsPrintEngine.cpp index 0aba474089..8abfbc3b89 100644 --- a/layout/printing/nsPrintEngine.cpp +++ b/layout/printing/nsPrintEngine.cpp @@ -803,7 +803,6 @@ nsPrintEngine::PrintPreview(nsIPrintSettings* aPrintSettings, } //---------------------------------------------------------------------------------- -/* readonly attribute boolean isFramesetDocument; */ NS_IMETHODIMP nsPrintEngine::GetIsFramesetDocument(bool *aIsFramesetDocument) { @@ -813,7 +812,6 @@ nsPrintEngine::GetIsFramesetDocument(bool *aIsFramesetDocument) } //---------------------------------------------------------------------------------- -/* readonly attribute boolean isIFrameSelected; */ NS_IMETHODIMP nsPrintEngine::GetIsIFrameSelected(bool *aIsIFrameSelected) { @@ -834,7 +832,6 @@ nsPrintEngine::GetIsIFrameSelected(bool *aIsIFrameSelected) } //---------------------------------------------------------------------------------- -/* readonly attribute boolean isRangeSelection; */ NS_IMETHODIMP nsPrintEngine::GetIsRangeSelection(bool *aIsRangeSelection) { @@ -845,7 +842,6 @@ nsPrintEngine::GetIsRangeSelection(bool *aIsRangeSelection) } //---------------------------------------------------------------------------------- -/* readonly attribute boolean isFramesetFrameSelected; */ NS_IMETHODIMP nsPrintEngine::GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected) { @@ -856,7 +852,6 @@ nsPrintEngine::GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected) } //---------------------------------------------------------------------------------- -/* readonly attribute long printPreviewNumPages; */ NS_IMETHODIMP nsPrintEngine::GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages) { @@ -918,7 +913,6 @@ nsPrintEngine::EnumerateDocumentNames(uint32_t* aCount, } //---------------------------------------------------------------------------------- -/* readonly attribute nsIPrintSettings globalPrintSettings; */ nsresult nsPrintEngine::GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings) { @@ -934,7 +928,6 @@ nsPrintEngine::GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings) } //---------------------------------------------------------------------------------- -/* readonly attribute boolean doingPrint; */ NS_IMETHODIMP nsPrintEngine::GetDoingPrint(bool *aDoingPrint) { @@ -944,7 +937,6 @@ nsPrintEngine::GetDoingPrint(bool *aDoingPrint) } //---------------------------------------------------------------------------------- -/* readonly attribute boolean doingPrintPreview; */ NS_IMETHODIMP nsPrintEngine::GetDoingPrintPreview(bool *aDoingPrintPreview) { @@ -954,7 +946,6 @@ nsPrintEngine::GetDoingPrintPreview(bool *aDoingPrintPreview) } //---------------------------------------------------------------------------------- -/* readonly attribute nsIPrintSettings currentPrintSettings; */ NS_IMETHODIMP nsPrintEngine::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) { diff --git a/layout/xul/ScrollBoxObject.cpp b/layout/xul/ScrollBoxObject.cpp index d4fb194d91..207b7cc9e8 100644 --- a/layout/xul/ScrollBoxObject.cpp +++ b/layout/xul/ScrollBoxObject.cpp @@ -36,7 +36,6 @@ nsIScrollableFrame* ScrollBoxObject::GetScrollFrame() return do_QueryFrame(GetFrame(false)); } -/* void scrollTo (long x, long y); */ void ScrollBoxObject::ScrollTo(int32_t x, int32_t y, ErrorResult& aRv) { nsIScrollableFrame* sf = GetScrollFrame(); @@ -48,7 +47,6 @@ void ScrollBoxObject::ScrollTo(int32_t x, int32_t y, ErrorResult& aRv) sf->ScrollToCSSPixels(CSSIntPoint(x, y)); } -/* void scrollBy (long dx, long dy); */ void ScrollBoxObject::ScrollBy(int32_t dx, int32_t dy, ErrorResult& aRv) { CSSIntPoint pt; @@ -61,7 +59,6 @@ void ScrollBoxObject::ScrollBy(int32_t dx, int32_t dy, ErrorResult& aRv) ScrollTo(pt.x + dx, pt.y + dy, aRv); } -/* void scrollByLine (long dlines); */ void ScrollBoxObject::ScrollByLine(int32_t dlines, ErrorResult& aRv) { nsIScrollableFrame* sf = GetScrollFrame(); @@ -98,7 +95,6 @@ static nsIFrame* GetScrolledBox(BoxObject* aScrollBox) { return nsBox::GetChildBox(scrolledFrame); } -/* void scrollByIndex (long dindexes); */ void ScrollBoxObject::ScrollByIndex(int32_t dindexes, ErrorResult& aRv) { nsIScrollableFrame* sf = GetScrollFrame(); @@ -216,7 +212,6 @@ void ScrollBoxObject::ScrollByIndex(int32_t dindexes, ErrorResult& aRv) } } -/* void scrollToLine (in long line); */ void ScrollBoxObject::ScrollToLine(int32_t line, ErrorResult& aRv) { nsIScrollableFrame* sf = GetScrollFrame(); @@ -231,7 +226,6 @@ void ScrollBoxObject::ScrollToLine(int32_t line, ErrorResult& aRv) sf->ScrollTo(nsPoint(0, y), nsIScrollableFrame::INSTANT, &range); } -/* void scrollToElement (Element child); */ void ScrollBoxObject::ScrollToElement(Element& child, ErrorResult& aRv) { nsCOMPtr shell = GetPresShell(false); @@ -251,7 +245,6 @@ void ScrollBoxObject::ScrollToElement(Element& child, ErrorResult& aRv) nsIPresShell::SCROLL_OVERFLOW_HIDDEN); } -/* void scrollToIndex (long index); */ void ScrollBoxObject::ScrollToIndex(int32_t index, ErrorResult& aRv) { aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); @@ -351,7 +344,6 @@ void ScrollBoxObject::GetScrolledSize(JSContext* cx, } } -/* void ensureElementIsVisible (in nsIDOMElement child); */ void ScrollBoxObject::EnsureElementIsVisible(Element& child, ErrorResult& aRv) { nsCOMPtr shell = GetPresShell(false); @@ -367,13 +359,11 @@ void ScrollBoxObject::EnsureElementIsVisible(Element& child, ErrorResult& aRv) nsIPresShell::SCROLL_OVERFLOW_HIDDEN); } -/* void ensureIndexIsVisible (long index); */ void ScrollBoxObject::EnsureIndexIsVisible(int32_t index, ErrorResult& aRv) { aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); } -/* void ensureLineIsVisible (long line); */ void ScrollBoxObject::EnsureLineIsVisible(int32_t line, ErrorResult& aRv) { aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); diff --git a/layout/xul/nsImageBoxFrame.cpp b/layout/xul/nsImageBoxFrame.cpp index 49d3acb346..8254df3e83 100644 --- a/layout/xul/nsImageBoxFrame.cpp +++ b/layout/xul/nsImageBoxFrame.cpp @@ -788,7 +788,6 @@ nsImageBoxListener::Notify(imgIRequest *request, int32_t aType, const nsIntRect* return mFrame->Notify(request, aType, aData); } -/* void blockOnload (in imgIRequest aRequest); */ NS_IMETHODIMP nsImageBoxListener::BlockOnload(imgIRequest *aRequest) { @@ -799,7 +798,6 @@ nsImageBoxListener::BlockOnload(imgIRequest *aRequest) return NS_OK; } -/* void unblockOnload (in imgIRequest aRequest); */ NS_IMETHODIMP nsImageBoxListener::UnblockOnload(imgIRequest *aRequest) { diff --git a/modules/libjar/zipwriter/nsDeflateConverter.cpp b/modules/libjar/zipwriter/nsDeflateConverter.cpp index 77eb825db2..40ee1b8343 100644 --- a/modules/libjar/zipwriter/nsDeflateConverter.cpp +++ b/modules/libjar/zipwriter/nsDeflateConverter.cpp @@ -139,7 +139,6 @@ NS_IMETHODIMP nsDeflateConverter::OnDataAvailable(nsIRequest *aRequest, return NS_OK; } -/* void onStartRequest (in nsIRequest aRequest, in nsISupports aContext); */ NS_IMETHODIMP nsDeflateConverter::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) { diff --git a/modules/libjar/zipwriter/nsZipDataStream.cpp b/modules/libjar/zipwriter/nsZipDataStream.cpp index f7fcb622a5..4b3b7b18c1 100644 --- a/modules/libjar/zipwriter/nsZipDataStream.cpp +++ b/modules/libjar/zipwriter/nsZipDataStream.cpp @@ -80,7 +80,6 @@ NS_IMETHODIMP nsZipDataStream::OnDataAvailable(nsIRequest *aRequest, return ProcessData(aRequest, aContext, buffer.get(), aOffset, aCount); } -/* void onStartRequest (in nsIRequest aRequest, in nsISupports aContext); */ NS_IMETHODIMP nsZipDataStream::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) { diff --git a/modules/libjar/zipwriter/nsZipHeader.cpp b/modules/libjar/zipwriter/nsZipHeader.cpp index c377261352..bc05bed37b 100644 --- a/modules/libjar/zipwriter/nsZipHeader.cpp +++ b/modules/libjar/zipwriter/nsZipHeader.cpp @@ -23,7 +23,6 @@ */ NS_IMPL_ISUPPORTS(nsZipHeader, nsIZipEntry) -/* readonly attribute unsigned short compression; */ NS_IMETHODIMP nsZipHeader::GetCompression(uint16_t *aCompression) { NS_ASSERTION(mInited, "Not initalised"); @@ -32,7 +31,6 @@ NS_IMETHODIMP nsZipHeader::GetCompression(uint16_t *aCompression) return NS_OK; } -/* readonly attribute unsigned long size; */ NS_IMETHODIMP nsZipHeader::GetSize(uint32_t *aSize) { NS_ASSERTION(mInited, "Not initalised"); @@ -41,7 +39,6 @@ NS_IMETHODIMP nsZipHeader::GetSize(uint32_t *aSize) return NS_OK; } -/* readonly attribute unsigned long realSize; */ NS_IMETHODIMP nsZipHeader::GetRealSize(uint32_t *aRealSize) { NS_ASSERTION(mInited, "Not initalised"); @@ -50,7 +47,6 @@ NS_IMETHODIMP nsZipHeader::GetRealSize(uint32_t *aRealSize) return NS_OK; } -/* readonly attribute unsigned long CRC32; */ NS_IMETHODIMP nsZipHeader::GetCRC32(uint32_t *aCRC32) { NS_ASSERTION(mInited, "Not initalised"); @@ -59,7 +55,6 @@ NS_IMETHODIMP nsZipHeader::GetCRC32(uint32_t *aCRC32) return NS_OK; } -/* readonly attribute boolean isDirectory; */ NS_IMETHODIMP nsZipHeader::GetIsDirectory(bool *aIsDirectory) { NS_ASSERTION(mInited, "Not initalised"); @@ -71,7 +66,6 @@ NS_IMETHODIMP nsZipHeader::GetIsDirectory(bool *aIsDirectory) return NS_OK; } -/* readonly attribute PRTime lastModifiedTime; */ NS_IMETHODIMP nsZipHeader::GetLastModifiedTime(PRTime *aLastModifiedTime) { NS_ASSERTION(mInited, "Not initalised"); @@ -118,7 +112,6 @@ NS_IMETHODIMP nsZipHeader::GetLastModifiedTime(PRTime *aLastModifiedTime) return NS_OK; } -/* readonly attribute boolean isSynthetic; */ NS_IMETHODIMP nsZipHeader::GetIsSynthetic(bool *aIsSynthetic) { NS_ASSERTION(mInited, "Not initalised"); @@ -127,7 +120,6 @@ NS_IMETHODIMP nsZipHeader::GetIsSynthetic(bool *aIsSynthetic) return NS_OK; } -/* readonly attribute unsigned long permissions; */ NS_IMETHODIMP nsZipHeader::GetPermissions(uint32_t *aPermissions) { NS_ASSERTION(mInited, "Not initalised"); diff --git a/modules/libjar/zipwriter/nsZipWriter.cpp b/modules/libjar/zipwriter/nsZipWriter.cpp index 9b0b378379..9cf778267a 100644 --- a/modules/libjar/zipwriter/nsZipWriter.cpp +++ b/modules/libjar/zipwriter/nsZipWriter.cpp @@ -59,7 +59,6 @@ nsZipWriter::~nsZipWriter() Close(); } -/* attribute AString comment; */ NS_IMETHODIMP nsZipWriter::GetComment(nsACString & aComment) { if (!mStream) @@ -79,14 +78,12 @@ NS_IMETHODIMP nsZipWriter::SetComment(const nsACString & aComment) return NS_OK; } -/* readonly attribute boolean inQueue; */ NS_IMETHODIMP nsZipWriter::GetInQueue(bool *aInQueue) { *aInQueue = mInQueue; return NS_OK; } -/* readonly attribute nsIFile file; */ NS_IMETHODIMP nsZipWriter::GetFile(nsIFile **aFile) { if (!mFile) @@ -227,7 +224,6 @@ nsresult nsZipWriter::ReadFile(nsIFile *aFile) return NS_ERROR_UNEXPECTED; } -/* void open (in nsIFile aFile, in int32_t aIoFlags); */ NS_IMETHODIMP nsZipWriter::Open(nsIFile *aFile, int32_t aIoFlags) { if (mStream) @@ -286,7 +282,6 @@ NS_IMETHODIMP nsZipWriter::Open(nsIFile *aFile, int32_t aIoFlags) return NS_OK; } -/* nsIZipEntry getEntry (in AString aZipEntry); */ NS_IMETHODIMP nsZipWriter::GetEntry(const nsACString & aZipEntry, nsIZipEntry **_retval) { @@ -299,7 +294,6 @@ NS_IMETHODIMP nsZipWriter::GetEntry(const nsACString & aZipEntry, return NS_OK; } -/* boolean hasEntry (in AString aZipEntry); */ NS_IMETHODIMP nsZipWriter::HasEntry(const nsACString & aZipEntry, bool *_retval) { @@ -509,7 +503,6 @@ nsresult nsZipWriter::AddEntryStream(const nsACString & aZipEntry, return rv; } -/* void removeEntry (in AUTF8String aZipEntry, in boolean aQueue); */ NS_IMETHODIMP nsZipWriter::RemoveEntry(const nsACString & aZipEntry, bool aQueue) { @@ -626,7 +619,6 @@ NS_IMETHODIMP nsZipWriter::ProcessQueue(nsIRequestObserver *aObserver, return NS_OK; } -/* void close (); */ NS_IMETHODIMP nsZipWriter::Close() { if (!mStream) @@ -704,7 +696,6 @@ NS_IMETHODIMP nsZipWriter::Close() } // Our nsIRequestObserver monitors removal operations performed on the queue -/* void onStartRequest (in nsIRequest aRequest, in nsISupports aContext); */ NS_IMETHODIMP nsZipWriter::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) { diff --git a/modules/libpref/nsPrefBranch.cpp b/modules/libpref/nsPrefBranch.cpp index 9a16ed9f6c..d7beaee91a 100644 --- a/modules/libpref/nsPrefBranch.cpp +++ b/modules/libpref/nsPrefBranch.cpp @@ -501,7 +501,6 @@ NS_IMETHODIMP nsPrefBranch::UnlockPref(const char *aPrefName) return PREF_LockPref(pref, false); } -/* void resetBranch (in string startingAt); */ NS_IMETHODIMP nsPrefBranch::ResetBranch(const char *aStartingAt) { return NS_ERROR_NOT_IMPLEMENTED; diff --git a/netwerk/base/SchedulingContextService.cpp b/netwerk/base/SchedulingContextService.cpp index 24a172102a..0bbc557c42 100644 --- a/netwerk/base/SchedulingContextService.cpp +++ b/netwerk/base/SchedulingContextService.cpp @@ -73,7 +73,6 @@ SchedulingContext::RemoveBlockingTransaction(uint32_t *outval) return NS_OK; } -/* [noscript] attribute SpdyPushCachePtr spdyPushCache; */ NS_IMETHODIMP SchedulingContext::GetSpdyPushCache(mozilla::net::SpdyPushCache **aSpdyPushCache) { @@ -88,7 +87,6 @@ SchedulingContext::SetSpdyPushCache(mozilla::net::SpdyPushCache *aSpdyPushCache) return NS_OK; } -/* [noscript] readonly attribute nsID ID; */ NS_IMETHODIMP SchedulingContext::GetID(nsID *outval) { diff --git a/netwerk/base/nsLoadGroup.cpp b/netwerk/base/nsLoadGroup.cpp index 03dcde391d..6346353e0a 100644 --- a/netwerk/base/nsLoadGroup.cpp +++ b/netwerk/base/nsLoadGroup.cpp @@ -678,7 +678,6 @@ nsLoadGroup::GetSchedulingContextID(nsID *aSCID) //////////////////////////////////////////////////////////////////////////////// // nsILoadGroupChild methods: -/* attribute nsILoadGroup parentLoadGroup; */ NS_IMETHODIMP nsLoadGroup::GetParentLoadGroup(nsILoadGroup * *aParentLoadGroup) { @@ -697,7 +696,6 @@ nsLoadGroup::SetParentLoadGroup(nsILoadGroup *aParentLoadGroup) return NS_OK; } -/* readonly attribute nsILoadGroup childLoadGroup; */ NS_IMETHODIMP nsLoadGroup::GetChildLoadGroup(nsILoadGroup * *aChildLoadGroup) { @@ -705,7 +703,6 @@ nsLoadGroup::GetChildLoadGroup(nsILoadGroup * *aChildLoadGroup) return NS_OK; } -/* readonly attribute nsILoadGroup rootLoadGroup; */ NS_IMETHODIMP nsLoadGroup::GetRootLoadGroup(nsILoadGroup * *aRootLoadGroup) { diff --git a/netwerk/base/nsMIMEInputStream.cpp b/netwerk/base/nsMIMEInputStream.cpp index 2fba15901d..7a65ac8b1b 100644 --- a/netwerk/base/nsMIMEInputStream.cpp +++ b/netwerk/base/nsMIMEInputStream.cpp @@ -114,7 +114,6 @@ NS_METHOD nsMIMEInputStream::Init() } -/* attribute boolean addContentLength; */ NS_IMETHODIMP nsMIMEInputStream::GetAddContentLength(bool *aAddContentLength) { @@ -129,7 +128,6 @@ nsMIMEInputStream::SetAddContentLength(bool aAddContentLength) return NS_OK; } -/* void addHeader ([const] in string name, [const] in string value); */ NS_IMETHODIMP nsMIMEInputStream::AddHeader(const char *aName, const char *aValue) { @@ -147,7 +145,6 @@ nsMIMEInputStream::AddHeader(const char *aName, const char *aValue) return NS_OK; } -/* void setData (in nsIInputStream stream); */ NS_IMETHODIMP nsMIMEInputStream::SetData(nsIInputStream *aStream) { diff --git a/netwerk/base/nsNetAddr.cpp b/netwerk/base/nsNetAddr.cpp index 6709dc082a..8d6f245cf3 100644 --- a/netwerk/base/nsNetAddr.cpp +++ b/netwerk/base/nsNetAddr.cpp @@ -19,7 +19,6 @@ nsNetAddr::nsNetAddr(NetAddr* addr) mAddr = *addr; } -/* readonly attribute unsigned short family; */ NS_IMETHODIMP nsNetAddr::GetFamily(uint16_t *aFamily) { switch(mAddr.raw.family) { @@ -41,7 +40,6 @@ NS_IMETHODIMP nsNetAddr::GetFamily(uint16_t *aFamily) return NS_OK; } -/* readonly attribute AUTF8String address; */ NS_IMETHODIMP nsNetAddr::GetAddress(nsACString & aAddress) { switch(mAddr.raw.family) { @@ -69,7 +67,6 @@ NS_IMETHODIMP nsNetAddr::GetAddress(nsACString & aAddress) return NS_OK; } -/* readonly attribute unsigned short port; */ NS_IMETHODIMP nsNetAddr::GetPort(uint16_t *aPort) { switch(mAddr.raw.family) { @@ -91,7 +88,6 @@ NS_IMETHODIMP nsNetAddr::GetPort(uint16_t *aPort) return NS_OK; } -/* readonly attribute unsigned long flow; */ NS_IMETHODIMP nsNetAddr::GetFlow(uint32_t *aFlow) { switch(mAddr.raw.family) { @@ -111,7 +107,6 @@ NS_IMETHODIMP nsNetAddr::GetFlow(uint32_t *aFlow) return NS_OK; } -/* readonly attribute unsigned long scope; */ NS_IMETHODIMP nsNetAddr::GetScope(uint32_t *aScope) { switch(mAddr.raw.family) { @@ -131,7 +126,6 @@ NS_IMETHODIMP nsNetAddr::GetScope(uint32_t *aScope) return NS_OK; } -/* readonly attribute boolean isV4Mapped; */ NS_IMETHODIMP nsNetAddr::GetIsV4Mapped(bool *aIsV4Mapped) { switch(mAddr.raw.family) { diff --git a/netwerk/base/nsSocketTransport2.cpp b/netwerk/base/nsSocketTransport2.cpp index d00bad887e..d844002507 100644 --- a/netwerk/base/nsSocketTransport2.cpp +++ b/netwerk/base/nsSocketTransport2.cpp @@ -2285,7 +2285,6 @@ nsSocketTransport::Bind(NetAddr *aLocalAddr) return NS_OK; } -/* nsINetAddr getScriptablePeerAddr (); */ NS_IMETHODIMP nsSocketTransport::GetScriptablePeerAddr(nsINetAddr * *addr) { @@ -2301,7 +2300,6 @@ nsSocketTransport::GetScriptablePeerAddr(nsINetAddr * *addr) return NS_OK; } -/* nsINetAddr getScriptableSelfAddr (); */ NS_IMETHODIMP nsSocketTransport::GetScriptableSelfAddr(nsINetAddr * *addr) { diff --git a/netwerk/base/nsStreamLoader.cpp b/netwerk/base/nsStreamLoader.cpp index e3a261a177..c5b37477ed 100644 --- a/netwerk/base/nsStreamLoader.cpp +++ b/netwerk/base/nsStreamLoader.cpp @@ -55,7 +55,6 @@ nsStreamLoader::GetNumBytesRead(uint32_t* aNumBytes) return NS_OK; } -/* readonly attribute nsIRequest request; */ NS_IMETHODIMP nsStreamLoader::GetRequest(nsIRequest **aRequest) { diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp index c45e68a7ce..16bed5463f 100644 --- a/netwerk/base/nsUDPSocket.cpp +++ b/netwerk/base/nsUDPSocket.cpp @@ -274,7 +274,6 @@ nsUDPOutputStream::~nsUDPOutputStream() { } -/* void close (); */ NS_IMETHODIMP nsUDPOutputStream::Close() { if (mIsClosed) @@ -284,13 +283,11 @@ NS_IMETHODIMP nsUDPOutputStream::Close() return NS_OK; } -/* void flush (); */ NS_IMETHODIMP nsUDPOutputStream::Flush() { return NS_OK; } -/* unsigned long write (in string aBuf, in unsigned long aCount); */ NS_IMETHODIMP nsUDPOutputStream::Write(const char * aBuf, uint32_t aCount, uint32_t *_retval) { if (mIsClosed) @@ -310,19 +307,16 @@ NS_IMETHODIMP nsUDPOutputStream::Write(const char * aBuf, uint32_t aCount, uint3 return NS_OK; } -/* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */ NS_IMETHODIMP nsUDPOutputStream::WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } -/* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */ NS_IMETHODIMP nsUDPOutputStream::WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } -/* boolean isNonBlocking (); */ NS_IMETHODIMP nsUDPOutputStream::IsNonBlocking(bool *_retval) { *_retval = true; @@ -368,7 +362,6 @@ nsUDPMessage::~nsUDPMessage() mozilla::DropJSObjects(this); } -/* readonly attribute nsINetAddr from; */ NS_IMETHODIMP nsUDPMessage::GetFromAddr(nsINetAddr * *aFromAddr) { @@ -380,7 +373,6 @@ nsUDPMessage::GetFromAddr(nsINetAddr * *aFromAddr) return NS_OK; } -/* readonly attribute ACString data; */ NS_IMETHODIMP nsUDPMessage::GetData(nsACString & aData) { @@ -388,7 +380,6 @@ nsUDPMessage::GetData(nsACString & aData) return NS_OK; } -/* readonly attribute nsIOutputStream outputStream; */ NS_IMETHODIMP nsUDPMessage::GetOutputStream(nsIOutputStream * *aOutputStream) { @@ -397,7 +388,6 @@ nsUDPMessage::GetOutputStream(nsIOutputStream * *aOutputStream) return NS_OK; } -/* readonly attribute jsval rawData; */ NS_IMETHODIMP nsUDPMessage::GetRawData(JSContext* cx, JS::MutableHandleValue aRawData) @@ -410,7 +400,6 @@ nsUDPMessage::GetRawData(JSContext* cx, return NS_OK; } -/* [noscript, notxpcom, nostdcall] Uint8ArrayRef getDataAsTArray(); */ FallibleTArray& nsUDPMessage::GetDataAsTArray() { @@ -574,7 +563,6 @@ private: NS_IMPL_ISUPPORTS(UDPMessageProxy, nsIUDPMessage) -/* readonly attribute nsINetAddr from; */ NS_IMETHODIMP UDPMessageProxy::GetFromAddr(nsINetAddr * *aFromAddr) { @@ -586,7 +574,6 @@ UDPMessageProxy::GetFromAddr(nsINetAddr * *aFromAddr) return NS_OK; } -/* readonly attribute ACString data; */ NS_IMETHODIMP UDPMessageProxy::GetData(nsACString & aData) { @@ -594,14 +581,12 @@ UDPMessageProxy::GetData(nsACString & aData) return NS_OK; } -/* [noscript, notxpcom, nostdcall] Uint8TArrayRef getDataAsTArray(); */ FallibleTArray& UDPMessageProxy::GetDataAsTArray() { return mData; } -/* readonly attribute jsval rawData; */ NS_IMETHODIMP UDPMessageProxy::GetRawData(JSContext* cx, JS::MutableHandleValue aRawData) @@ -609,7 +594,6 @@ UDPMessageProxy::GetRawData(JSContext* cx, return NS_ERROR_NOT_IMPLEMENTED; } -/* readonly attribute nsIOutputStream outputStream; */ NS_IMETHODIMP UDPMessageProxy::GetOutputStream(nsIOutputStream * *aOutputStream) { diff --git a/netwerk/base/nsUnicharStreamLoader.cpp b/netwerk/base/nsUnicharStreamLoader.cpp index 8e4c2c1d23..833ffd0513 100644 --- a/netwerk/base/nsUnicharStreamLoader.cpp +++ b/netwerk/base/nsUnicharStreamLoader.cpp @@ -49,7 +49,6 @@ nsUnicharStreamLoader::Create(nsISupports *aOuter, NS_IMPL_ISUPPORTS(nsUnicharStreamLoader, nsIUnicharStreamLoader, nsIRequestObserver, nsIStreamListener) -/* readonly attribute nsIChannel channel; */ NS_IMETHODIMP nsUnicharStreamLoader::GetChannel(nsIChannel **aChannel) { @@ -57,7 +56,6 @@ nsUnicharStreamLoader::GetChannel(nsIChannel **aChannel) return NS_OK; } -/* readonly attribute nsACString charset */ NS_IMETHODIMP nsUnicharStreamLoader::GetCharset(nsACString& aCharset) { diff --git a/netwerk/cache/nsDiskCacheDevice.cpp b/netwerk/cache/nsDiskCacheDevice.cpp index 6a56959d15..cf77c65833 100644 --- a/netwerk/cache/nsDiskCacheDevice.cpp +++ b/netwerk/cache/nsDiskCacheDevice.cpp @@ -192,7 +192,6 @@ private: NS_IMPL_ISUPPORTS(nsDiskCacheDeviceInfo, nsICacheDeviceInfo) -/* readonly attribute string description; */ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetDescription(char ** aDescription) { NS_ENSURE_ARG_POINTER(aDescription); @@ -200,7 +199,6 @@ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetDescription(char ** aDescription) return *aDescription ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* readonly attribute string usageReport; */ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetUsageReport(char ** usageReport) { NS_ENSURE_ARG_POINTER(usageReport); @@ -227,7 +225,6 @@ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetUsageReport(char ** usageReport) return NS_OK; } -/* readonly attribute unsigned long entryCount; */ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetEntryCount(uint32_t *aEntryCount) { NS_ENSURE_ARG_POINTER(aEntryCount); @@ -235,7 +232,6 @@ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetEntryCount(uint32_t *aEntryCount) return NS_OK; } -/* readonly attribute unsigned long totalSize; */ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetTotalSize(uint32_t *aTotalSize) { NS_ENSURE_ARG_POINTER(aTotalSize); @@ -244,7 +240,6 @@ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetTotalSize(uint32_t *aTotalSize) return NS_OK; } -/* readonly attribute unsigned long maximumSize; */ NS_IMETHODIMP nsDiskCacheDeviceInfo::GetMaximumSize(uint32_t *aMaximumSize) { NS_ENSURE_ARG_POINTER(aMaximumSize); diff --git a/netwerk/dns/nsIDNService.cpp b/netwerk/dns/nsIDNService.cpp index f80d33cce0..2f47a4d5d0 100644 --- a/netwerk/dns/nsIDNService.cpp +++ b/netwerk/dns/nsIDNService.cpp @@ -153,7 +153,6 @@ nsIDNService::~nsIDNService() idn_nameprep_destroy(mNamePrepHandle); } -/* ACString ConvertUTF8toACE (in AUTF8String input); */ NS_IMETHODIMP nsIDNService::ConvertUTF8toACE(const nsACString & input, nsACString & ace) { return UTF8toACE(input, ace, true, true); @@ -213,7 +212,6 @@ nsresult nsIDNService::UTF8toACE(const nsACString & input, nsACString & ace, boo return NS_OK; } -/* AUTF8String convertACEtoUTF8(in ACString input); */ NS_IMETHODIMP nsIDNService::ConvertACEtoUTF8(const nsACString & input, nsACString & _retval) { return ACEtoUTF8(input, _retval, true, true); @@ -267,7 +265,6 @@ nsresult nsIDNService::ACEtoUTF8(const nsACString & input, nsACString & _retval, return NS_OK; } -/* boolean isACE(in ACString input); */ NS_IMETHODIMP nsIDNService::IsACE(const nsACString & input, bool *_retval) { nsACString::const_iterator begin; @@ -286,7 +283,6 @@ NS_IMETHODIMP nsIDNService::IsACE(const nsACString & input, bool *_retval) return NS_OK; } -/* AUTF8String normalize(in AUTF8String input); */ NS_IMETHODIMP nsIDNService::Normalize(const nsACString & input, nsACString & output) { // protect against bogus input diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp index cfa7ddf529..8d2bd21edd 100644 --- a/netwerk/protocol/http/HttpChannelChild.cpp +++ b/netwerk/protocol/http/HttpChannelChild.cpp @@ -2046,7 +2046,6 @@ HttpChannelChild::GetAssociatedContentSecurity( return true; } -/* attribute unsigned long countSubRequestsBrokenSecurity; */ NS_IMETHODIMP HttpChannelChild::GetCountSubRequestsBrokenSecurity( int32_t *aSubRequestsBrokenSecurity) @@ -2068,7 +2067,6 @@ HttpChannelChild::SetCountSubRequestsBrokenSecurity( return assoc->SetCountSubRequestsBrokenSecurity(aSubRequestsBrokenSecurity); } -/* attribute unsigned long countSubRequestsNoSecurity; */ NS_IMETHODIMP HttpChannelChild::GetCountSubRequestsNoSecurity(int32_t *aSubRequestsNoSecurity) { diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index 96301812bf..bef98d368a 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -686,9 +686,6 @@ nsHttpChannel::SetupTransactionSchedulingContext() } nsCOMPtr sc; - char scid[NSID_LENGTH]; - mSchedulingContextID.ToProvidedString(scid); - fprintf(stderr, "NWGH: nsHttpChannel %p getting scheduling context %s\n", this, scid); nsresult rv = scsvc->GetSchedulingContext(mSchedulingContextID, getter_AddRefs(sc)); diff --git a/netwerk/protocol/rtsp/controller/RtspMetaData.cpp b/netwerk/protocol/rtsp/controller/RtspMetaData.cpp index 1ee5fb338b..4bf33bccc7 100644 --- a/netwerk/protocol/rtsp/controller/RtspMetaData.cpp +++ b/netwerk/protocol/rtsp/controller/RtspMetaData.cpp @@ -139,7 +139,6 @@ RtspMetaData::SetWidth(uint32_t aWidth) return NS_OK; } -/* attribute unsigned long height; */ NS_IMETHODIMP RtspMetaData::GetHeight(uint32_t *aHeight) { @@ -155,7 +154,6 @@ RtspMetaData::SetHeight(uint32_t aHeight) return NS_OK; } -/* attribute unsigned long long duration; */ NS_IMETHODIMP RtspMetaData::GetDuration(uint64_t *aDuration) { @@ -171,7 +169,6 @@ RtspMetaData::SetDuration(uint64_t aDuration) return NS_OK; } -/* attribute unsigned long sampleRate; */ NS_IMETHODIMP RtspMetaData::GetSampleRate(uint32_t *aSampleRate) { diff --git a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp index 00f2b94549..e1a5d341d8 100644 --- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp +++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp @@ -368,14 +368,12 @@ void WyciwygChannelChild::CancelEarly(const nsresult& statusCode) // nsIRequest //----------------------------------------------------------------------------- -/* readonly attribute AUTF8String name; */ NS_IMETHODIMP WyciwygChannelChild::GetName(nsACString & aName) { return mURI->GetSpec(aName); } -/* boolean isPending (); */ NS_IMETHODIMP WyciwygChannelChild::IsPending(bool *aIsPending) { @@ -383,7 +381,6 @@ WyciwygChannelChild::IsPending(bool *aIsPending) return NS_OK; } -/* readonly attribute nsresult status; */ NS_IMETHODIMP WyciwygChannelChild::GetStatus(nsresult *aStatus) { @@ -391,7 +388,6 @@ WyciwygChannelChild::GetStatus(nsresult *aStatus) return NS_OK; } -/* void cancel (in nsresult aStatus); */ NS_IMETHODIMP WyciwygChannelChild::Cancel(nsresult aStatus) { @@ -405,21 +401,18 @@ WyciwygChannelChild::Cancel(nsresult aStatus) return NS_OK; } -/* void suspend (); */ NS_IMETHODIMP WyciwygChannelChild::Suspend() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void resume (); */ NS_IMETHODIMP WyciwygChannelChild::Resume() { return NS_ERROR_NOT_IMPLEMENTED; } -/* attribute nsILoadGroup loadGroup; */ NS_IMETHODIMP WyciwygChannelChild::GetLoadGroup(nsILoadGroup * *aLoadGroup) { @@ -442,7 +435,6 @@ WyciwygChannelChild::SetLoadGroup(nsILoadGroup * aLoadGroup) return NS_OK; } -/* attribute nsLoadFlags loadFlags; */ NS_IMETHODIMP WyciwygChannelChild::GetLoadFlags(nsLoadFlags *aLoadFlags) { @@ -461,7 +453,6 @@ WyciwygChannelChild::SetLoadFlags(nsLoadFlags aLoadFlags) // nsIChannel //----------------------------------------------------------------------------- -/* attribute nsIURI originalURI; */ NS_IMETHODIMP WyciwygChannelChild::GetOriginalURI(nsIURI * *aOriginalURI) { @@ -479,7 +470,6 @@ WyciwygChannelChild::SetOriginalURI(nsIURI * aOriginalURI) return NS_OK; } -/* readonly attribute nsIURI URI; */ NS_IMETHODIMP WyciwygChannelChild::GetURI(nsIURI * *aURI) { @@ -488,7 +478,6 @@ WyciwygChannelChild::GetURI(nsIURI * *aURI) return NS_OK; } -/* attribute nsISupports owner; */ NS_IMETHODIMP WyciwygChannelChild::GetOwner(nsISupports * *aOwner) { @@ -516,7 +505,6 @@ WyciwygChannelChild::SetLoadInfo(nsILoadInfo* aLoadInfo) return NS_OK; } -/* attribute nsIInterfaceRequestor notificationCallbacks; */ NS_IMETHODIMP WyciwygChannelChild::GetNotificationCallbacks(nsIInterfaceRequestor * *aCallbacks) { @@ -539,7 +527,6 @@ WyciwygChannelChild::SetNotificationCallbacks(nsIInterfaceRequestor * aCallbacks return NS_OK; } -/* readonly attribute nsISupports securityInfo; */ NS_IMETHODIMP WyciwygChannelChild::GetSecurityInfo(nsISupports * *aSecurityInfo) { @@ -548,7 +535,6 @@ WyciwygChannelChild::GetSecurityInfo(nsISupports * *aSecurityInfo) return NS_OK; } -/* attribute ACString contentType; */ NS_IMETHODIMP WyciwygChannelChild::GetContentType(nsACString & aContentType) { @@ -561,7 +547,6 @@ WyciwygChannelChild::SetContentType(const nsACString & aContentType) return NS_ERROR_NOT_IMPLEMENTED; } -/* attribute ACString contentCharset; */ NS_IMETHODIMP WyciwygChannelChild::GetContentCharset(nsACString & aContentCharset) { @@ -604,7 +589,6 @@ WyciwygChannelChild::GetContentDispositionHeader(nsACString &aContentDisposition return NS_ERROR_NOT_AVAILABLE; } -/* attribute int64_t contentLength; */ NS_IMETHODIMP WyciwygChannelChild::GetContentLength(int64_t *aContentLength) { @@ -616,7 +600,6 @@ WyciwygChannelChild::SetContentLength(int64_t aContentLength) return NS_ERROR_NOT_IMPLEMENTED; } -/* nsIInputStream open (); */ NS_IMETHODIMP WyciwygChannelChild::Open(nsIInputStream **_retval) { @@ -640,7 +623,6 @@ GetTabChild(nsIChannel* aChannel) return iTabChild ? static_cast(iTabChild.get()) : nullptr; } -/* void asyncOpen (in nsIStreamListener aListener, in nsISupports aContext); */ NS_IMETHODIMP WyciwygChannelChild::AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext) { @@ -695,7 +677,6 @@ WyciwygChannelChild::AsyncOpen2(nsIStreamListener *aListener) // nsIWyciwygChannel //----------------------------------------------------------------------------- -/* void writeToCacheEntry (in AString aData); */ NS_IMETHODIMP WyciwygChannelChild::WriteToCacheEntry(const nsAString & aData) { @@ -717,7 +698,6 @@ WyciwygChannelChild::WriteToCacheEntry(const nsAString & aData) return NS_OK; } -/* void closeCacheEntry (in nsresult reason); */ NS_IMETHODIMP WyciwygChannelChild::CloseCacheEntry(nsresult reason) { @@ -732,7 +712,6 @@ WyciwygChannelChild::CloseCacheEntry(nsresult reason) return NS_OK; } -/* void setSecurityInfo (in nsISupports aSecurityInfo); */ NS_IMETHODIMP WyciwygChannelChild::SetSecurityInfo(nsISupports *aSecurityInfo) { @@ -753,7 +732,6 @@ WyciwygChannelChild::SetSecurityInfo(nsISupports *aSecurityInfo) return NS_OK; } -/* void setCharsetAndSource (in long aSource, in ACString aCharset); */ NS_IMETHODIMP WyciwygChannelChild::SetCharsetAndSource(int32_t aSource, const nsACString & aCharset) { @@ -770,7 +748,6 @@ WyciwygChannelChild::SetCharsetAndSource(int32_t aSource, const nsACString & aCh return NS_OK; } -/* ACString getCharsetAndSource (out long aSource); */ NS_IMETHODIMP WyciwygChannelChild::GetCharsetAndSource(int32_t *aSource, nsACString & _retval) { diff --git a/netwerk/sctp/src/netinet/sctp_pcb.h b/netwerk/sctp/src/netinet/sctp_pcb.h index bcd2864d47..6cda3408c7 100755 --- a/netwerk/sctp/src/netinet/sctp_pcb.h +++ b/netwerk/sctp/src/netinet/sctp_pcb.h @@ -839,7 +839,6 @@ sctp_set_primary_addr(struct sctp_tcb *, struct sockaddr *, int sctp_is_vtag_good(uint32_t, uint16_t lport, uint16_t rport, struct timeval *); -/* void sctp_drain(void); */ int sctp_destination_is_reachable(struct sctp_tcb *, struct sockaddr *); diff --git a/security/manager/pki/nsASN1Tree.cpp b/security/manager/pki/nsASN1Tree.cpp index 2b838297aa..9f2888009a 100644 --- a/security/manager/pki/nsASN1Tree.cpp +++ b/security/manager/pki/nsASN1Tree.cpp @@ -111,7 +111,6 @@ void nsNSSASN1Tree::InitNodes() InitChildsRecursively(mTopNode); } -/* void loadASN1Structure (in nsIASN1Object asn1Object); */ NS_IMETHODIMP nsNSSASN1Tree::LoadASN1Structure(nsIASN1Object *asn1Object) { @@ -147,7 +146,6 @@ nsNSSASN1Tree::LoadASN1Structure(nsIASN1Object *asn1Object) return NS_OK; } -/* readonly attribute long rowCount; */ NS_IMETHODIMP nsNSSASN1Tree::GetRowCount(int32_t *aRowCount) { @@ -159,7 +157,6 @@ nsNSSASN1Tree::GetRowCount(int32_t *aRowCount) return NS_OK; } -/* attribute nsITreeSelection selection; */ NS_IMETHODIMP nsNSSASN1Tree::GetSelection(nsITreeSelection * *aSelection) { @@ -194,7 +191,6 @@ nsNSSASN1Tree::GetColumnProperties(nsITreeColumn* col, nsAString& aProps) return NS_OK; } -/* boolean isContainer (in long index); */ NS_IMETHODIMP nsNSSASN1Tree::IsContainer(int32_t index, bool *_retval) { @@ -206,7 +202,6 @@ nsNSSASN1Tree::IsContainer(int32_t index, bool *_retval) return NS_OK; } -/* boolean isContainerOpen (in long index); */ NS_IMETHODIMP nsNSSASN1Tree::IsContainerOpen(int32_t index, bool *_retval) { @@ -218,7 +213,6 @@ nsNSSASN1Tree::IsContainerOpen(int32_t index, bool *_retval) return NS_OK; } -/* boolean isContainerEmpty (in long index); */ NS_IMETHODIMP nsNSSASN1Tree::IsContainerEmpty(int32_t index, bool *_retval) { @@ -226,7 +220,6 @@ nsNSSASN1Tree::IsContainerEmpty(int32_t index, bool *_retval) return NS_OK; } -/* boolean isSeparator (in long index); */ NS_IMETHODIMP nsNSSASN1Tree::IsSeparator(int32_t index, bool *_retval) { @@ -234,7 +227,6 @@ nsNSSASN1Tree::IsSeparator(int32_t index, bool *_retval) return NS_OK; } -/* long getLevel (in long index); */ NS_IMETHODIMP nsNSSASN1Tree::GetLevel(int32_t index, int32_t *_retval) { @@ -249,7 +241,6 @@ nsNSSASN1Tree::GetLevel(int32_t index, int32_t *_retval) return NS_OK; } -/* Astring getImageSrc (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::GetImageSrc(int32_t row, nsITreeColumn* col, nsAString& _retval) @@ -257,14 +248,12 @@ nsNSSASN1Tree::GetImageSrc(int32_t row, nsITreeColumn* col, return NS_OK; } -/* long getProgressMode (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::GetProgressMode(int32_t row, nsITreeColumn* col, int32_t* _retval) { return NS_OK; } -/* Astring getCellValue (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::GetCellValue(int32_t row, nsITreeColumn* col, nsAString& _retval) @@ -272,7 +261,6 @@ nsNSSASN1Tree::GetCellValue(int32_t row, nsITreeColumn* col, return NS_OK; } -/* Astring getCellText (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::GetCellText(int32_t row, nsITreeColumn* col, nsAString& _retval) @@ -287,7 +275,6 @@ nsNSSASN1Tree::GetCellText(int32_t row, nsITreeColumn* col, return n->obj->GetDisplayName(_retval); } -/* wstring getDisplayData (in unsigned long index); */ NS_IMETHODIMP nsNSSASN1Tree::GetDisplayData(uint32_t index, nsAString &_retval) { @@ -299,7 +286,6 @@ nsNSSASN1Tree::GetDisplayData(uint32_t index, nsAString &_retval) return NS_OK; } -/* void setTree (in nsITreeBoxObject tree); */ NS_IMETHODIMP nsNSSASN1Tree::SetTree(nsITreeBoxObject *tree) { @@ -307,7 +293,6 @@ nsNSSASN1Tree::SetTree(nsITreeBoxObject *tree) return NS_OK; } -/* void toggleOpenState (in long index); */ NS_IMETHODIMP nsNSSASN1Tree::ToggleOpenState(int32_t index) { @@ -333,28 +318,24 @@ nsNSSASN1Tree::ToggleOpenState(int32_t index) return NS_OK; } -/* void cycleHeader (in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::CycleHeader(nsITreeColumn* col) { return NS_OK; } -/* void selectionChanged (); */ NS_IMETHODIMP nsNSSASN1Tree::SelectionChanged() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void cycleCell (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::CycleCell(int32_t row, nsITreeColumn* col) { return NS_OK; } -/* boolean isEditable (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::IsEditable(int32_t row, nsITreeColumn* col, bool *_retval) @@ -363,7 +344,6 @@ nsNSSASN1Tree::IsEditable(int32_t row, nsITreeColumn* col, return NS_OK; } -/* boolean isSelectable (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::IsSelectable(int32_t row, nsITreeColumn* col, bool *_retval) @@ -372,7 +352,6 @@ nsNSSASN1Tree::IsSelectable(int32_t row, nsITreeColumn* col, return NS_OK; } -/* void setCellValue (in long row, in nsITreeColumn col, in AString value); */ NS_IMETHODIMP nsNSSASN1Tree::SetCellValue(int32_t row, nsITreeColumn* col, const nsAString& value) @@ -380,7 +359,6 @@ nsNSSASN1Tree::SetCellValue(int32_t row, nsITreeColumn* col, return NS_OK; } -/* void setCellText (in long row, in nsITreeColumn col, in AString value); */ NS_IMETHODIMP nsNSSASN1Tree::SetCellText(int32_t row, nsITreeColumn* col, const nsAString& value) @@ -388,21 +366,18 @@ nsNSSASN1Tree::SetCellText(int32_t row, nsITreeColumn* col, return NS_OK; } -/* void performAction (in wstring action); */ NS_IMETHODIMP nsNSSASN1Tree::PerformAction(const char16_t *action) { return NS_OK; } -/* void performActionOnRow (in wstring action, in long row); */ NS_IMETHODIMP nsNSSASN1Tree::PerformActionOnRow(const char16_t *action, int32_t row) { return NS_OK; } -/* void performActionOnCell (in wstring action, in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsNSSASN1Tree::PerformActionOnCell(const char16_t *action, int32_t row, nsITreeColumn* col) @@ -444,7 +419,6 @@ NS_IMETHODIMP nsNSSASN1Tree::IsSorted(bool *_retval) } -/* long getParentIndex (in long rowIndex); */ NS_IMETHODIMP nsNSSASN1Tree::GetParentIndex(int32_t rowIndex, int32_t *_retval) { @@ -458,7 +432,6 @@ nsNSSASN1Tree::GetParentIndex(int32_t rowIndex, int32_t *_retval) return NS_OK; } -/* boolean hasNextSibling (in long rowIndex, in long afterIndex); */ NS_IMETHODIMP nsNSSASN1Tree::HasNextSibling(int32_t rowIndex, int32_t afterIndex, bool *_retval) diff --git a/security/manager/pki/nsNSSDialogs.cpp b/security/manager/pki/nsNSSDialogs.cpp index 5240be2d7e..447aff2290 100644 --- a/security/manager/pki/nsNSSDialogs.cpp +++ b/security/manager/pki/nsNSSDialogs.cpp @@ -410,7 +410,6 @@ nsNSSDialogs::GetPKCS12FilePassword(nsIInterfaceRequestor* ctx, return NS_OK; } -/* void viewCert (in nsIX509Cert cert); */ NS_IMETHODIMP nsNSSDialogs::ViewCert(nsIInterfaceRequestor *ctx, nsIX509Cert *cert) diff --git a/security/manager/pki/nsPKIParamBlock.cpp b/security/manager/pki/nsPKIParamBlock.cpp index 3cc96b603f..1a3885fab8 100644 --- a/security/manager/pki/nsPKIParamBlock.cpp +++ b/security/manager/pki/nsPKIParamBlock.cpp @@ -72,7 +72,6 @@ nsPKIParamBlock::SetObjects(nsIMutableArray * aObjects) -/* void setISupportAtIndex (in int32_t index, in nsISupports object); */ NS_IMETHODIMP nsPKIParamBlock::SetISupportAtIndex(int32_t index, nsISupports *object) { @@ -87,7 +86,6 @@ nsPKIParamBlock::SetISupportAtIndex(int32_t index, nsISupports *object) return NS_OK; } -/* nsISupports getISupportAtIndex (in int32_t index); */ NS_IMETHODIMP nsPKIParamBlock::GetISupportAtIndex(int32_t index, nsISupports **_retval) { diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp index 6dcd000e94..07cfaef282 100644 --- a/security/manager/ssl/TransportSecurityInfo.cpp +++ b/security/manager/ssl/TransportSecurityInfo.cpp @@ -133,7 +133,6 @@ TransportSecurityInfo::SetSecurityState(uint32_t aState) return NS_OK; } -/* attribute unsigned long countSubRequestsBrokenSecurity; */ NS_IMETHODIMP TransportSecurityInfo::GetCountSubRequestsBrokenSecurity( int32_t *aSubRequestsBrokenSecurity) @@ -150,7 +149,6 @@ TransportSecurityInfo::SetCountSubRequestsBrokenSecurity( return NS_OK; } -/* attribute unsigned long countSubRequestsNoSecurity; */ NS_IMETHODIMP TransportSecurityInfo::GetCountSubRequestsNoSecurity( int32_t *aSubRequestsNoSecurity) @@ -278,7 +276,6 @@ TransportSecurityInfo::GetErrorCode(int32_t* state) return NS_OK; } -/* void getInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ NS_IMETHODIMP TransportSecurityInfo::GetInterface(const nsIID & uuid, void * *result) { diff --git a/security/manager/ssl/nsCertTree.cpp b/security/manager/ssl/nsCertTree.cpp index 159b00a5b1..a8156d34b8 100644 --- a/security/manager/ssl/nsCertTree.cpp +++ b/security/manager/ssl/nsCertTree.cpp @@ -807,7 +807,6 @@ nsCertTree::DeleteEntryObject(uint32_t index) // ///////////////////////////////////////////////////////////////////////////// -/* nsIX509Cert getCert(in unsigned long index); */ NS_IMETHODIMP nsCertTree::GetCert(uint32_t aIndex, nsIX509Cert **_cert) { @@ -843,7 +842,6 @@ nsCertTree::IsHostPortOverride(uint32_t aIndex, bool *_retval) return NS_OK; } -/* readonly attribute long rowCount; */ NS_IMETHODIMP nsCertTree::GetRowCount(int32_t *aRowCount) { @@ -860,7 +858,6 @@ nsCertTree::GetRowCount(int32_t *aRowCount) return NS_OK; } -/* attribute nsITreeSelection selection; */ NS_IMETHODIMP nsCertTree::GetSelection(nsITreeSelection * *aSelection) { @@ -894,7 +891,6 @@ nsCertTree::GetColumnProperties(nsITreeColumn* col, nsAString& aProps) { return NS_OK; } -/* boolean isContainer (in long index); */ NS_IMETHODIMP nsCertTree::IsContainer(int32_t index, bool *_retval) { @@ -909,7 +905,6 @@ nsCertTree::IsContainer(int32_t index, bool *_retval) return NS_OK; } -/* boolean isContainerOpen (in long index); */ NS_IMETHODIMP nsCertTree::IsContainerOpen(int32_t index, bool *_retval) { @@ -924,7 +919,6 @@ nsCertTree::IsContainerOpen(int32_t index, bool *_retval) return NS_OK; } -/* boolean isContainerEmpty (in long index); */ NS_IMETHODIMP nsCertTree::IsContainerEmpty(int32_t index, bool *_retval) { @@ -932,7 +926,6 @@ nsCertTree::IsContainerEmpty(int32_t index, bool *_retval) return NS_OK; } -/* boolean isSeparator (in long index); */ NS_IMETHODIMP nsCertTree::IsSeparator(int32_t index, bool *_retval) { @@ -940,7 +933,6 @@ nsCertTree::IsSeparator(int32_t index, bool *_retval) return NS_OK; } -/* long getParentIndex (in long rowIndex); */ NS_IMETHODIMP nsCertTree::GetParentIndex(int32_t rowIndex, int32_t *_retval) { @@ -960,7 +952,6 @@ nsCertTree::GetParentIndex(int32_t rowIndex, int32_t *_retval) return NS_OK; } -/* boolean hasNextSibling (in long rowIndex, in long afterIndex); */ NS_IMETHODIMP nsCertTree::HasNextSibling(int32_t rowIndex, int32_t afterIndex, bool *_retval) @@ -982,7 +973,6 @@ nsCertTree::HasNextSibling(int32_t rowIndex, int32_t afterIndex, return NS_OK; } -/* long getLevel (in long index); */ NS_IMETHODIMP nsCertTree::GetLevel(int32_t index, int32_t *_retval) { @@ -997,7 +987,6 @@ nsCertTree::GetLevel(int32_t index, int32_t *_retval) return NS_OK; } -/* Astring getImageSrc (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::GetImageSrc(int32_t row, nsITreeColumn* col, nsAString& _retval) @@ -1006,14 +995,12 @@ nsCertTree::GetImageSrc(int32_t row, nsITreeColumn* col, return NS_OK; } -/* long getProgressMode (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::GetProgressMode(int32_t row, nsITreeColumn* col, int32_t* _retval) { return NS_OK; } -/* Astring getCellValue (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::GetCellValue(int32_t row, nsITreeColumn* col, nsAString& _retval) @@ -1022,7 +1009,6 @@ nsCertTree::GetCellValue(int32_t row, nsITreeColumn* col, return NS_OK; } -/* Astring getCellText (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::GetCellText(int32_t row, nsITreeColumn* col, nsAString& _retval) @@ -1216,7 +1202,6 @@ nsCertTree::GetCellText(int32_t row, nsITreeColumn* col, return rv; } -/* void setTree (in nsITreeBoxObject tree); */ NS_IMETHODIMP nsCertTree::SetTree(nsITreeBoxObject *tree) { @@ -1224,7 +1209,6 @@ nsCertTree::SetTree(nsITreeBoxObject *tree) return NS_OK; } -/* void toggleOpenState (in long index); */ NS_IMETHODIMP nsCertTree::ToggleOpenState(int32_t index) { @@ -1239,28 +1223,24 @@ nsCertTree::ToggleOpenState(int32_t index) return NS_OK; } -/* void cycleHeader (in nsITreeColumn); */ NS_IMETHODIMP nsCertTree::CycleHeader(nsITreeColumn* col) { return NS_OK; } -/* void selectionChanged (); */ NS_IMETHODIMP nsCertTree::SelectionChanged() { return NS_ERROR_NOT_IMPLEMENTED; } -/* void cycleCell (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::CycleCell(int32_t row, nsITreeColumn* col) { return NS_OK; } -/* boolean isEditable (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::IsEditable(int32_t row, nsITreeColumn* col, bool *_retval) { @@ -1268,7 +1248,6 @@ nsCertTree::IsEditable(int32_t row, nsITreeColumn* col, bool *_retval) return NS_OK; } -/* boolean isSelectable (in long row, in nsITreeColumn col); */ NS_IMETHODIMP nsCertTree::IsSelectable(int32_t row, nsITreeColumn* col, bool *_retval) { @@ -1276,7 +1255,6 @@ nsCertTree::IsSelectable(int32_t row, nsITreeColumn* col, bool *_retval) return NS_OK; } -/* void setCellValue (in long row, in nsITreeColumn col, in AString value); */ NS_IMETHODIMP nsCertTree::SetCellValue(int32_t row, nsITreeColumn* col, const nsAString& value) @@ -1284,7 +1262,6 @@ nsCertTree::SetCellValue(int32_t row, nsITreeColumn* col, return NS_OK; } -/* void setCellText (in long row, in nsITreeColumn col, in AString value); */ NS_IMETHODIMP nsCertTree::SetCellText(int32_t row, nsITreeColumn* col, const nsAString& value) @@ -1292,14 +1269,12 @@ nsCertTree::SetCellText(int32_t row, nsITreeColumn* col, return NS_OK; } -/* void performAction (in wstring action); */ NS_IMETHODIMP nsCertTree::PerformAction(const char16_t *action) { return NS_OK; } -/* void performActionOnRow (in wstring action, in long row); */ NS_IMETHODIMP nsCertTree::PerformActionOnRow(const char16_t *action, int32_t row) { diff --git a/security/manager/ssl/nsCryptoHash.cpp b/security/manager/ssl/nsCryptoHash.cpp index 8dcba89131..de2a4e3ef0 100644 --- a/security/manager/ssl/nsCryptoHash.cpp +++ b/security/manager/ssl/nsCryptoHash.cpp @@ -256,7 +256,6 @@ nsCryptoHMAC::destructorSafeDestroyNSSReference() mHMACContext = nullptr; } -/* void init (in unsigned long aAlgorithm, in nsIKeyObject aKeyObject); */ NS_IMETHODIMP nsCryptoHMAC::Init(uint32_t aAlgorithm, nsIKeyObject *aKeyObject) { @@ -318,7 +317,6 @@ nsCryptoHMAC::Init(uint32_t aAlgorithm, nsIKeyObject *aKeyObject) return NS_OK; } -/* void update ([array, size_is (aLen), const] in octet aData, in unsigned long aLen); */ NS_IMETHODIMP nsCryptoHMAC::Update(const uint8_t *aData, uint32_t aLen) { @@ -339,7 +337,6 @@ nsCryptoHMAC::Update(const uint8_t *aData, uint32_t aLen) return NS_OK; } -/* void updateFromStream (in nsIInputStream aStream, in unsigned long aLen); */ NS_IMETHODIMP nsCryptoHMAC::UpdateFromStream(nsIInputStream *aStream, uint32_t aLen) { @@ -396,7 +393,6 @@ nsCryptoHMAC::UpdateFromStream(nsIInputStream *aStream, uint32_t aLen) return rv; } -/* ACString finish (in bool aASCII); */ NS_IMETHODIMP nsCryptoHMAC::Finish(bool aASCII, nsACString & _retval) { @@ -429,7 +425,6 @@ nsCryptoHMAC::Finish(bool aASCII, nsACString & _retval) return NS_OK; } -/* void reset (); */ NS_IMETHODIMP nsCryptoHMAC::Reset() { diff --git a/security/manager/ssl/nsKeyModule.cpp b/security/manager/ssl/nsKeyModule.cpp index 43b1a2c5c9..40cb36005e 100644 --- a/security/manager/ssl/nsKeyModule.cpp +++ b/security/manager/ssl/nsKeyModule.cpp @@ -50,7 +50,6 @@ nsKeyObject::CleanUp() ////////////////////////////////////////////////////////////////////////////// // nsIKeyObject -/* [noscript] void initKey (in short aKeyType, in voidPtr aKey); */ NS_IMETHODIMP nsKeyObject::InitKey(int16_t aAlgorithm, void * aKey) { @@ -83,7 +82,6 @@ nsKeyObject::InitKey(int16_t aAlgorithm, void * aKey) return NS_OK; } -/* [noscript] voidPtr getKeyObj (); */ NS_IMETHODIMP nsKeyObject::GetKeyObj(void * *_retval) { @@ -110,7 +108,6 @@ nsKeyObject::GetKeyObj(void * *_retval) return NS_OK; } -/* short getType (); */ NS_IMETHODIMP nsKeyObject::GetType(int16_t *_retval) { @@ -130,7 +127,6 @@ nsKeyObjectFactory::nsKeyObjectFactory() { } -/* nsIKeyObject lookupKeyByName (in ACString aName); */ NS_IMETHODIMP nsKeyObjectFactory::LookupKeyByName(const nsACString & aName, nsIKeyObject **_retval) diff --git a/security/manager/ssl/nsNSSASN1Object.cpp b/security/manager/ssl/nsNSSASN1Object.cpp index 7f74150fb7..e1c22f58d9 100644 --- a/security/manager/ssl/nsNSSASN1Object.cpp +++ b/security/manager/ssl/nsNSSASN1Object.cpp @@ -339,7 +339,6 @@ nsNSSASN1PrintableItem::~nsNSSASN1PrintableItem() free(mData); } -/* readonly attribute wstring value; */ NS_IMETHODIMP nsNSSASN1PrintableItem::GetDisplayValue(nsAString &aValue) { @@ -416,7 +415,6 @@ nsNSSASN1PrintableItem::GetData(char **outData, uint32_t *outLen) return NS_OK; } -/* attribute wstring displayName; */ NS_IMETHODIMP nsNSSASN1PrintableItem::GetDisplayName(nsAString &aDisplayName) { diff --git a/security/manager/ssl/nsNSSCertValidity.cpp b/security/manager/ssl/nsNSSCertValidity.cpp index 2d9bbc6a9c..3e7b4719b4 100644 --- a/security/manager/ssl/nsNSSCertValidity.cpp +++ b/security/manager/ssl/nsNSSCertValidity.cpp @@ -35,7 +35,6 @@ nsX509CertValidity::~nsX509CertValidity() /* destructor code */ } -/* readonly attribute PRTime notBefore; */ NS_IMETHODIMP nsX509CertValidity::GetNotBefore(PRTime *aNotBefore) { NS_ENSURE_ARG(aNotBefore); @@ -106,7 +105,6 @@ NS_IMETHODIMP nsX509CertValidity::GetNotBeforeGMT(nsAString &aNotBeforeGMT) return NS_OK; } -/* readonly attribute PRTime notAfter; */ NS_IMETHODIMP nsX509CertValidity::GetNotAfter(PRTime *aNotAfter) { NS_ENSURE_ARG(aNotAfter); diff --git a/security/manager/ssl/nsNSSCertificateDB.cpp b/security/manager/ssl/nsNSSCertificateDB.cpp index 01a902494e..19d4e41c1f 100644 --- a/security/manager/ssl/nsNSSCertificateDB.cpp +++ b/security/manager/ssl/nsNSSCertificateDB.cpp @@ -1265,7 +1265,6 @@ finish: *_certNames = tmpArray; } -/* nsIX509Cert getDefaultEmailEncryptionCert (); */ NS_IMETHODIMP nsNSSCertificateDB::FindEmailEncryptionCert(const nsAString& aNickname, nsIX509Cert** _retval) @@ -1303,7 +1302,6 @@ nsNSSCertificateDB::FindEmailEncryptionCert(const nsAString& aNickname, return NS_OK; } -/* nsIX509Cert getDefaultEmailSigningCert (); */ NS_IMETHODIMP nsNSSCertificateDB::FindEmailSigningCert(const nsAString& aNickname, nsIX509Cert** _retval) @@ -1394,7 +1392,6 @@ nsNSSCertificateDB::FindCertByEmailAddress(nsISupports *aToken, const char *aEma return NS_OK; } -/* nsIX509Cert constructX509FromBase64 (in string base64); */ NS_IMETHODIMP nsNSSCertificateDB::ConstructX509FromBase64(const char *base64, nsIX509Cert **_retval) @@ -1433,7 +1430,6 @@ nsNSSCertificateDB::ConstructX509FromBase64(const char *base64, return rv; } -/* nsIX509Cert constructX509 (in string certDER, unsigned long len); */ NS_IMETHODIMP nsNSSCertificateDB::ConstructX509(const char* certDER, uint32_t lengthDER, diff --git a/security/manager/ssl/nsPK11TokenDB.cpp b/security/manager/ssl/nsPK11TokenDB.cpp index cb15b49f38..fa25e2ea67 100644 --- a/security/manager/ssl/nsPK11TokenDB.cpp +++ b/security/manager/ssl/nsPK11TokenDB.cpp @@ -101,7 +101,6 @@ void nsPK11Token::destructorSafeDestroyNSSReference() } } -/* readonly attribute wstring tokenName; */ NS_IMETHODIMP nsPK11Token::GetTokenName(char16_t * *aTokenName) { // handle removals/insertions @@ -114,7 +113,6 @@ NS_IMETHODIMP nsPK11Token::GetTokenName(char16_t * *aTokenName) return NS_OK; } -/* readonly attribute wstring tokenDesc; */ NS_IMETHODIMP nsPK11Token::GetTokenLabel(char16_t **aTokLabel) { // handle removals/insertions @@ -126,7 +124,6 @@ NS_IMETHODIMP nsPK11Token::GetTokenLabel(char16_t **aTokLabel) return NS_OK; } -/* readonly attribute wstring tokenManID; */ NS_IMETHODIMP nsPK11Token::GetTokenManID(char16_t **aTokManID) { // handle removals/insertions @@ -138,7 +135,6 @@ NS_IMETHODIMP nsPK11Token::GetTokenManID(char16_t **aTokManID) return NS_OK; } -/* readonly attribute wstring tokenHWVersion; */ NS_IMETHODIMP nsPK11Token::GetTokenHWVersion(char16_t **aTokHWVersion) { // handle removals/insertions @@ -150,7 +146,6 @@ NS_IMETHODIMP nsPK11Token::GetTokenHWVersion(char16_t **aTokHWVersion) return NS_OK; } -/* readonly attribute wstring tokenFWVersion; */ NS_IMETHODIMP nsPK11Token::GetTokenFWVersion(char16_t **aTokFWVersion) { // handle removals/insertions @@ -162,7 +157,6 @@ NS_IMETHODIMP nsPK11Token::GetTokenFWVersion(char16_t **aTokFWVersion) return NS_OK; } -/* readonly attribute wstring tokenSerialNumber; */ NS_IMETHODIMP nsPK11Token::GetTokenSerialNumber(char16_t **aTokSerialNum) { // handle removals/insertions @@ -174,7 +168,6 @@ NS_IMETHODIMP nsPK11Token::GetTokenSerialNumber(char16_t **aTokSerialNum) return NS_OK; } -/* boolean isLoggedIn (); */ NS_IMETHODIMP nsPK11Token::IsLoggedIn(bool *_retval) { nsNSSShutDownPreventionLock locker; @@ -188,7 +181,6 @@ NS_IMETHODIMP nsPK11Token::IsLoggedIn(bool *_retval) return rv; } -/* void logout (in boolean force); */ NS_IMETHODIMP nsPK11Token::Login(bool force) { @@ -239,7 +231,6 @@ NS_IMETHODIMP nsPK11Token::LogoutAndDropAuthenticatedResources() return nssComponent->LogoutAuthenticatedPK11(); } -/* void reset (); */ NS_IMETHODIMP nsPK11Token::Reset() { nsNSSShutDownPreventionLock locker; @@ -250,7 +241,6 @@ NS_IMETHODIMP nsPK11Token::Reset() return NS_OK; } -/* readonly attribute long minimumPasswordLength; */ NS_IMETHODIMP nsPK11Token::GetMinimumPasswordLength(int32_t *aMinimumPasswordLength) { nsNSSShutDownPreventionLock locker; @@ -262,7 +252,6 @@ NS_IMETHODIMP nsPK11Token::GetMinimumPasswordLength(int32_t *aMinimumPasswordLen return NS_OK; } -/* readonly attribute boolean needsUserInit; */ NS_IMETHODIMP nsPK11Token::GetNeedsUserInit(bool *aNeedsUserInit) { nsNSSShutDownPreventionLock locker; @@ -273,7 +262,6 @@ NS_IMETHODIMP nsPK11Token::GetNeedsUserInit(bool *aNeedsUserInit) return NS_OK; } -/* boolean checkPassword (in wstring password); */ NS_IMETHODIMP nsPK11Token::CheckPassword(const char16_t *password, bool *_retval) { nsNSSShutDownPreventionLock locker; @@ -298,7 +286,6 @@ NS_IMETHODIMP nsPK11Token::CheckPassword(const char16_t *password, bool *_retval return NS_OK; } -/* void initPassword (in wstring initialPassword); */ NS_IMETHODIMP nsPK11Token::InitPassword(const char16_t *initialPassword) { nsNSSShutDownPreventionLock locker; @@ -316,7 +303,6 @@ done: return rv; } -/* long getAskPasswordTimes(); */ NS_IMETHODIMP nsPK11Token::GetAskPasswordTimes(int32_t *rvAskTimes) { @@ -330,7 +316,6 @@ nsPK11Token::GetAskPasswordTimes(int32_t *rvAskTimes) return NS_OK; } -/* long getAskPasswordTimeout(); */ NS_IMETHODIMP nsPK11Token::GetAskPasswordTimeout(int32_t *rvAskTimeout) { @@ -359,7 +344,6 @@ nsPK11Token::SetAskPasswordDefaults(const int32_t askTimes, return NS_OK; } -/* void changePassword (in wstring oldPassword, in wstring newPassword); */ NS_IMETHODIMP nsPK11Token::ChangePassword(const char16_t *oldPassword, const char16_t *newPassword) { nsNSSShutDownPreventionLock locker; @@ -376,7 +360,6 @@ NS_IMETHODIMP nsPK11Token::ChangePassword(const char16_t *oldPassword, const cha return (rv == SECSuccess) ? NS_OK : NS_ERROR_FAILURE; } -/* boolean isHardwareToken (); */ NS_IMETHODIMP nsPK11Token::IsHardwareToken(bool *_retval) { nsNSSShutDownPreventionLock locker; @@ -390,7 +373,6 @@ NS_IMETHODIMP nsPK11Token::IsHardwareToken(bool *_retval) return rv; } -/* boolean needsLogin (); */ NS_IMETHODIMP nsPK11Token::NeedsLogin(bool *_retval) { nsNSSShutDownPreventionLock locker; @@ -404,7 +386,6 @@ NS_IMETHODIMP nsPK11Token::NeedsLogin(bool *_retval) return rv; } -/* boolean isFriendly (); */ NS_IMETHODIMP nsPK11Token::IsFriendly(bool *_retval) { nsNSSShutDownPreventionLock locker; @@ -432,7 +413,6 @@ nsPK11TokenDB::~nsPK11TokenDB() /* destructor code */ } -/* nsIPK11Token getInternalKeyToken (); */ NS_IMETHODIMP nsPK11TokenDB::GetInternalKeyToken(nsIPK11Token **_retval) { nsNSSShutDownPreventionLock locker; @@ -452,7 +432,6 @@ done: return rv; } -/* nsIPK11Token findTokenByName (in wchar tokenName); */ NS_IMETHODIMP nsPK11TokenDB:: FindTokenByName(const char16_t* tokenName, nsIPK11Token **_retval) { @@ -471,7 +450,6 @@ done: return rv; } -/* nsIEnumerator listTokens (); */ NS_IMETHODIMP nsPK11TokenDB::ListTokens(nsIEnumerator* *_retval) { nsNSSShutDownPreventionLock locker; diff --git a/security/manager/ssl/nsPKCS11Slot.cpp b/security/manager/ssl/nsPKCS11Slot.cpp index c2aac0ecb0..48e1c539e0 100644 --- a/security/manager/ssl/nsPKCS11Slot.cpp +++ b/security/manager/ssl/nsPKCS11Slot.cpp @@ -89,7 +89,6 @@ void nsPKCS11Slot::destructorSafeDestroyNSSReference() } } -/* readonly attribute wstring name; */ NS_IMETHODIMP nsPKCS11Slot::GetName(char16_t **aName) { @@ -113,7 +112,6 @@ nsPKCS11Slot::GetName(char16_t **aName) return NS_OK; } -/* readonly attribute wstring desc; */ NS_IMETHODIMP nsPKCS11Slot::GetDesc(char16_t **aDesc) { @@ -130,7 +128,6 @@ nsPKCS11Slot::GetDesc(char16_t **aDesc) return NS_OK; } -/* readonly attribute wstring manID; */ NS_IMETHODIMP nsPKCS11Slot::GetManID(char16_t **aManID) { @@ -142,7 +139,6 @@ nsPKCS11Slot::GetManID(char16_t **aManID) return NS_OK; } -/* readonly attribute wstring HWVersion; */ NS_IMETHODIMP nsPKCS11Slot::GetHWVersion(char16_t **aHWVersion) { @@ -154,7 +150,6 @@ nsPKCS11Slot::GetHWVersion(char16_t **aHWVersion) return NS_OK; } -/* readonly attribute wstring FWVersion; */ NS_IMETHODIMP nsPKCS11Slot::GetFWVersion(char16_t **aFWVersion) { @@ -166,7 +161,6 @@ nsPKCS11Slot::GetFWVersion(char16_t **aFWVersion) return NS_OK; } -/* nsIPK11Token getToken (); */ NS_IMETHODIMP nsPKCS11Slot::GetToken(nsIPK11Token **_retval) { @@ -180,7 +174,6 @@ nsPKCS11Slot::GetToken(nsIPK11Token **_retval) return NS_OK; } -/* readonly attribute wstring tokenName; */ NS_IMETHODIMP nsPKCS11Slot::GetTokenName(char16_t **aName) { @@ -260,7 +253,6 @@ void nsPKCS11Module::destructorSafeDestroyNSSReference() } } -/* readonly attribute wstring name; */ NS_IMETHODIMP nsPKCS11Module::GetName(char16_t **aName) { @@ -272,7 +264,6 @@ nsPKCS11Module::GetName(char16_t **aName) return NS_OK; } -/* readonly attribute wstring libName; */ NS_IMETHODIMP nsPKCS11Module::GetLibName(char16_t **aName) { @@ -288,7 +279,6 @@ nsPKCS11Module::GetLibName(char16_t **aName) return NS_OK; } -/* nsIPKCS11Slot findSlotByName(in wstring name); */ NS_IMETHODIMP nsPKCS11Module::FindSlotByName(const char16_t *aName, nsIPKCS11Slot **_retval) @@ -334,7 +324,6 @@ nsPKCS11Module::FindSlotByName(const char16_t *aName, return NS_OK; } -/* nsIEnumerator listSlots (); */ NS_IMETHODIMP nsPKCS11Module::ListSlots(nsIEnumerator **_retval) { @@ -375,7 +364,6 @@ nsPKCS11ModuleDB::~nsPKCS11ModuleDB() { } -/* nsIPKCS11Module getInternal (); */ NS_IMETHODIMP nsPKCS11ModuleDB::GetInternal(nsIPKCS11Module **_retval) { @@ -389,7 +377,6 @@ nsPKCS11ModuleDB::GetInternal(nsIPKCS11Module **_retval) return NS_OK; } -/* nsIPKCS11Module getInternalFIPS (); */ NS_IMETHODIMP nsPKCS11ModuleDB::GetInternalFIPS(nsIPKCS11Module **_retval) { @@ -403,7 +390,6 @@ nsPKCS11ModuleDB::GetInternalFIPS(nsIPKCS11Module **_retval) return NS_OK; } -/* nsIPKCS11Module findModuleByName(in wstring name); */ NS_IMETHODIMP nsPKCS11ModuleDB::FindModuleByName(const char16_t *aName, nsIPKCS11Module **_retval) @@ -424,7 +410,6 @@ nsPKCS11ModuleDB::FindModuleByName(const char16_t *aName, /* This is essentially the same as nsIPK11Token::findTokenByName, except * that it returns an nsIPKCS11Slot, which may be desired. */ -/* nsIPKCS11Module findSlotByName(in wstring name); */ NS_IMETHODIMP nsPKCS11ModuleDB::FindSlotByName(const char16_t *aName, nsIPKCS11Slot **_retval) @@ -442,7 +427,6 @@ nsPKCS11ModuleDB::FindSlotByName(const char16_t *aName, return NS_OK; } -/* nsIEnumerator listModules (); */ NS_IMETHODIMP nsPKCS11ModuleDB::ListModules(nsIEnumerator **_retval) { @@ -482,7 +466,6 @@ NS_IMETHODIMP nsPKCS11ModuleDB::GetCanToggleFIPS(bool *aCanToggleFIPS) } -/* void toggleFIPSMode (); */ NS_IMETHODIMP nsPKCS11ModuleDB::ToggleFIPSMode() { nsNSSShutDownPreventionLock locker; @@ -506,7 +489,6 @@ NS_IMETHODIMP nsPKCS11ModuleDB::ToggleFIPSMode() return NS_OK; } -/* readonly attribute boolean isFIPSEnabled; */ NS_IMETHODIMP nsPKCS11ModuleDB::GetIsFIPSEnabled(bool *aIsFIPSEnabled) { nsNSSShutDownPreventionLock locker; diff --git a/security/manager/ssl/nsSDR.cpp b/security/manager/ssl/nsSDR.cpp index f00da3fcc3..6d52c253b8 100644 --- a/security/manager/ssl/nsSDR.cpp +++ b/security/manager/ssl/nsSDR.cpp @@ -47,7 +47,6 @@ nsSecretDecoderRing::~nsSecretDecoderRing() { } -/* [noscript] long encrypt (in buffer data, in long dataLen, out buffer result); */ NS_IMETHODIMP nsSecretDecoderRing:: Encrypt(unsigned char * data, int32_t dataLen, unsigned char * *result, int32_t *_retval) { @@ -89,7 +88,6 @@ loser: return rv; } -/* [noscript] long decrypt (in buffer data, in long dataLen, out buffer result); */ NS_IMETHODIMP nsSecretDecoderRing:: Decrypt(unsigned char * data, int32_t dataLen, unsigned char * *result, int32_t *_retval) { @@ -129,7 +127,6 @@ loser: return rv; } -/* string encryptString (in string text); */ NS_IMETHODIMP nsSecretDecoderRing:: EncryptString(const char *text, char **_retval) { @@ -154,7 +151,6 @@ loser: return rv; } -/* string decryptString (in string crypt); */ NS_IMETHODIMP nsSecretDecoderRing:: DecryptString(const char *crypt, char **_retval) { @@ -194,7 +190,6 @@ loser: return rv; } -/* void changePassword(); */ NS_IMETHODIMP nsSecretDecoderRing:: ChangePassword() { @@ -279,7 +274,6 @@ LogoutAndTeardown() return rv; } -/* void setWindow(in nsISupports w); */ NS_IMETHODIMP nsSecretDecoderRing:: SetWindow(nsISupports *w) { diff --git a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp index cb2b090e28..7531d3fd89 100644 --- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp +++ b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp @@ -82,7 +82,6 @@ DiskSpaceWatcher::Observe(nsISupports* aSubject, const char* aTopic, return NS_ERROR_UNEXPECTED; } -/* readonly attribute bool isDiskFull; */ NS_IMETHODIMP DiskSpaceWatcher::GetIsDiskFull(bool* aIsDiskFull) { *aIsDiskFull = sIsDiskFull; @@ -94,7 +93,6 @@ NS_IMETHODIMP DiskSpaceWatcher::GetIsDiskFull(bool* aIsDiskFull) #ifdef XP_WIN #undef GetFreeSpace #endif -/* readonly attribute long freeSpace; */ NS_IMETHODIMP DiskSpaceWatcher::GetFreeSpace(uint64_t* aFreeSpace) { *aFreeSpace = sFreeSpace; diff --git a/toolkit/components/find/nsFindService.cpp b/toolkit/components/find/nsFindService.cpp index 36b5faf9df..3e80823ce0 100644 --- a/toolkit/components/find/nsFindService.cpp +++ b/toolkit/components/find/nsFindService.cpp @@ -28,7 +28,6 @@ nsFindService::~nsFindService() NS_IMPL_ISUPPORTS(nsFindService, nsIFindService) -/* attribute AString searchString; */ NS_IMETHODIMP nsFindService::GetSearchString(nsAString & aSearchString) { aSearchString = mSearchString; @@ -41,7 +40,6 @@ NS_IMETHODIMP nsFindService::SetSearchString(const nsAString & aSearchString) return NS_OK; } -/* attribute AString replaceString; */ NS_IMETHODIMP nsFindService::GetReplaceString(nsAString & aReplaceString) { aReplaceString = mReplaceString; @@ -53,7 +51,6 @@ NS_IMETHODIMP nsFindService::SetReplaceString(const nsAString & aReplaceString) return NS_OK; } -/* attribute boolean findBackwards; */ NS_IMETHODIMP nsFindService::GetFindBackwards(bool *aFindBackwards) { NS_ENSURE_ARG_POINTER(aFindBackwards); @@ -66,7 +63,6 @@ NS_IMETHODIMP nsFindService::SetFindBackwards(bool aFindBackwards) return NS_OK; } -/* attribute boolean wrapFind; */ NS_IMETHODIMP nsFindService::GetWrapFind(bool *aWrapFind) { NS_ENSURE_ARG_POINTER(aWrapFind); @@ -79,7 +75,6 @@ NS_IMETHODIMP nsFindService::SetWrapFind(bool aWrapFind) return NS_OK; } -/* attribute boolean entireWord; */ NS_IMETHODIMP nsFindService::GetEntireWord(bool *aEntireWord) { NS_ENSURE_ARG_POINTER(aEntireWord); @@ -92,7 +87,6 @@ NS_IMETHODIMP nsFindService::SetEntireWord(bool aEntireWord) return NS_OK; } -/* attribute boolean matchCase; */ NS_IMETHODIMP nsFindService::GetMatchCase(bool *aMatchCase) { NS_ENSURE_ARG_POINTER(aMatchCase); diff --git a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp index 30a39ab291..c629a47925 100644 --- a/toolkit/components/perfmonitoring/nsPerformanceStats.cpp +++ b/toolkit/components/perfmonitoring/nsPerformanceStats.cpp @@ -408,7 +408,6 @@ nsPerformanceSnapshot::Init(JSContext* cx, uint64_t processId) { } -/* void getComponentsData (out nsIArray aComponents); */ NS_IMETHODIMP nsPerformanceSnapshot::GetComponentsData(nsIArray * *aComponents) { const size_t length = mComponentsData.Length(); @@ -422,7 +421,6 @@ NS_IMETHODIMP nsPerformanceSnapshot::GetComponentsData(nsIArray * *aComponents) return NS_OK; } -/* readonly attribute nsIPerformanceStats process; */ NS_IMETHODIMP nsPerformanceSnapshot::GetProcessData(nsIPerformanceStats * *aProcess) { NS_IF_ADDREF(*aProcess = mProcessData); @@ -489,7 +487,6 @@ NS_IMETHODIMP nsPerformanceStatsService::SetIsMonitoringPerCompartment(JSContext return NS_OK; } -/* readonly attribute nsIPerformanceSnapshot snapshot; */ NS_IMETHODIMP nsPerformanceStatsService::GetSnapshot(JSContext* cx, nsIPerformanceSnapshot * *aSnapshot) { nsRefPtr snapshot = new nsPerformanceSnapshot(); diff --git a/toolkit/components/places/nsNavHistoryQuery.cpp b/toolkit/components/places/nsNavHistoryQuery.cpp index 790302274d..d8cacfe4ec 100644 --- a/toolkit/components/places/nsNavHistoryQuery.cpp +++ b/toolkit/components/places/nsNavHistoryQuery.cpp @@ -908,7 +908,6 @@ nsNavHistoryQuery::nsNavHistoryQuery() mDomain.SetIsVoid(true); } -/* attribute PRTime beginTime; */ NS_IMETHODIMP nsNavHistoryQuery::GetBeginTime(PRTime *aBeginTime) { *aBeginTime = mBeginTime; @@ -920,7 +919,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetBeginTime(PRTime aBeginTime) return NS_OK; } -/* attribute long beginTimeReference; */ NS_IMETHODIMP nsNavHistoryQuery::GetBeginTimeReference(uint32_t* _retval) { *_retval = mBeginTimeReference; @@ -934,21 +932,18 @@ NS_IMETHODIMP nsNavHistoryQuery::SetBeginTimeReference(uint32_t aReference) return NS_OK; } -/* readonly attribute boolean hasBeginTime; */ NS_IMETHODIMP nsNavHistoryQuery::GetHasBeginTime(bool* _retval) { *_retval = ! (mBeginTimeReference == TIME_RELATIVE_EPOCH && mBeginTime == 0); return NS_OK; } -/* readonly attribute PRTime absoluteBeginTime; */ NS_IMETHODIMP nsNavHistoryQuery::GetAbsoluteBeginTime(PRTime* _retval) { *_retval = nsNavHistory::NormalizeTime(mBeginTimeReference, mBeginTime); return NS_OK; } -/* attribute PRTime endTime; */ NS_IMETHODIMP nsNavHistoryQuery::GetEndTime(PRTime *aEndTime) { *aEndTime = mEndTime; @@ -960,7 +955,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetEndTime(PRTime aEndTime) return NS_OK; } -/* attribute long endTimeReference; */ NS_IMETHODIMP nsNavHistoryQuery::GetEndTimeReference(uint32_t* _retval) { *_retval = mEndTimeReference; @@ -974,21 +968,18 @@ NS_IMETHODIMP nsNavHistoryQuery::SetEndTimeReference(uint32_t aReference) return NS_OK; } -/* readonly attribute boolean hasEndTime; */ NS_IMETHODIMP nsNavHistoryQuery::GetHasEndTime(bool* _retval) { *_retval = ! (mEndTimeReference == TIME_RELATIVE_EPOCH && mEndTime == 0); return NS_OK; } -/* readonly attribute PRTime absoluteEndTime; */ NS_IMETHODIMP nsNavHistoryQuery::GetAbsoluteEndTime(PRTime* _retval) { *_retval = nsNavHistory::NormalizeTime(mEndTimeReference, mEndTime); return NS_OK; } -/* attribute string searchTerms; */ NS_IMETHODIMP nsNavHistoryQuery::GetSearchTerms(nsAString& aSearchTerms) { aSearchTerms = mSearchTerms; @@ -1005,7 +996,6 @@ NS_IMETHODIMP nsNavHistoryQuery::GetHasSearchTerms(bool* _retval) return NS_OK; } -/* attribute int32_t minVisits; */ NS_IMETHODIMP nsNavHistoryQuery::GetMinVisits(int32_t* _retval) { NS_ENSURE_ARG_POINTER(_retval); @@ -1018,7 +1008,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetMinVisits(int32_t aVisits) return NS_OK; } -/* attribute PRint32 maxVisits; */ NS_IMETHODIMP nsNavHistoryQuery::GetMaxVisits(int32_t* _retval) { NS_ENSURE_ARG_POINTER(_retval); @@ -1031,7 +1020,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetMaxVisits(int32_t aVisits) return NS_OK; } -/* attribute boolean onlyBookmarked; */ NS_IMETHODIMP nsNavHistoryQuery::GetOnlyBookmarked(bool *aOnlyBookmarked) { *aOnlyBookmarked = mOnlyBookmarked; @@ -1043,7 +1031,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetOnlyBookmarked(bool aOnlyBookmarked) return NS_OK; } -/* attribute boolean domainIsHost; */ NS_IMETHODIMP nsNavHistoryQuery::GetDomainIsHost(bool *aDomainIsHost) { *aDomainIsHost = mDomainIsHost; @@ -1055,7 +1042,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetDomainIsHost(bool aDomainIsHost) return NS_OK; } -/* attribute AUTF8String domain; */ NS_IMETHODIMP nsNavHistoryQuery::GetDomain(nsACString& aDomain) { aDomain = mDomain; @@ -1073,7 +1059,6 @@ NS_IMETHODIMP nsNavHistoryQuery::GetHasDomain(bool* _retval) return NS_OK; } -/* attribute boolean uriIsPrefix; */ NS_IMETHODIMP nsNavHistoryQuery::GetUriIsPrefix(bool* aIsPrefix) { *aIsPrefix = mUriIsPrefix; @@ -1085,7 +1070,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetUriIsPrefix(bool aIsPrefix) return NS_OK; } -/* attribute nsIURI uri; */ NS_IMETHODIMP nsNavHistoryQuery::GetUri(nsIURI** aUri) { NS_IF_ADDREF(*aUri = mUri); @@ -1102,7 +1086,6 @@ NS_IMETHODIMP nsNavHistoryQuery::GetHasUri(bool* aHasUri) return NS_OK; } -/* attribute boolean annotationIsNot; */ NS_IMETHODIMP nsNavHistoryQuery::GetAnnotationIsNot(bool* aIsNot) { *aIsNot = mAnnotationIsNot; @@ -1114,7 +1097,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetAnnotationIsNot(bool aIsNot) return NS_OK; } -/* attribute AUTF8String annotation; */ NS_IMETHODIMP nsNavHistoryQuery::GetAnnotation(nsACString& aAnnotation) { aAnnotation = mAnnotation; @@ -1131,7 +1113,6 @@ NS_IMETHODIMP nsNavHistoryQuery::GetHasAnnotation(bool* aHasIt) return NS_OK; } -/* attribute nsIVariant tags; */ NS_IMETHODIMP nsNavHistoryQuery::GetTags(nsIVariant **aTags) { NS_ENSURE_ARG_POINTER(aTags); @@ -1253,7 +1234,6 @@ NS_IMETHODIMP nsNavHistoryQuery::SetTags(nsIVariant *aTags) return NS_OK; } -/* attribute boolean tagsAreNot; */ NS_IMETHODIMP nsNavHistoryQuery::GetTagsAreNot(bool *aTagsAreNot) { NS_ENSURE_ARG_POINTER(aTagsAreNot); diff --git a/uriloader/exthandler/nsDBusHandlerApp.cpp b/uriloader/exthandler/nsDBusHandlerApp.cpp index e19d4f2de3..c052b43f1b 100644 --- a/uriloader/exthandler/nsDBusHandlerApp.cpp +++ b/uriloader/exthandler/nsDBusHandlerApp.cpp @@ -126,7 +126,6 @@ nsDBusHandlerApp::LaunchWithURI(nsIURI *aURI, //////////////////////////////////////////////////////////////////////////////// //// nsIDBusHandlerApp -/* attribute AUTF8String service; */ NS_IMETHODIMP nsDBusHandlerApp::GetService(nsACString & aService) { aService.Assign(mService); @@ -139,7 +138,6 @@ NS_IMETHODIMP nsDBusHandlerApp::SetService(const nsACString & aService) return NS_OK; } -/* attribute AUTF8String method; */ NS_IMETHODIMP nsDBusHandlerApp::GetMethod(nsACString & aMethod) { aMethod.Assign(mMethod); @@ -152,7 +150,6 @@ NS_IMETHODIMP nsDBusHandlerApp::SetMethod(const nsACString & aMethod) return NS_OK; } -/* attribute AUTF8String interface; */ NS_IMETHODIMP nsDBusHandlerApp::GetDBusInterface(nsACString & aInterface) { aInterface.Assign(mInterface); @@ -165,7 +162,6 @@ NS_IMETHODIMP nsDBusHandlerApp::SetDBusInterface(const nsACString & aInterface) return NS_OK; } -/* attribute AUTF8String objpath; */ NS_IMETHODIMP nsDBusHandlerApp::GetObjectPath(nsACString & aObjpath) { aObjpath.Assign(mObjpath); diff --git a/uriloader/exthandler/nsLocalHandlerApp.cpp b/uriloader/exthandler/nsLocalHandlerApp.cpp index e06cc39a5e..f1b65dca21 100644 --- a/uriloader/exthandler/nsLocalHandlerApp.cpp +++ b/uriloader/exthandler/nsLocalHandlerApp.cpp @@ -126,7 +126,6 @@ nsLocalHandlerApp::LaunchWithIProcess(const nsCString& aArg) //////////////////////////////////////////////////////////////////////////////// //// nsILocalHandlerApp -/* attribute nsIFile executable; */ NS_IMETHODIMP nsLocalHandlerApp::GetExecutable(nsIFile **aExecutable) { @@ -141,7 +140,6 @@ nsLocalHandlerApp::SetExecutable(nsIFile *aExecutable) return NS_OK; } -/* readonly attribute unsigned long parameterCount; */ NS_IMETHODIMP nsLocalHandlerApp::GetParameterCount(uint32_t *aParameterCount) { @@ -149,7 +147,6 @@ nsLocalHandlerApp::GetParameterCount(uint32_t *aParameterCount) return NS_OK; } -/* void clearParameters (); */ NS_IMETHODIMP nsLocalHandlerApp::ClearParameters() { @@ -157,7 +154,6 @@ nsLocalHandlerApp::ClearParameters() return NS_OK; } -/* void appendParameter (in AString param); */ NS_IMETHODIMP nsLocalHandlerApp::AppendParameter(const nsAString & aParam) { @@ -165,7 +161,6 @@ nsLocalHandlerApp::AppendParameter(const nsAString & aParam) return NS_OK; } -/* AString getParameter (in unsigned long parameterIndex); */ NS_IMETHODIMP nsLocalHandlerApp::GetParameter(uint32_t parameterIndex, nsAString & _retval) { @@ -176,7 +171,6 @@ nsLocalHandlerApp::GetParameter(uint32_t parameterIndex, nsAString & _retval) return NS_OK; } -/* boolean parameterExists (in AString param); */ NS_IMETHODIMP nsLocalHandlerApp::ParameterExists(const nsAString & aParam, bool *_retval) { diff --git a/widget/GfxInfoBase.cpp b/widget/GfxInfoBase.cpp index fa666f2043..acc5ce02f2 100644 --- a/widget/GfxInfoBase.cpp +++ b/widget/GfxInfoBase.cpp @@ -1016,7 +1016,6 @@ GfxInfoBase::LogFailure(const nsACString &failure) gfxCriticalError(CriticalLog::DefaultOptions(false)) << "(LF) " << failure.BeginReading(); } -/* void getFailures (out unsigned long failureCount, [optional, array, size_is (failureCount)] out long indices, [array, size_is (failureCount), retval] out string failures); */ /* XPConnect method of returning arrays is very ugly. Would not recommend. */ NS_IMETHODIMP GfxInfoBase::GetFailures(uint32_t* failureCount, int32_t** indices, diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index 74ec36621e..90d0574321 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -380,21 +380,18 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled) return NS_ERROR_FAILURE; } -/* readonly attribute DOMString DWriteVersion; */ NS_IMETHODIMP GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString cleartypeParameters; */ NS_IMETHODIMP GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDescription; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) { @@ -403,14 +400,12 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) return NS_OK; } -/* readonly attribute DOMString adapterDescription2; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterRAM; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) { @@ -418,14 +413,12 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) return NS_OK; } -/* readonly attribute DOMString adapterRAM2; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriver; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) { @@ -433,14 +426,12 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) return NS_OK; } -/* readonly attribute DOMString adapterDriver2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverVersion; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) { @@ -449,14 +440,12 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) return NS_OK; } -/* readonly attribute DOMString adapterDriverVersion2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverDate; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) { @@ -464,14 +453,12 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) return NS_OK; } -/* readonly attribute DOMString adapterDriverDate2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterVendorID; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) { @@ -480,14 +467,12 @@ GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) return NS_OK; } -/* readonly attribute DOMString adapterVendorID2; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDeviceID; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) { @@ -496,28 +481,24 @@ GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) return NS_OK; } -/* readonly attribute DOMString adapterDeviceID2; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID2; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute boolean isGPU2Active; */ NS_IMETHODIMP GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { @@ -557,28 +538,24 @@ GfxInfo::FindMonitors(JSContext* aCx, JS::HandleObject aOutArray) // Implement nsIGfxInfoDebug // We don't support spoofing anything on Linux -/* void spoofVendorID (in DOMString aVendorID); */ NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString & aVendorID) { CopyUTF16toUTF8(aVendorID, mVendor); return NS_OK; } -/* void spoofDeviceID (in unsigned long aDeviceID); */ NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString & aDeviceID) { CopyUTF16toUTF8(aDeviceID, mRenderer); return NS_OK; } -/* void spoofDriverVersion (in DOMString aDriverVersion); */ NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString & aDriverVersion) { CopyUTF16toUTF8(aDriverVersion, mVersion); return NS_OK; } -/* void spoofOSVersion (in unsigned long aVersion); */ NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t aVersion) { // We don't support OS versioning on Linux. There's just "Linux". diff --git a/widget/gonk/GfxInfo.cpp b/widget/gonk/GfxInfo.cpp index 6e34c073e2..1a506831fa 100644 --- a/widget/gonk/GfxInfo.cpp +++ b/widget/gonk/GfxInfo.cpp @@ -21,21 +21,18 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled) return NS_ERROR_FAILURE; } -/* readonly attribute DOMString DWriteVersion; */ NS_IMETHODIMP GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString cleartypeParameters; */ NS_IMETHODIMP GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDescription; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) { @@ -43,14 +40,12 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) return NS_OK; } -/* readonly attribute DOMString adapterDescription2; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterRAM; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) { @@ -58,14 +53,12 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) return NS_OK; } -/* readonly attribute DOMString adapterRAM2; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriver; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) { @@ -73,14 +66,12 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) return NS_OK; } -/* readonly attribute DOMString adapterDriver2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverVersion; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) { @@ -88,14 +79,12 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) return NS_OK; } -/* readonly attribute DOMString adapterDriverVersion2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverDate; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) { @@ -103,14 +92,12 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) return NS_OK; } -/* readonly attribute DOMString adapterDriverDate2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterVendorID; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) { @@ -118,14 +105,12 @@ GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) return NS_OK; } -/* readonly attribute DOMString adapterVendorID2; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDeviceID; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) { @@ -133,28 +118,24 @@ GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) return NS_OK; } -/* readonly attribute DOMString adapterDeviceID2; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID2; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute boolean isGPU2Active; */ NS_IMETHODIMP GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { @@ -189,25 +170,21 @@ GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/, // Implement nsIGfxInfoDebug -/* void spoofVendorID (in DOMString aVendorID); */ NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString &) { return NS_OK; } -/* void spoofDeviceID (in unsigned long aDeviceID); */ NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString &) { return NS_OK; } -/* void spoofDriverVersion (in DOMString aDriverVersion); */ NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString &) { return NS_OK; } -/* void spoofOSVersion (in unsigned long aVersion); */ NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t) { return NS_OK; diff --git a/widget/gtk/nsColorPicker.cpp b/widget/gtk/nsColorPicker.cpp index 85eb5bdcb4..06a21e3cc3 100644 --- a/widget/gtk/nsColorPicker.cpp +++ b/widget/gtk/nsColorPicker.cpp @@ -37,7 +37,6 @@ GtkColorSelection* nsColorPicker::WidgetGetColorSelection(GtkWidget* widget) GTK_COLOR_SELECTION_DIALOG(widget))); } -/* void init (in nsIDOMWindow parent, in AString title, in short mode); */ NS_IMETHODIMP nsColorPicker::Init(nsIDOMWindow *parent, const nsAString& title, const nsAString& initialColor) @@ -49,7 +48,6 @@ NS_IMETHODIMP nsColorPicker::Init(nsIDOMWindow *parent, return NS_OK; } -/* void open (in nsIColorPickerShownCallback aColorPickerShownCallback); */ NS_IMETHODIMP nsColorPicker::Open(nsIColorPickerShownCallback *aColorPickerShownCallback) { diff --git a/widget/gtk/nsDeviceContextSpecG.cpp b/widget/gtk/nsDeviceContextSpecG.cpp index 6e9596f487..0ff7df2576 100644 --- a/widget/gtk/nsDeviceContextSpecG.cpp +++ b/widget/gtk/nsDeviceContextSpecG.cpp @@ -427,7 +427,6 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::GetPrinterNameList(nsIStringEnumerator **a return NS_NewAdoptingStringEnumerator(aPrinterNameList, printers); } -/* readonly attribute wstring defaultPrinterName; */ NS_IMETHODIMP nsPrinterEnumeratorGTK::GetDefaultPrinterName(char16_t **aDefaultPrinterName) { DO_PR_DEBUG_LOG(("nsPrinterEnumeratorGTK::GetDefaultPrinterName()\n")); @@ -439,7 +438,6 @@ NS_IMETHODIMP nsPrinterEnumeratorGTK::GetDefaultPrinterName(char16_t **aDefaultP return NS_OK; } -/* void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings); */ NS_IMETHODIMP nsPrinterEnumeratorGTK::InitPrintSettingsFromPrinter(const char16_t *aPrinterName, nsIPrintSettings *aPrintSettings) { DO_PR_DEBUG_LOG(("nsPrinterEnumeratorGTK::InitPrintSettingsFromPrinter()")); diff --git a/widget/gtk/nsPrintOptionsGTK.cpp b/widget/gtk/nsPrintOptionsGTK.cpp index 799bf11b0a..ca86a1f893 100644 --- a/widget/gtk/nsPrintOptionsGTK.cpp +++ b/widget/gtk/nsPrintOptionsGTK.cpp @@ -89,7 +89,6 @@ nsPrintOptionsGTK::DeserializeToPrintSettings(const PrintData& data, return NS_OK; } -/* nsIPrintSettings CreatePrintSettings (); */ nsresult nsPrintOptionsGTK::_CreatePrintSettings(nsIPrintSettings **_retval) { *_retval = nullptr; diff --git a/widget/gtk/nsPrintSettingsGTK.cpp b/widget/gtk/nsPrintSettingsGTK.cpp index 6682ec6e36..cd86df6340 100644 --- a/widget/gtk/nsPrintSettingsGTK.cpp +++ b/widget/gtk/nsPrintSettingsGTK.cpp @@ -207,7 +207,6 @@ nsPrintSettingsGTK::SetGtkPrinter(GtkPrinter *aPrinter) * from the GTK objects rather than our own variables. */ -/* attribute long printRange; */ NS_IMETHODIMP nsPrintSettingsGTK::GetPrintRange(int16_t *aPrintRange) { NS_ENSURE_ARG_POINTER(aPrintRange); @@ -239,7 +238,6 @@ NS_IMETHODIMP nsPrintSettingsGTK::SetPrintRange(int16_t aPrintRange) return NS_OK; } -/* attribute long startPageRange; */ NS_IMETHODIMP nsPrintSettingsGTK::GetStartPageRange(int32_t *aStartPageRange) { @@ -277,7 +275,6 @@ nsPrintSettingsGTK::SetStartPageRange(int32_t aStartPageRange) return NS_OK; } -/* attribute long endPageRange; */ NS_IMETHODIMP nsPrintSettingsGTK::GetEndPageRange(int32_t *aEndPageRange) { @@ -312,7 +309,6 @@ nsPrintSettingsGTK::SetEndPageRange(int32_t aEndPageRange) return NS_OK; } -/* attribute boolean printReversed; */ NS_IMETHODIMP nsPrintSettingsGTK::GetPrintReversed(bool *aPrintReversed) { @@ -326,7 +322,6 @@ nsPrintSettingsGTK::SetPrintReversed(bool aPrintReversed) return NS_OK; } -/* attribute boolean printInColor; */ NS_IMETHODIMP nsPrintSettingsGTK::GetPrintInColor(bool *aPrintInColor) { @@ -340,7 +335,6 @@ nsPrintSettingsGTK::SetPrintInColor(bool aPrintInColor) return NS_OK; } -/* attribute short orientation; */ NS_IMETHODIMP nsPrintSettingsGTK::GetOrientation(int32_t *aOrientation) { @@ -374,7 +368,6 @@ nsPrintSettingsGTK::SetOrientation(int32_t aOrientation) return NS_OK; } -/* attribute wstring toFileName; */ NS_IMETHODIMP nsPrintSettingsGTK::GetToFileName(char16_t * *aToFileName) { @@ -475,7 +468,6 @@ nsPrintSettingsGTK::SetPrinterName(const char16_t * aPrinter) return NS_OK; } -/* attribute long numCopies; */ NS_IMETHODIMP nsPrintSettingsGTK::GetNumCopies(int32_t *aNumCopies) { @@ -490,7 +482,6 @@ nsPrintSettingsGTK::SetNumCopies(int32_t aNumCopies) return NS_OK; } -/* attribute double scaling; */ NS_IMETHODIMP nsPrintSettingsGTK::GetScaling(double *aScaling) { @@ -505,7 +496,6 @@ nsPrintSettingsGTK::SetScaling(double aScaling) return NS_OK; } -/* attribute wstring paperName; */ NS_IMETHODIMP nsPrintSettingsGTK::GetPaperName(char16_t * *aPaperName) { @@ -595,7 +585,6 @@ nsPrintSettingsGTK::SetUnwriteableMarginInTwips(nsIntMargin& aUnwriteableMargin) return NS_OK; } -/* attribute double unwriteableMarginTop; */ NS_IMETHODIMP nsPrintSettingsGTK::SetUnwriteableMarginTop(double aUnwriteableMarginTop) { @@ -605,7 +594,6 @@ nsPrintSettingsGTK::SetUnwriteableMarginTop(double aUnwriteableMarginTop) return NS_OK; } -/* attribute double unwriteableMarginLeft; */ NS_IMETHODIMP nsPrintSettingsGTK::SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) { @@ -615,7 +603,6 @@ nsPrintSettingsGTK::SetUnwriteableMarginLeft(double aUnwriteableMarginLeft) return NS_OK; } -/* attribute double unwriteableMarginBottom; */ NS_IMETHODIMP nsPrintSettingsGTK::SetUnwriteableMarginBottom(double aUnwriteableMarginBottom) { @@ -625,7 +612,6 @@ nsPrintSettingsGTK::SetUnwriteableMarginBottom(double aUnwriteableMarginBottom) return NS_OK; } -/* attribute double unwriteableMarginRight; */ NS_IMETHODIMP nsPrintSettingsGTK::SetUnwriteableMarginRight(double aUnwriteableMarginRight) { @@ -635,7 +621,6 @@ nsPrintSettingsGTK::SetUnwriteableMarginRight(double aUnwriteableMarginRight) return NS_OK; } -/* attribute double paperWidth; */ NS_IMETHODIMP nsPrintSettingsGTK::GetPaperWidth(double *aPaperWidth) { @@ -654,7 +639,6 @@ nsPrintSettingsGTK::SetPaperWidth(double aPaperWidth) return NS_OK; } -/* attribute double paperHeight; */ NS_IMETHODIMP nsPrintSettingsGTK::GetPaperHeight(double *aPaperHeight) { diff --git a/widget/nsColorPickerProxy.cpp b/widget/nsColorPickerProxy.cpp index 4409470a58..a558e94d8f 100644 --- a/widget/nsColorPickerProxy.cpp +++ b/widget/nsColorPickerProxy.cpp @@ -12,7 +12,6 @@ using namespace mozilla::dom; NS_IMPL_ISUPPORTS(nsColorPickerProxy, nsIColorPicker) -/* void init (in nsIDOMWindow parent, in AString title, in short mode); */ NS_IMETHODIMP nsColorPickerProxy::Init(nsIDOMWindow* aParent, const nsAString& aTitle, const nsAString& aInitialColor) @@ -29,7 +28,6 @@ nsColorPickerProxy::Init(nsIDOMWindow* aParent, const nsAString& aTitle, return NS_OK; } -/* void open (in nsIColorPickerShownCallback aColorPickerShownCallback); */ NS_IMETHODIMP nsColorPickerProxy::Open(nsIColorPickerShownCallback* aColorPickerShownCallback) { @@ -57,4 +55,4 @@ nsColorPickerProxy::Recv__delete__(const nsString& aColor) mCallback = nullptr; } return true; -} \ No newline at end of file +} diff --git a/widget/nsFilePickerProxy.cpp b/widget/nsFilePickerProxy.cpp index 667271932e..f99516bac9 100644 --- a/widget/nsFilePickerProxy.cpp +++ b/widget/nsFilePickerProxy.cpp @@ -99,7 +99,6 @@ nsFilePickerProxy::SetFilterIndex(int32_t aFilterIndex) return NS_OK; } -/* readonly attribute nsIFile file; */ NS_IMETHODIMP nsFilePickerProxy::GetFile(nsIFile** aFile) { @@ -107,7 +106,6 @@ nsFilePickerProxy::GetFile(nsIFile** aFile) return NS_ERROR_FAILURE; } -/* readonly attribute nsIFileURL fileURL; */ NS_IMETHODIMP nsFilePickerProxy::GetFileURL(nsIURI** aFileURL) { @@ -115,7 +113,6 @@ nsFilePickerProxy::GetFileURL(nsIURI** aFileURL) return NS_ERROR_FAILURE; } -/* readonly attribute nsISimpleEnumerator files; */ NS_IMETHODIMP nsFilePickerProxy::GetFiles(nsISimpleEnumerator** aFiles) { diff --git a/widget/nsPrintSettingsImpl.cpp b/widget/nsPrintSettingsImpl.cpp index d84845788c..4c925e9d22 100644 --- a/widget/nsPrintSettingsImpl.cpp +++ b/widget/nsPrintSettingsImpl.cpp @@ -83,7 +83,6 @@ nsPrintSettings::~nsPrintSettings() { } -/* [noscript] attribute nsIPrintSession printSession; */ NS_IMETHODIMP nsPrintSettings::GetPrintSession(nsIPrintSession **aPrintSession) { NS_ENSURE_ARG_POINTER(aPrintSession); @@ -112,7 +111,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintSession(nsIPrintSession *aPrintSession) return NS_OK; } -/* attribute long startPageRange; */ NS_IMETHODIMP nsPrintSettings::GetStartPageRange(int32_t *aStartPageRange) { //NS_ENSURE_ARG_POINTER(aStartPageRange); @@ -125,7 +123,6 @@ NS_IMETHODIMP nsPrintSettings::SetStartPageRange(int32_t aStartPageRange) return NS_OK; } -/* attribute long endPageRange; */ NS_IMETHODIMP nsPrintSettings::GetEndPageRange(int32_t *aEndPageRange) { //NS_ENSURE_ARG_POINTER(aEndPageRange); @@ -138,7 +135,6 @@ NS_IMETHODIMP nsPrintSettings::SetEndPageRange(int32_t aEndPageRange) return NS_OK; } -/* attribute boolean printReversed; */ NS_IMETHODIMP nsPrintSettings::GetPrintReversed(bool *aPrintReversed) { //NS_ENSURE_ARG_POINTER(aPrintReversed); @@ -151,7 +147,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintReversed(bool aPrintReversed) return NS_OK; } -/* attribute boolean printInColor; */ NS_IMETHODIMP nsPrintSettings::GetPrintInColor(bool *aPrintInColor) { //NS_ENSURE_ARG_POINTER(aPrintInColor); @@ -164,7 +159,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintInColor(bool aPrintInColor) return NS_OK; } -/* attribute short orientation; */ NS_IMETHODIMP nsPrintSettings::GetOrientation(int32_t *aOrientation) { NS_ENSURE_ARG_POINTER(aOrientation); @@ -219,7 +213,6 @@ NS_IMETHODIMP nsPrintSettings::SetResolutionName(const char16_t * aResolutionNam return NS_OK; } -/* attribute wstring resolution; */ NS_IMETHODIMP nsPrintSettings::GetResolution(int32_t *aResolution) { NS_ENSURE_ARG_POINTER(aResolution); @@ -232,7 +225,6 @@ NS_IMETHODIMP nsPrintSettings::SetResolution(const int32_t aResolution) return NS_OK; } -/* attribute wstring duplex; */ NS_IMETHODIMP nsPrintSettings::GetDuplex(int32_t *aDuplex) { NS_ENSURE_ARG_POINTER(aDuplex); @@ -258,7 +250,6 @@ NS_IMETHODIMP nsPrintSettings::SetDownloadFonts(bool aDownloadFonts) return NS_OK; } -/* attribute wstring printer; */ NS_IMETHODIMP nsPrintSettings::GetPrinterName(char16_t * *aPrinter) { NS_ENSURE_ARG_POINTER(aPrinter); @@ -280,7 +271,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrinterName(const char16_t * aPrinter) return NS_OK; } -/* attribute long numCopies; */ NS_IMETHODIMP nsPrintSettings::GetNumCopies(int32_t *aNumCopies) { NS_ENSURE_ARG_POINTER(aNumCopies); @@ -310,7 +300,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintCommand(const char16_t * aPrintCommand) return NS_OK; } -/* attribute boolean printToFile; */ NS_IMETHODIMP nsPrintSettings::GetPrintToFile(bool *aPrintToFile) { //NS_ENSURE_ARG_POINTER(aPrintToFile); @@ -323,7 +312,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintToFile(bool aPrintToFile) return NS_OK; } -/* attribute wstring toFileName; */ NS_IMETHODIMP nsPrintSettings::GetToFileName(char16_t * *aToFileName) { //NS_ENSURE_ARG_POINTER(aToFileName); @@ -340,7 +328,6 @@ NS_IMETHODIMP nsPrintSettings::SetToFileName(const char16_t * aToFileName) return NS_OK; } -/* attribute short outputFormat; */ NS_IMETHODIMP nsPrintSettings::GetOutputFormat(int16_t *aOutputFormat) { NS_ENSURE_ARG_POINTER(aOutputFormat); @@ -353,7 +340,6 @@ NS_IMETHODIMP nsPrintSettings::SetOutputFormat(int16_t aOutputFormat) return NS_OK; } -/* attribute long printPageDelay; */ NS_IMETHODIMP nsPrintSettings::GetPrintPageDelay(int32_t *aPrintPageDelay) { *aPrintPageDelay = mPrintPageDelay; @@ -365,7 +351,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintPageDelay(int32_t aPrintPageDelay) return NS_OK; } -/* attribute boolean isInitializedFromPrinter; */ NS_IMETHODIMP nsPrintSettings::GetIsInitializedFromPrinter(bool *aIsInitializedFromPrinter) { NS_ENSURE_ARG_POINTER(aIsInitializedFromPrinter); @@ -378,7 +363,6 @@ NS_IMETHODIMP nsPrintSettings::SetIsInitializedFromPrinter(bool aIsInitializedFr return NS_OK; } -/* attribute boolean isInitializedFromPrefs; */ NS_IMETHODIMP nsPrintSettings::GetIsInitializedFromPrefs(bool *aInitializedFromPrefs) { NS_ENSURE_ARG_POINTER(aInitializedFromPrefs); @@ -391,7 +375,6 @@ NS_IMETHODIMP nsPrintSettings::SetIsInitializedFromPrefs(bool aInitializedFromPr return NS_OK; } -/* attribute boolean persistMarginBoxSettings; */ NS_IMETHODIMP nsPrintSettings::GetPersistMarginBoxSettings(bool *aPersistMarginBoxSettings) { NS_ENSURE_ARG_POINTER(aPersistMarginBoxSettings); @@ -404,7 +387,6 @@ NS_IMETHODIMP nsPrintSettings::SetPersistMarginBoxSettings(bool aPersistMarginBo return NS_OK; } -/* attribute double marginTop; */ NS_IMETHODIMP nsPrintSettings::GetMarginTop(double *aMarginTop) { NS_ENSURE_ARG_POINTER(aMarginTop); @@ -417,7 +399,6 @@ NS_IMETHODIMP nsPrintSettings::SetMarginTop(double aMarginTop) return NS_OK; } -/* attribute double marginLeft; */ NS_IMETHODIMP nsPrintSettings::GetMarginLeft(double *aMarginLeft) { NS_ENSURE_ARG_POINTER(aMarginLeft); @@ -430,7 +411,6 @@ NS_IMETHODIMP nsPrintSettings::SetMarginLeft(double aMarginLeft) return NS_OK; } -/* attribute double marginBottom; */ NS_IMETHODIMP nsPrintSettings::GetMarginBottom(double *aMarginBottom) { NS_ENSURE_ARG_POINTER(aMarginBottom); @@ -443,7 +423,6 @@ NS_IMETHODIMP nsPrintSettings::SetMarginBottom(double aMarginBottom) return NS_OK; } -/* attribute double marginRight; */ NS_IMETHODIMP nsPrintSettings::GetMarginRight(double *aMarginRight) { NS_ENSURE_ARG_POINTER(aMarginRight); @@ -456,7 +435,6 @@ NS_IMETHODIMP nsPrintSettings::SetMarginRight(double aMarginRight) return NS_OK; } -/* attribute double edgeTop; */ NS_IMETHODIMP nsPrintSettings::GetEdgeTop(double *aEdgeTop) { NS_ENSURE_ARG_POINTER(aEdgeTop); @@ -469,7 +447,6 @@ NS_IMETHODIMP nsPrintSettings::SetEdgeTop(double aEdgeTop) return NS_OK; } -/* attribute double edgeLeft; */ NS_IMETHODIMP nsPrintSettings::GetEdgeLeft(double *aEdgeLeft) { NS_ENSURE_ARG_POINTER(aEdgeLeft); @@ -482,7 +459,6 @@ NS_IMETHODIMP nsPrintSettings::SetEdgeLeft(double aEdgeLeft) return NS_OK; } -/* attribute double edgeBottom; */ NS_IMETHODIMP nsPrintSettings::GetEdgeBottom(double *aEdgeBottom) { NS_ENSURE_ARG_POINTER(aEdgeBottom); @@ -495,7 +471,6 @@ NS_IMETHODIMP nsPrintSettings::SetEdgeBottom(double aEdgeBottom) return NS_OK; } -/* attribute double edgeRight; */ NS_IMETHODIMP nsPrintSettings::GetEdgeRight(double *aEdgeRight) { NS_ENSURE_ARG_POINTER(aEdgeRight); @@ -508,7 +483,6 @@ NS_IMETHODIMP nsPrintSettings::SetEdgeRight(double aEdgeRight) return NS_OK; } -/* attribute double unwriteableMarginTop; */ NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginTop(double *aUnwriteableMarginTop) { NS_ENSURE_ARG_POINTER(aUnwriteableMarginTop); @@ -523,7 +497,6 @@ NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginTop(double aUnwriteableMargin return NS_OK; } -/* attribute double unwriteableMarginLeft; */ NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft) { NS_ENSURE_ARG_POINTER(aUnwriteableMarginLeft); @@ -538,7 +511,6 @@ NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginLeft(double aUnwriteableMargi return NS_OK; } -/* attribute double unwriteableMarginBottom; */ NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom) { NS_ENSURE_ARG_POINTER(aUnwriteableMarginBottom); @@ -553,7 +525,6 @@ NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginBottom(double aUnwriteableMar return NS_OK; } -/* attribute double unwriteableMarginRight; */ NS_IMETHODIMP nsPrintSettings::GetUnwriteableMarginRight(double *aUnwriteableMarginRight) { NS_ENSURE_ARG_POINTER(aUnwriteableMarginRight); @@ -568,7 +539,6 @@ NS_IMETHODIMP nsPrintSettings::SetUnwriteableMarginRight(double aUnwriteableMarg return NS_OK; } -/* attribute double scaling; */ NS_IMETHODIMP nsPrintSettings::GetScaling(double *aScaling) { NS_ENSURE_ARG_POINTER(aScaling); @@ -582,7 +552,6 @@ NS_IMETHODIMP nsPrintSettings::SetScaling(double aScaling) return NS_OK; } -/* attribute boolean printBGColors; */ NS_IMETHODIMP nsPrintSettings::GetPrintBGColors(bool *aPrintBGColors) { NS_ENSURE_ARG_POINTER(aPrintBGColors); @@ -595,7 +564,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintBGColors(bool aPrintBGColors) return NS_OK; } -/* attribute boolean printBGImages; */ NS_IMETHODIMP nsPrintSettings::GetPrintBGImages(bool *aPrintBGImages) { NS_ENSURE_ARG_POINTER(aPrintBGImages); @@ -608,7 +576,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintBGImages(bool aPrintBGImages) return NS_OK; } -/* attribute long printRange; */ NS_IMETHODIMP nsPrintSettings::GetPrintRange(int16_t *aPrintRange) { NS_ENSURE_ARG_POINTER(aPrintRange); @@ -621,7 +588,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintRange(int16_t aPrintRange) return NS_OK; } -/* attribute wstring docTitle; */ NS_IMETHODIMP nsPrintSettings::GetTitle(char16_t * *aTitle) { NS_ENSURE_ARG_POINTER(aTitle); @@ -642,7 +608,6 @@ NS_IMETHODIMP nsPrintSettings::SetTitle(const char16_t * aTitle) return NS_OK; } -/* attribute wstring docURL; */ NS_IMETHODIMP nsPrintSettings::GetDocURL(char16_t * *aDocURL) { NS_ENSURE_ARG_POINTER(aDocURL); @@ -701,7 +666,6 @@ nsPrintSettings::GetPrintOptionsBits(int32_t *aBits) return NS_OK; } -/* attribute wstring docTitle; */ nsresult nsPrintSettings::GetMarginStrs(char16_t * *aTitle, nsHeaderFooterEnum aType, @@ -747,7 +711,6 @@ nsPrintSettings::SetMarginStrs(const char16_t * aTitle, return NS_OK; } -/* attribute wstring Header String Left */ NS_IMETHODIMP nsPrintSettings::GetHeaderStrLeft(char16_t * *aTitle) { return GetMarginStrs(aTitle, eHeader, kJustLeft); @@ -757,7 +720,6 @@ NS_IMETHODIMP nsPrintSettings::SetHeaderStrLeft(const char16_t * aTitle) return SetMarginStrs(aTitle, eHeader, kJustLeft); } -/* attribute wstring Header String Center */ NS_IMETHODIMP nsPrintSettings::GetHeaderStrCenter(char16_t * *aTitle) { return GetMarginStrs(aTitle, eHeader, kJustCenter); @@ -767,7 +729,6 @@ NS_IMETHODIMP nsPrintSettings::SetHeaderStrCenter(const char16_t * aTitle) return SetMarginStrs(aTitle, eHeader, kJustCenter); } -/* attribute wstring Header String Right */ NS_IMETHODIMP nsPrintSettings::GetHeaderStrRight(char16_t * *aTitle) { return GetMarginStrs(aTitle, eHeader, kJustRight); @@ -777,8 +738,6 @@ NS_IMETHODIMP nsPrintSettings::SetHeaderStrRight(const char16_t * aTitle) return SetMarginStrs(aTitle, eHeader, kJustRight); } - -/* attribute wstring Footer String Left */ NS_IMETHODIMP nsPrintSettings::GetFooterStrLeft(char16_t * *aTitle) { return GetMarginStrs(aTitle, eFooter, kJustLeft); @@ -788,7 +747,6 @@ NS_IMETHODIMP nsPrintSettings::SetFooterStrLeft(const char16_t * aTitle) return SetMarginStrs(aTitle, eFooter, kJustLeft); } -/* attribute wstring Footer String Center */ NS_IMETHODIMP nsPrintSettings::GetFooterStrCenter(char16_t * *aTitle) { return GetMarginStrs(aTitle, eFooter, kJustCenter); @@ -798,7 +756,6 @@ NS_IMETHODIMP nsPrintSettings::SetFooterStrCenter(const char16_t * aTitle) return SetMarginStrs(aTitle, eFooter, kJustCenter); } -/* attribute wstring Footer String Right */ NS_IMETHODIMP nsPrintSettings::GetFooterStrRight(char16_t * *aTitle) { return GetMarginStrs(aTitle, eFooter, kJustRight); @@ -808,7 +765,6 @@ NS_IMETHODIMP nsPrintSettings::SetFooterStrRight(const char16_t * aTitle) return SetMarginStrs(aTitle, eFooter, kJustRight); } -/* attribute short printFrameTypeUsage; */ NS_IMETHODIMP nsPrintSettings::GetPrintFrameTypeUsage(int16_t *aPrintFrameTypeUsage) { NS_ENSURE_ARG_POINTER(aPrintFrameTypeUsage); @@ -821,7 +777,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintFrameTypeUsage(int16_t aPrintFrameTypeUsa return NS_OK; } -/* attribute long printFrameType; */ NS_IMETHODIMP nsPrintSettings::GetPrintFrameType(int16_t *aPrintFrameType) { NS_ENSURE_ARG_POINTER(aPrintFrameType); @@ -834,7 +789,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintFrameType(int16_t aPrintFrameType) return NS_OK; } -/* attribute boolean printSilent; */ NS_IMETHODIMP nsPrintSettings::GetPrintSilent(bool *aPrintSilent) { NS_ENSURE_ARG_POINTER(aPrintSilent); @@ -847,7 +801,6 @@ NS_IMETHODIMP nsPrintSettings::SetPrintSilent(bool aPrintSilent) return NS_OK; } -/* attribute boolean shrinkToFit; */ NS_IMETHODIMP nsPrintSettings::GetShrinkToFit(bool *aShrinkToFit) { NS_ENSURE_ARG_POINTER(aShrinkToFit); @@ -860,7 +813,6 @@ NS_IMETHODIMP nsPrintSettings::SetShrinkToFit(bool aShrinkToFit) return NS_OK; } -/* attribute boolean showPrintProgress; */ NS_IMETHODIMP nsPrintSettings::GetShowPrintProgress(bool *aShowPrintProgress) { NS_ENSURE_ARG_POINTER(aShowPrintProgress); @@ -873,7 +825,6 @@ NS_IMETHODIMP nsPrintSettings::SetShowPrintProgress(bool aShowPrintProgress) return NS_OK; } -/* attribute wstring paperName; */ NS_IMETHODIMP nsPrintSettings::GetPaperName(char16_t * *aPaperName) { NS_ENSURE_ARG_POINTER(aPaperName); @@ -915,7 +866,6 @@ NS_IMETHODIMP nsPrintSettings::SetPlexName(const char16_t * aPlexName) return NS_OK; } -/* attribute boolean howToEnableFrameUI; */ NS_IMETHODIMP nsPrintSettings::GetHowToEnableFrameUI(int16_t *aHowToEnableFrameUI) { NS_ENSURE_ARG_POINTER(aHowToEnableFrameUI); @@ -928,7 +878,6 @@ NS_IMETHODIMP nsPrintSettings::SetHowToEnableFrameUI(int16_t aHowToEnableFrameUI return NS_OK; } -/* attribute long isCancelled; */ NS_IMETHODIMP nsPrintSettings::GetIsCancelled(bool *aIsCancelled) { NS_ENSURE_ARG_POINTER(aIsCancelled); @@ -941,7 +890,6 @@ NS_IMETHODIMP nsPrintSettings::SetIsCancelled(bool aIsCancelled) return NS_OK; } -/* attribute double paperWidth; */ NS_IMETHODIMP nsPrintSettings::GetPaperWidth(double *aPaperWidth) { NS_ENSURE_ARG_POINTER(aPaperWidth); @@ -954,7 +902,6 @@ NS_IMETHODIMP nsPrintSettings::SetPaperWidth(double aPaperWidth) return NS_OK; } -/* attribute double paperHeight; */ NS_IMETHODIMP nsPrintSettings::GetPaperHeight(double *aPaperHeight) { NS_ENSURE_ARG_POINTER(aPaperHeight); @@ -967,7 +914,6 @@ NS_IMETHODIMP nsPrintSettings::SetPaperHeight(double aPaperHeight) return NS_OK; } -/* attribute short PaperSizeUnit; */ NS_IMETHODIMP nsPrintSettings::GetPaperSizeUnit(int16_t *aPaperSizeUnit) { NS_ENSURE_ARG_POINTER(aPaperSizeUnit); @@ -980,7 +926,6 @@ NS_IMETHODIMP nsPrintSettings::SetPaperSizeUnit(int16_t aPaperSizeUnit) return NS_OK; } -/* attribute short PaperSizeType; */ NS_IMETHODIMP nsPrintSettings::GetPaperSizeType(int16_t *aPaperSizeType) { NS_ENSURE_ARG_POINTER(aPaperSizeType); @@ -993,7 +938,6 @@ NS_IMETHODIMP nsPrintSettings::SetPaperSizeType(int16_t aPaperSizeType) return NS_OK; } -/* attribute short PaperData; */ NS_IMETHODIMP nsPrintSettings::GetPaperData(int16_t *aPaperData) { NS_ENSURE_ARG_POINTER(aPaperData); @@ -1116,7 +1060,6 @@ nsPrintSettings::_Clone(nsIPrintSettings **_retval) return NS_OK; } -/* nsIPrintSettings clone (); */ NS_IMETHODIMP nsPrintSettings::Clone(nsIPrintSettings **_retval) { @@ -1124,7 +1067,6 @@ nsPrintSettings::Clone(nsIPrintSettings **_retval) return _Clone(_retval); } -/* void assign (in nsIPrintSettings aPS); */ nsresult nsPrintSettings::_Assign(nsIPrintSettings *aPS) { @@ -1133,7 +1075,6 @@ nsPrintSettings::_Assign(nsIPrintSettings *aPS) return NS_OK; } -/* void assign (in nsIPrintSettings aPS); */ NS_IMETHODIMP nsPrintSettings::Assign(nsIPrintSettings *aPS) { diff --git a/widget/qt/GfxInfo.cpp b/widget/qt/GfxInfo.cpp index 6e34c073e2..1a506831fa 100644 --- a/widget/qt/GfxInfo.cpp +++ b/widget/qt/GfxInfo.cpp @@ -21,21 +21,18 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled) return NS_ERROR_FAILURE; } -/* readonly attribute DOMString DWriteVersion; */ NS_IMETHODIMP GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString cleartypeParameters; */ NS_IMETHODIMP GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDescription; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) { @@ -43,14 +40,12 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) return NS_OK; } -/* readonly attribute DOMString adapterDescription2; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterRAM; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) { @@ -58,14 +53,12 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) return NS_OK; } -/* readonly attribute DOMString adapterRAM2; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriver; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) { @@ -73,14 +66,12 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) return NS_OK; } -/* readonly attribute DOMString adapterDriver2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverVersion; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) { @@ -88,14 +79,12 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) return NS_OK; } -/* readonly attribute DOMString adapterDriverVersion2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverDate; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) { @@ -103,14 +92,12 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) return NS_OK; } -/* readonly attribute DOMString adapterDriverDate2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterVendorID; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) { @@ -118,14 +105,12 @@ GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) return NS_OK; } -/* readonly attribute DOMString adapterVendorID2; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDeviceID; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) { @@ -133,28 +118,24 @@ GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) return NS_OK; } -/* readonly attribute DOMString adapterDeviceID2; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID2; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute boolean isGPU2Active; */ NS_IMETHODIMP GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { @@ -189,25 +170,21 @@ GfxInfo::GetFeatureStatusImpl(int32_t /*aFeature*/, // Implement nsIGfxInfoDebug -/* void spoofVendorID (in DOMString aVendorID); */ NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString &) { return NS_OK; } -/* void spoofDeviceID (in unsigned long aDeviceID); */ NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString &) { return NS_OK; } -/* void spoofDriverVersion (in DOMString aDriverVersion); */ NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString &) { return NS_OK; } -/* void spoofOSVersion (in unsigned long aVersion); */ NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t) { return NS_OK; diff --git a/widget/uikit/GfxInfo.cpp b/widget/uikit/GfxInfo.cpp index 50100a17fa..9f605ebead 100644 --- a/widget/uikit/GfxInfo.cpp +++ b/widget/uikit/GfxInfo.cpp @@ -34,105 +34,90 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled) return NS_ERROR_FAILURE; } -/* readonly attribute DOMString DWriteVersion; */ NS_IMETHODIMP GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString cleartypeParameters; */ NS_IMETHODIMP GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDescription; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDescription2; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterRAM; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterRAM2; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriver; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriver2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverVersion; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverVersion2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverDate; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDriverDate2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterVendorID; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterVendorID2; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterDeviceID; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) { @@ -140,28 +125,24 @@ GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) return NS_OK; } -/* readonly attribute DOMString adapterDeviceID2; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute DOMString adapterSubsysID2; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID) { return NS_ERROR_FAILURE; } -/* readonly attribute boolean isGPU2Active; */ NS_IMETHODIMP GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { @@ -211,25 +192,21 @@ GfxInfo::GetFeatureStatusImpl(int32_t aFeature, // Implement nsIGfxInfoDebug -/* void spoofVendorID (in DOMString aVendorID); */ NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString & aVendorID) { return NS_ERROR_FAILURE; } -/* void spoofDeviceID (in unsigned long aDeviceID); */ NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString & aDeviceID) { return NS_ERROR_FAILURE; } -/* void spoofDriverVersion (in DOMString aDriverVersion); */ NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString & aDriverVersion) { return NS_ERROR_FAILURE; } -/* void spoofOSVersion (in unsigned long aVersion); */ NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t aVersion) { return NS_ERROR_FAILURE; diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index b8cda92454..d93ee70ced 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -52,7 +52,6 @@ GfxInfo::GetDWriteEnabled(bool *aEnabled) return NS_OK; } -/* readonly attribute DOMString DWriteVersion; */ NS_IMETHODIMP GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) { @@ -63,7 +62,6 @@ GfxInfo::GetDWriteVersion(nsAString & aDwriteVersion) #define PIXEL_STRUCT_RGB 1 #define PIXEL_STRUCT_BGR 2 -/* readonly attribute DOMString cleartypeParameters; */ NS_IMETHODIMP GfxInfo::GetCleartypeParameters(nsAString & aCleartypeParams) { @@ -553,7 +551,6 @@ GfxInfo::Init() return rv; } -/* readonly attribute DOMString adapterDescription; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) { @@ -561,7 +558,6 @@ GfxInfo::GetAdapterDescription(nsAString & aAdapterDescription) return NS_OK; } -/* readonly attribute DOMString adapterDescription2; */ NS_IMETHODIMP GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) { @@ -569,7 +565,6 @@ GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription) return NS_OK; } -/* readonly attribute DOMString adapterRAM; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) { @@ -578,7 +573,6 @@ GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM) return NS_OK; } -/* readonly attribute DOMString adapterRAM2; */ NS_IMETHODIMP GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) { @@ -590,7 +584,6 @@ GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM) return NS_OK; } -/* readonly attribute DOMString adapterDriver; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) { @@ -599,7 +592,6 @@ GfxInfo::GetAdapterDriver(nsAString & aAdapterDriver) return NS_OK; } -/* readonly attribute DOMString adapterDriver2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) { @@ -611,7 +603,6 @@ GfxInfo::GetAdapterDriver2(nsAString & aAdapterDriver) return NS_OK; } -/* readonly attribute DOMString adapterDriverVersion; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) { @@ -619,7 +610,6 @@ GfxInfo::GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) return NS_OK; } -/* readonly attribute DOMString adapterDriverDate; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) { @@ -627,7 +617,6 @@ GfxInfo::GetAdapterDriverDate(nsAString & aAdapterDriverDate) return NS_OK; } -/* readonly attribute DOMString adapterDriverVersion2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) { @@ -635,7 +624,6 @@ GfxInfo::GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) return NS_OK; } -/* readonly attribute DOMString adapterDriverDate2; */ NS_IMETHODIMP GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) { @@ -643,7 +631,6 @@ GfxInfo::GetAdapterDriverDate2(nsAString & aAdapterDriverDate) return NS_OK; } -/* readonly attribute DOMString adapterVendorID; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) { @@ -651,7 +638,6 @@ GfxInfo::GetAdapterVendorID(nsAString & aAdapterVendorID) return NS_OK; } -/* readonly attribute DOMString adapterVendorID2; */ NS_IMETHODIMP GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) { @@ -659,7 +645,6 @@ GfxInfo::GetAdapterVendorID2(nsAString & aAdapterVendorID) return NS_OK; } -/* readonly attribute DOMString adapterDeviceID; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) { @@ -667,7 +652,6 @@ GfxInfo::GetAdapterDeviceID(nsAString & aAdapterDeviceID) return NS_OK; } -/* readonly attribute DOMString adapterDeviceID2; */ NS_IMETHODIMP GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) { @@ -675,7 +659,6 @@ GfxInfo::GetAdapterDeviceID2(nsAString & aAdapterDeviceID) return NS_OK; } -/* readonly attribute DOMString adapterSubsysID; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID) { @@ -683,7 +666,6 @@ GfxInfo::GetAdapterSubsysID(nsAString & aAdapterSubsysID) return NS_OK; } -/* readonly attribute DOMString adapterSubsysID2; */ NS_IMETHODIMP GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID) { @@ -691,7 +673,6 @@ GfxInfo::GetAdapterSubsysID2(nsAString & aAdapterSubsysID) return NS_OK; } -/* readonly attribute boolean isGPU2Active; */ NS_IMETHODIMP GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) { @@ -700,7 +681,6 @@ GfxInfo::GetIsGPU2Active(bool* aIsGPU2Active) } /* interface nsIGfxInfo2 */ -/* readonly attribute DOMString countryCode; */ NS_IMETHODIMP GfxInfo::GetCountryCode(nsAString& aCountryCode) { @@ -1181,28 +1161,24 @@ GfxInfo::DescribeFeatures(JSContext* aCx, JS::Handle aObj) // Implement nsIGfxInfoDebug -/* void spoofVendorID (in DOMString aVendorID); */ NS_IMETHODIMP GfxInfo::SpoofVendorID(const nsAString & aVendorID) { mAdapterVendorID = aVendorID; return NS_OK; } -/* void spoofDeviceID (in unsigned long aDeviceID); */ NS_IMETHODIMP GfxInfo::SpoofDeviceID(const nsAString & aDeviceID) { mAdapterDeviceID = aDeviceID; return NS_OK; } -/* void spoofDriverVersion (in DOMString aDriverVersion); */ NS_IMETHODIMP GfxInfo::SpoofDriverVersion(const nsAString & aDriverVersion) { mDriverVersion = aDriverVersion; return NS_OK; } -/* void spoofOSVersion (in unsigned long aVersion); */ NS_IMETHODIMP GfxInfo::SpoofOSVersion(uint32_t aVersion) { mWindowsVersion = aVersion; diff --git a/widget/windows/JumpListBuilder.cpp b/widget/windows/JumpListBuilder.cpp index d00f8b4aac..f2a1ba6c77 100644 --- a/widget/windows/JumpListBuilder.cpp +++ b/widget/windows/JumpListBuilder.cpp @@ -74,7 +74,6 @@ JumpListBuilder::~JumpListBuilder() ::CoUninitialize(); } -/* readonly attribute short available; */ NS_IMETHODIMP JumpListBuilder::GetAvailable(int16_t *aAvailable) { *aAvailable = false; @@ -85,7 +84,6 @@ NS_IMETHODIMP JumpListBuilder::GetAvailable(int16_t *aAvailable) return NS_OK; } -/* readonly attribute boolean isListCommitted; */ NS_IMETHODIMP JumpListBuilder::GetIsListCommitted(bool *aCommit) { *aCommit = mHasCommit; @@ -93,7 +91,6 @@ NS_IMETHODIMP JumpListBuilder::GetIsListCommitted(bool *aCommit) return NS_OK; } -/* readonly attribute short maxItems; */ NS_IMETHODIMP JumpListBuilder::GetMaxListItems(int16_t *aMaxItems) { if (!mJumpListMgr) @@ -119,7 +116,6 @@ NS_IMETHODIMP JumpListBuilder::GetMaxListItems(int16_t *aMaxItems) return NS_OK; } -/* boolean initListBuild(in nsIMutableArray removedItems); */ NS_IMETHODIMP JumpListBuilder::InitListBuild(nsIMutableArray *removedItems, bool *_retval) { NS_ENSURE_ARG_POINTER(removedItems); @@ -250,7 +246,6 @@ nsresult JumpListBuilder::RemoveIconCacheForAllItems() return NS_OK; } -/* boolean addListToBuild(in short aCatType, [optional] in nsIArray items, [optional] in AString catName); */ NS_IMETHODIMP JumpListBuilder::AddListToBuild(int16_t aCatType, nsIArray *items, const nsAString &catName, bool *_retval) { nsresult rv; @@ -402,7 +397,6 @@ NS_IMETHODIMP JumpListBuilder::AddListToBuild(int16_t aCatType, nsIArray *items, return NS_OK; } -/* void abortListBuild(); */ NS_IMETHODIMP JumpListBuilder::AbortListBuild() { if (!mJumpListMgr) @@ -414,7 +408,6 @@ NS_IMETHODIMP JumpListBuilder::AbortListBuild() return NS_OK; } -/* boolean commitListBuild(); */ NS_IMETHODIMP JumpListBuilder::CommitListBuild(bool *_retval) { *_retval = false; @@ -434,7 +427,6 @@ NS_IMETHODIMP JumpListBuilder::CommitListBuild(bool *_retval) return NS_OK; } -/* boolean deleteActiveList(); */ NS_IMETHODIMP JumpListBuilder::DeleteActiveList(bool *_retval) { *_retval = false; diff --git a/widget/windows/JumpListItem.cpp b/widget/windows/JumpListItem.cpp index 68bd9ea879..f4b219db17 100644 --- a/widget/windows/JumpListItem.cpp +++ b/widget/windows/JumpListItem.cpp @@ -43,7 +43,6 @@ NS_IMPL_CYCLE_COLLECTION(JumpListShortcut, mHandlerApp) NS_IMPL_CYCLE_COLLECTING_ADDREF(JumpListShortcut) NS_IMPL_CYCLE_COLLECTING_RELEASE(JumpListShortcut) -/* attribute short type; */ NS_IMETHODIMP JumpListItem::GetType(int16_t *aType) { NS_ENSURE_ARG_POINTER(aType); @@ -53,7 +52,6 @@ NS_IMETHODIMP JumpListItem::GetType(int16_t *aType) return NS_OK; } -/* boolean equals(nsIJumpListItem item); */ NS_IMETHODIMP JumpListItem::Equals(nsIJumpListItem *aItem, bool *aResult) { NS_ENSURE_ARG_POINTER(aItem); @@ -75,7 +73,6 @@ NS_IMETHODIMP JumpListItem::Equals(nsIJumpListItem *aItem, bool *aResult) /* link impl. */ -/* attribute nsIURI uri; */ NS_IMETHODIMP JumpListLink::GetUri(nsIURI **aURI) { NS_IF_ADDREF(*aURI = mURI); @@ -90,7 +87,6 @@ NS_IMETHODIMP JumpListLink::SetUri(nsIURI *aURI) return NS_OK; } -/* attribute AString uriTitle; */ NS_IMETHODIMP JumpListLink::SetUriTitle(const nsAString &aUriTitle) { mUriTitle.Assign(aUriTitle); @@ -105,7 +101,6 @@ NS_IMETHODIMP JumpListLink::GetUriTitle(nsAString& aUriTitle) return NS_OK; } -/* readonly attribute long uriHash; */ NS_IMETHODIMP JumpListLink::GetUriHash(nsACString& aUriHash) { if (!mURI) @@ -114,7 +109,6 @@ NS_IMETHODIMP JumpListLink::GetUriHash(nsACString& aUriHash) return mozilla::widget::FaviconHelper::HashURI(mCryptoHash, mURI, aUriHash); } -/* boolean compareHash(in nsIURI uri); */ NS_IMETHODIMP JumpListLink::CompareHash(nsIURI *aUri, bool *aResult) { nsresult rv; @@ -138,7 +132,6 @@ NS_IMETHODIMP JumpListLink::CompareHash(nsIURI *aUri, bool *aResult) return NS_OK; } -/* boolean equals(nsIJumpListItem item); */ NS_IMETHODIMP JumpListLink::Equals(nsIJumpListItem *aItem, bool *aResult) { NS_ENSURE_ARG_POINTER(aItem); @@ -184,7 +177,6 @@ NS_IMETHODIMP JumpListLink::Equals(nsIJumpListItem *aItem, bool *aResult) /* shortcut impl. */ -/* attribute nsILocalHandlerApp app; */ NS_IMETHODIMP JumpListShortcut::GetApp(nsILocalHandlerApp **aApp) { NS_IF_ADDREF(*aApp = mHandlerApp); @@ -203,7 +195,6 @@ NS_IMETHODIMP JumpListShortcut::SetApp(nsILocalHandlerApp *aApp) return NS_OK; } -/* attribute long iconIndex; */ NS_IMETHODIMP JumpListShortcut::GetIconIndex(int32_t *aIconIndex) { NS_ENSURE_ARG_POINTER(aIconIndex); @@ -218,7 +209,6 @@ NS_IMETHODIMP JumpListShortcut::SetIconIndex(int32_t aIconIndex) return NS_OK; } -/* attribute long iconURI; */ NS_IMETHODIMP JumpListShortcut::GetFaviconPageUri(nsIURI **aFaviconPageURI) { NS_IF_ADDREF(*aFaviconPageURI = mFaviconPageURI); @@ -232,7 +222,6 @@ NS_IMETHODIMP JumpListShortcut::SetFaviconPageUri(nsIURI *aFaviconPageURI) return NS_OK; } -/* boolean equals(nsIJumpListItem item); */ NS_IMETHODIMP JumpListShortcut::Equals(nsIJumpListItem *aItem, bool *aResult) { NS_ENSURE_ARG_POINTER(aItem); diff --git a/widget/windows/WinTaskbar.cpp b/widget/windows/WinTaskbar.cpp index 29b6fa436c..b5600b352c 100644 --- a/widget/windows/WinTaskbar.cpp +++ b/widget/windows/WinTaskbar.cpp @@ -316,7 +316,6 @@ WinTaskbar::GetAppUserModelID(nsAString & aDefaultGroupId) { return true; } -/* readonly attribute AString defaultGroupId; */ NS_IMETHODIMP WinTaskbar::GetDefaultGroupId(nsAString & aDefaultGroupId) { if (!GetAppUserModelID(aDefaultGroupId)) @@ -438,7 +437,6 @@ WinTaskbar::GetOverlayIconController(nsIDocShell *shell, return CallQueryInterface(preview, _retval); } -/* nsIJumpListBuilder createJumpListBuilder(); */ NS_IMETHODIMP WinTaskbar::CreateJumpListBuilder(nsIJumpListBuilder * *aJumpListBuilder) { nsresult rv; @@ -456,14 +454,12 @@ WinTaskbar::CreateJumpListBuilder(nsIJumpListBuilder * *aJumpListBuilder) { return NS_OK; } -/* void setGroupIdForWindow (in nsIDOMWindow aParent, in AString aIdentifier); */ NS_IMETHODIMP WinTaskbar::SetGroupIdForWindow(nsIDOMWindow *aParent, const nsAString & aIdentifier) { return SetWindowAppUserModelProp(aParent, nsString(aIdentifier)); } -/* void prepareFullScreen(in nsIDOMWindow aWindow, in boolean aFullScreen); */ NS_IMETHODIMP WinTaskbar::PrepareFullScreen(nsIDOMWindow *aWindow, bool aFullScreen) { NS_ENSURE_ARG_POINTER(aWindow); @@ -475,7 +471,6 @@ WinTaskbar::PrepareFullScreen(nsIDOMWindow *aWindow, bool aFullScreen) { return PrepareFullScreenHWND(toplevelHWND, aFullScreen); } -/* void prepareFullScreen(in voidPtr aWindow, in boolean aFullScreen); */ NS_IMETHODIMP WinTaskbar::PrepareFullScreenHWND(void *aHWND, bool aFullScreen) { if (!Initialize()) diff --git a/widget/windows/nsDeviceContextSpecWin.cpp b/widget/windows/nsDeviceContextSpecWin.cpp index 2489efba3e..159901011e 100644 --- a/widget/windows/nsDeviceContextSpecWin.cpp +++ b/widget/windows/nsDeviceContextSpecWin.cpp @@ -610,7 +610,6 @@ NS_IMPL_ISUPPORTS(nsPrinterEnumeratorWin, nsIPrinterEnumerator) //---------------------------------------------------------------------------------- // Return the Default Printer name -/* readonly attribute wstring defaultPrinterName; */ NS_IMETHODIMP nsPrinterEnumeratorWin::GetDefaultPrinterName(char16_t * *aDefaultPrinterName) { @@ -621,7 +620,6 @@ nsPrinterEnumeratorWin::GetDefaultPrinterName(char16_t * *aDefaultPrinterName) return NS_OK; } -/* void initPrintSettingsFromPrinter (in wstring aPrinterName, in nsIPrintSettings aPrintSettings); */ NS_IMETHODIMP nsPrinterEnumeratorWin::InitPrintSettingsFromPrinter(const char16_t *aPrinterName, nsIPrintSettings *aPrintSettings) { diff --git a/widget/windows/nsPrintOptionsWin.cpp b/widget/windows/nsPrintOptionsWin.cpp index 6bda837f6d..b9ef1362ac 100644 --- a/widget/windows/nsPrintOptionsWin.cpp +++ b/widget/windows/nsPrintOptionsWin.cpp @@ -97,7 +97,6 @@ nsPrintOptionsWin::DeserializeToPrintSettings(const PrintData& data, return NS_OK; } -/* nsIPrintSettings CreatePrintSettings (); */ nsresult nsPrintOptionsWin::_CreatePrintSettings(nsIPrintSettings **_retval) { *_retval = nullptr; diff --git a/widget/windows/nsPrintSettingsWin.cpp b/widget/windows/nsPrintSettingsWin.cpp index bf87c9c422..0408a8b603 100644 --- a/widget/windows/nsPrintSettingsWin.cpp +++ b/widget/windows/nsPrintSettingsWin.cpp @@ -45,7 +45,6 @@ nsPrintSettingsWin::~nsPrintSettingsWin() if (mDevMode) ::HeapFree(::GetProcessHeap(), 0, mDevMode); } -/* [noscript] attribute charPtr deviceName; */ NS_IMETHODIMP nsPrintSettingsWin::SetDeviceName(const char16_t * aDeviceName) { if (mDeviceName) { @@ -61,7 +60,6 @@ NS_IMETHODIMP nsPrintSettingsWin::GetDeviceName(char16_t **aDeviceName) return NS_OK; } -/* [noscript] attribute charPtr driverName; */ NS_IMETHODIMP nsPrintSettingsWin::SetDriverName(const char16_t * aDriverName) { if (mDriverName) { @@ -88,7 +86,6 @@ void nsPrintSettingsWin::CopyDevMode(DEVMODEW* aInDevMode, DEVMODEW *& aOutDevMo } -/* [noscript] attribute nsDevMode devMode; */ NS_IMETHODIMP nsPrintSettingsWin::GetDevMode(DEVMODEW * *aDevMode) { NS_ENSURE_ARG_POINTER(aDevMode); @@ -158,7 +155,6 @@ nsPrintSettingsWin& nsPrintSettingsWin::operator=(const nsPrintSettingsWin& rhs) } //------------------------------------------- -/* void assign (in nsIPrintSettings aPS); */ nsresult nsPrintSettingsWin::_Assign(nsIPrintSettings *aPS) { diff --git a/xpcom/base/nsMacUtilsImpl.cpp b/xpcom/base/nsMacUtilsImpl.cpp index 37c9099b6f..e2706047a6 100644 --- a/xpcom/base/nsMacUtilsImpl.cpp +++ b/xpcom/base/nsMacUtilsImpl.cpp @@ -118,7 +118,6 @@ nsMacUtilsImpl::GetArchitecturesInBinary(nsAString& aArchString) return GetArchString(aArchString); } -/* readonly attribute boolean isTranslated; */ // True when running under binary translation (Rosetta). NS_IMETHODIMP nsMacUtilsImpl::GetIsTranslated(bool* aIsTranslated) diff --git a/xpcom/ds/nsVariant.cpp b/xpcom/ds/nsVariant.cpp index 5a508739cb..e2cac97e57 100644 --- a/xpcom/ds/nsVariant.cpp +++ b/xpcom/ds/nsVariant.cpp @@ -1724,7 +1724,6 @@ nsVariant::nsVariant() // For all the data getters we just forward to the static (and sharable) // 'ConvertTo' functions. -/* readonly attribute uint16_t dataType; */ NS_IMETHODIMP nsVariant::GetDataType(uint16_t* aDataType) { @@ -1732,112 +1731,96 @@ nsVariant::GetDataType(uint16_t* aDataType) return NS_OK; } -/* uint8_t getAsInt8 (); */ NS_IMETHODIMP nsVariant::GetAsInt8(uint8_t* aResult) { return mData.ConvertToInt8(aResult); } -/* int16_t getAsInt16 (); */ NS_IMETHODIMP nsVariant::GetAsInt16(int16_t* aResult) { return mData.ConvertToInt16(aResult); } -/* int32_t getAsInt32 (); */ NS_IMETHODIMP nsVariant::GetAsInt32(int32_t* aResult) { return mData.ConvertToInt32(aResult); } -/* int64_t getAsInt64 (); */ NS_IMETHODIMP nsVariant::GetAsInt64(int64_t* aResult) { return mData.ConvertToInt64(aResult); } -/* uint8_t getAsUint8 (); */ NS_IMETHODIMP nsVariant::GetAsUint8(uint8_t* aResult) { return mData.ConvertToUint8(aResult); } -/* uint16_t getAsUint16 (); */ NS_IMETHODIMP nsVariant::GetAsUint16(uint16_t* aResult) { return mData.ConvertToUint16(aResult); } -/* uint32_t getAsUint32 (); */ NS_IMETHODIMP nsVariant::GetAsUint32(uint32_t* aResult) { return mData.ConvertToUint32(aResult); } -/* uint64_t getAsUint64 (); */ NS_IMETHODIMP nsVariant::GetAsUint64(uint64_t* aResult) { return mData.ConvertToUint64(aResult); } -/* float getAsFloat (); */ NS_IMETHODIMP nsVariant::GetAsFloat(float* aResult) { return mData.ConvertToFloat(aResult); } -/* double getAsDouble (); */ NS_IMETHODIMP nsVariant::GetAsDouble(double* aResult) { return mData.ConvertToDouble(aResult); } -/* bool getAsBool (); */ NS_IMETHODIMP nsVariant::GetAsBool(bool* aResult) { return mData.ConvertToBool(aResult); } -/* char getAsChar (); */ NS_IMETHODIMP nsVariant::GetAsChar(char* aResult) { return mData.ConvertToChar(aResult); } -/* wchar getAsWChar (); */ NS_IMETHODIMP nsVariant::GetAsWChar(char16_t* aResult) { return mData.ConvertToWChar(aResult); } -/* [notxpcom] nsresult getAsID (out nsID retval); */ NS_IMETHODIMP_(nsresult) nsVariant::GetAsID(nsID* aResult) { return mData.ConvertToID(aResult); } -/* AString getAsAString (); */ NS_IMETHODIMP nsVariant::GetAsAString(nsAString& aResult) { return mData.ConvertToAString(aResult); } -/* DOMString getAsDOMString (); */ NS_IMETHODIMP nsVariant::GetAsDOMString(nsAString& aResult) { @@ -1846,42 +1829,36 @@ nsVariant::GetAsDOMString(nsAString& aResult) return mData.ConvertToAString(aResult); } -/* ACString getAsACString (); */ NS_IMETHODIMP nsVariant::GetAsACString(nsACString& aResult) { return mData.ConvertToACString(aResult); } -/* AUTF8String getAsAUTF8String (); */ NS_IMETHODIMP nsVariant::GetAsAUTF8String(nsAUTF8String& aResult) { return mData.ConvertToAUTF8String(aResult); } -/* string getAsString (); */ NS_IMETHODIMP nsVariant::GetAsString(char** aResult) { return mData.ConvertToString(aResult); } -/* wstring getAsWString (); */ NS_IMETHODIMP nsVariant::GetAsWString(char16_t** aResult) { return mData.ConvertToWString(aResult); } -/* nsISupports getAsISupports (); */ NS_IMETHODIMP nsVariant::GetAsISupports(nsISupports** aResult) { return mData.ConvertToISupports(aResult); } -/* jsval getAsJSVal() */ NS_IMETHODIMP nsVariant::GetAsJSVal(JS::MutableHandleValue) { @@ -1889,14 +1866,12 @@ nsVariant::GetAsJSVal(JS::MutableHandleValue) return NS_ERROR_CANNOT_CONVERT_DATA; } -/* void getAsInterface (out nsIIDPtr iid, [iid_is (iid), retval] out nsQIResult iface); */ NS_IMETHODIMP nsVariant::GetAsInterface(nsIID** aIID, void** aInterface) { return mData.ConvertToInterface(aIID, aInterface); } -/* [notxpcom] nsresult getAsArray (out uint16_t type, out nsIID iid, out uint32_t count, out voidPtr ptr); */ NS_IMETHODIMP_(nsresult) nsVariant::GetAsArray(uint16_t* aType, nsIID* aIID, uint32_t* aCount, void** aPtr) @@ -1904,14 +1879,12 @@ nsVariant::GetAsArray(uint16_t* aType, nsIID* aIID, return mData.ConvertToArray(aType, aIID, aCount, aPtr); } -/* void getAsStringWithSize (out uint32_t size, [size_is (size), retval] out string str); */ NS_IMETHODIMP nsVariant::GetAsStringWithSize(uint32_t* aSize, char** aStr) { return mData.ConvertToStringWithSize(aSize, aStr); } -/* void getAsWStringWithSize (out uint32_t size, [size_is (size), retval] out wstring str); */ NS_IMETHODIMP nsVariant::GetAsWStringWithSize(uint32_t* aSize, char16_t** aStr) { @@ -1920,7 +1893,6 @@ nsVariant::GetAsWStringWithSize(uint32_t* aSize, char16_t** aStr) /***************************************************************************/ -/* attribute bool writable; */ NS_IMETHODIMP nsVariant::GetWritable(bool* aWritable) { @@ -1942,7 +1914,6 @@ nsVariant::SetWritable(bool aWritable) // For all the data setters we just forward to the static (and sharable) // 'SetFrom' functions. -/* void setAsInt8 (in uint8_t aValue); */ NS_IMETHODIMP nsVariant::SetAsInt8(uint8_t aValue) { @@ -1952,7 +1923,6 @@ nsVariant::SetAsInt8(uint8_t aValue) return mData.SetFromInt8(aValue); } -/* void setAsInt16 (in int16_t aValue); */ NS_IMETHODIMP nsVariant::SetAsInt16(int16_t aValue) { @@ -1962,7 +1932,6 @@ nsVariant::SetAsInt16(int16_t aValue) return mData.SetFromInt16(aValue); } -/* void setAsInt32 (in int32_t aValue); */ NS_IMETHODIMP nsVariant::SetAsInt32(int32_t aValue) { @@ -1972,7 +1941,6 @@ nsVariant::SetAsInt32(int32_t aValue) return mData.SetFromInt32(aValue); } -/* void setAsInt64 (in int64_t aValue); */ NS_IMETHODIMP nsVariant::SetAsInt64(int64_t aValue) { @@ -1982,7 +1950,6 @@ nsVariant::SetAsInt64(int64_t aValue) return mData.SetFromInt64(aValue); } -/* void setAsUint8 (in uint8_t aValue); */ NS_IMETHODIMP nsVariant::SetAsUint8(uint8_t aValue) { @@ -1992,7 +1959,6 @@ nsVariant::SetAsUint8(uint8_t aValue) return mData.SetFromUint8(aValue); } -/* void setAsUint16 (in uint16_t aValue); */ NS_IMETHODIMP nsVariant::SetAsUint16(uint16_t aValue) { @@ -2002,7 +1968,6 @@ nsVariant::SetAsUint16(uint16_t aValue) return mData.SetFromUint16(aValue); } -/* void setAsUint32 (in uint32_t aValue); */ NS_IMETHODIMP nsVariant::SetAsUint32(uint32_t aValue) { @@ -2012,7 +1977,6 @@ nsVariant::SetAsUint32(uint32_t aValue) return mData.SetFromUint32(aValue); } -/* void setAsUint64 (in uint64_t aValue); */ NS_IMETHODIMP nsVariant::SetAsUint64(uint64_t aValue) { @@ -2022,7 +1986,6 @@ nsVariant::SetAsUint64(uint64_t aValue) return mData.SetFromUint64(aValue); } -/* void setAsFloat (in float aValue); */ NS_IMETHODIMP nsVariant::SetAsFloat(float aValue) { @@ -2032,7 +1995,6 @@ nsVariant::SetAsFloat(float aValue) return mData.SetFromFloat(aValue); } -/* void setAsDouble (in double aValue); */ NS_IMETHODIMP nsVariant::SetAsDouble(double aValue) { @@ -2042,7 +2004,6 @@ nsVariant::SetAsDouble(double aValue) return mData.SetFromDouble(aValue); } -/* void setAsBool (in bool aValue); */ NS_IMETHODIMP nsVariant::SetAsBool(bool aValue) { @@ -2052,7 +2013,6 @@ nsVariant::SetAsBool(bool aValue) return mData.SetFromBool(aValue); } -/* void setAsChar (in char aValue); */ NS_IMETHODIMP nsVariant::SetAsChar(char aValue) { @@ -2062,7 +2022,6 @@ nsVariant::SetAsChar(char aValue) return mData.SetFromChar(aValue); } -/* void setAsWChar (in wchar aValue); */ NS_IMETHODIMP nsVariant::SetAsWChar(char16_t aValue) { @@ -2072,7 +2031,6 @@ nsVariant::SetAsWChar(char16_t aValue) return mData.SetFromWChar(aValue); } -/* void setAsID (in nsIDRef aValue); */ NS_IMETHODIMP nsVariant::SetAsID(const nsID& aValue) { @@ -2082,7 +2040,6 @@ nsVariant::SetAsID(const nsID& aValue) return mData.SetFromID(aValue); } -/* void setAsAString (in AString aValue); */ NS_IMETHODIMP nsVariant::SetAsAString(const nsAString& aValue) { @@ -2092,7 +2049,6 @@ nsVariant::SetAsAString(const nsAString& aValue) return mData.SetFromAString(aValue); } -/* void setAsDOMString (in DOMString aValue); */ NS_IMETHODIMP nsVariant::SetAsDOMString(const nsAString& aValue) { @@ -2103,7 +2059,6 @@ nsVariant::SetAsDOMString(const nsAString& aValue) return mData.SetFromDOMString(aValue); } -/* void setAsACString (in ACString aValue); */ NS_IMETHODIMP nsVariant::SetAsACString(const nsACString& aValue) { @@ -2113,7 +2068,6 @@ nsVariant::SetAsACString(const nsACString& aValue) return mData.SetFromACString(aValue); } -/* void setAsAUTF8String (in AUTF8String aValue); */ NS_IMETHODIMP nsVariant::SetAsAUTF8String(const nsAUTF8String& aValue) { @@ -2123,7 +2077,6 @@ nsVariant::SetAsAUTF8String(const nsAUTF8String& aValue) return mData.SetFromAUTF8String(aValue); } -/* void setAsString (in string aValue); */ NS_IMETHODIMP nsVariant::SetAsString(const char* aValue) { @@ -2133,7 +2086,6 @@ nsVariant::SetAsString(const char* aValue) return mData.SetFromString(aValue); } -/* void setAsWString (in wstring aValue); */ NS_IMETHODIMP nsVariant::SetAsWString(const char16_t* aValue) { @@ -2143,7 +2095,6 @@ nsVariant::SetAsWString(const char16_t* aValue) return mData.SetFromWString(aValue); } -/* void setAsISupports (in nsISupports aValue); */ NS_IMETHODIMP nsVariant::SetAsISupports(nsISupports* aValue) { @@ -2153,7 +2104,6 @@ nsVariant::SetAsISupports(nsISupports* aValue) return mData.SetFromISupports(aValue); } -/* void setAsInterface (in nsIIDRef iid, [iid_is (iid)] in nsQIResult iface); */ NS_IMETHODIMP nsVariant::SetAsInterface(const nsIID& aIID, void* aInterface) { @@ -2163,7 +2113,6 @@ nsVariant::SetAsInterface(const nsIID& aIID, void* aInterface) return mData.SetFromInterface(aIID, (nsISupports*)aInterface); } -/* [noscript] void setAsArray (in uint16_t type, in nsIIDPtr iid, in uint32_t count, in voidPtr ptr); */ NS_IMETHODIMP nsVariant::SetAsArray(uint16_t aType, const nsIID* aIID, uint32_t aCount, void* aPtr) @@ -2174,7 +2123,6 @@ nsVariant::SetAsArray(uint16_t aType, const nsIID* aIID, return mData.SetFromArray(aType, aIID, aCount, aPtr); } -/* void setAsStringWithSize (in uint32_t size, [size_is (size)] in string str); */ NS_IMETHODIMP nsVariant::SetAsStringWithSize(uint32_t aSize, const char* aStr) { @@ -2184,7 +2132,6 @@ nsVariant::SetAsStringWithSize(uint32_t aSize, const char* aStr) return mData.SetFromStringWithSize(aSize, aStr); } -/* void setAsWStringWithSize (in uint32_t size, [size_is (size)] in wstring str); */ NS_IMETHODIMP nsVariant::SetAsWStringWithSize(uint32_t aSize, const char16_t* aStr) { @@ -2194,7 +2141,6 @@ nsVariant::SetAsWStringWithSize(uint32_t aSize, const char16_t* aStr) return mData.SetFromWStringWithSize(aSize, aStr); } -/* void setAsVoid (); */ NS_IMETHODIMP nsVariant::SetAsVoid() { @@ -2204,7 +2150,6 @@ nsVariant::SetAsVoid() return mData.SetToVoid(); } -/* void setAsEmpty (); */ NS_IMETHODIMP nsVariant::SetAsEmpty() { @@ -2214,7 +2159,6 @@ nsVariant::SetAsEmpty() return mData.SetToEmpty(); } -/* void setAsEmptyArray (); */ NS_IMETHODIMP nsVariant::SetAsEmptyArray() { @@ -2224,7 +2168,6 @@ nsVariant::SetAsEmptyArray() return mData.SetToEmptyArray(); } -/* void setFromVariant (in nsIVariant aValue); */ NS_IMETHODIMP nsVariant::SetFromVariant(nsIVariant* aValue) { diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 76514ffa5e..ead823ad49 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -3192,7 +3192,6 @@ nsLocalFile::GetTarget(nsAString& aResult) } -/* attribute bool followLinks; */ NS_IMETHODIMP nsLocalFile::GetFollowLinks(bool* aFollowLinks) { @@ -3254,7 +3253,6 @@ nsLocalFile::SetPersistentDescriptor(const nsACString& aPersistentDescriptor) } } -/* attrib unsigned long fileAttributesWin; */ NS_IMETHODIMP nsLocalFile::GetFileAttributesWin(uint32_t* aAttribs) { diff --git a/xpcom/io/nsMultiplexInputStream.cpp b/xpcom/io/nsMultiplexInputStream.cpp index 5f730db8fb..5926458d49 100644 --- a/xpcom/io/nsMultiplexInputStream.cpp +++ b/xpcom/io/nsMultiplexInputStream.cpp @@ -133,7 +133,6 @@ nsMultiplexInputStream::nsMultiplexInputStream() { } -/* readonly attribute unsigned long count; */ NS_IMETHODIMP nsMultiplexInputStream::GetCount(uint32_t* aCount) { @@ -155,7 +154,6 @@ SeekableStreamAtBeginning(nsIInputStream* aStream) } #endif -/* void appendStream (in nsIInputStream stream); */ NS_IMETHODIMP nsMultiplexInputStream::AppendStream(nsIInputStream* aStream) { @@ -165,7 +163,6 @@ nsMultiplexInputStream::AppendStream(nsIInputStream* aStream) return mStreams.AppendElement(aStream) ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } -/* void insertStream (in nsIInputStream stream, in unsigned long index); */ NS_IMETHODIMP nsMultiplexInputStream::InsertStream(nsIInputStream* aStream, uint32_t aIndex) { @@ -180,7 +177,6 @@ nsMultiplexInputStream::InsertStream(nsIInputStream* aStream, uint32_t aIndex) return NS_OK; } -/* void removeStream (in unsigned long index); */ NS_IMETHODIMP nsMultiplexInputStream::RemoveStream(uint32_t aIndex) { @@ -195,7 +191,6 @@ nsMultiplexInputStream::RemoveStream(uint32_t aIndex) return NS_OK; } -/* nsIInputStream getStream (in unsigned long index); */ NS_IMETHODIMP nsMultiplexInputStream::GetStream(uint32_t aIndex, nsIInputStream** aResult) { @@ -209,7 +204,6 @@ nsMultiplexInputStream::GetStream(uint32_t aIndex, nsIInputStream** aResult) return NS_OK; } -/* void close (); */ NS_IMETHODIMP nsMultiplexInputStream::Close() { @@ -229,7 +223,6 @@ nsMultiplexInputStream::Close() return rv; } -/* unsigned long long available (); */ NS_IMETHODIMP nsMultiplexInputStream::Available(uint64_t* aResult) { @@ -254,7 +247,6 @@ nsMultiplexInputStream::Available(uint64_t* aResult) return NS_OK; } -/* [noscript] unsigned long read (in charPtr buf, in unsigned long count); */ NS_IMETHODIMP nsMultiplexInputStream::Read(char* aBuf, uint32_t aCount, uint32_t* aResult) { @@ -385,7 +377,6 @@ nsMultiplexInputStream::ReadSegCb(nsIInputStream* aIn, void* aClosure, return rv; } -/* readonly attribute boolean nonBlocking; */ NS_IMETHODIMP nsMultiplexInputStream::IsNonBlocking(bool* aNonBlocking) { @@ -415,7 +406,6 @@ nsMultiplexInputStream::IsNonBlocking(bool* aNonBlocking) return NS_OK; } -/* void seek (in int32_t whence, in int32_t offset); */ NS_IMETHODIMP nsMultiplexInputStream::Seek(int32_t aWhence, int64_t aOffset) { @@ -658,7 +648,6 @@ nsMultiplexInputStream::Seek(int32_t aWhence, int64_t aOffset) return NS_ERROR_NOT_IMPLEMENTED; } -/* uint32_t tell (); */ NS_IMETHODIMP nsMultiplexInputStream::Tell(int64_t* aResult) { @@ -690,7 +679,6 @@ nsMultiplexInputStream::Tell(int64_t* aResult) return NS_OK; } -/* void setEOF (); */ NS_IMETHODIMP nsMultiplexInputStream::SetEOF() { diff --git a/xpcom/io/nsScriptableBase64Encoder.cpp b/xpcom/io/nsScriptableBase64Encoder.cpp index 2b26e7726e..a8ffce8cd0 100644 --- a/xpcom/io/nsScriptableBase64Encoder.cpp +++ b/xpcom/io/nsScriptableBase64Encoder.cpp @@ -11,7 +11,6 @@ using namespace mozilla; NS_IMPL_ISUPPORTS(nsScriptableBase64Encoder, nsIScriptableBase64Encoder) -/* ACString encodeToCString (in nsIInputStream stream, in unsigned long length); */ NS_IMETHODIMP nsScriptableBase64Encoder::EncodeToCString(nsIInputStream* aStream, uint32_t aLength, @@ -20,7 +19,6 @@ nsScriptableBase64Encoder::EncodeToCString(nsIInputStream* aStream, return Base64EncodeInputStream(aStream, aResult, aLength); } -/* AString encodeToString (in nsIInputStream stream, in unsigned long length); */ NS_IMETHODIMP nsScriptableBase64Encoder::EncodeToString(nsIInputStream* aStream, uint32_t aLength, diff --git a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp index f59576b9a2..7e7564c775 100644 --- a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp +++ b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp @@ -600,7 +600,6 @@ xptiInterfaceEntry::GetInterfaceIsArgNumberForParam(uint16_t methodIndex, return NS_OK; } -/* bool isIID (in nsIIDPtr IID); */ nsresult xptiInterfaceEntry::IsIID(const nsIID * IID, bool *_retval) { @@ -609,7 +608,6 @@ xptiInterfaceEntry::IsIID(const nsIID * IID, bool *_retval) return NS_OK; } -/* void getNameShared ([shared, retval] out string name); */ nsresult xptiInterfaceEntry::GetNameShared(const char **name) { @@ -618,7 +616,6 @@ xptiInterfaceEntry::GetNameShared(const char **name) return NS_OK; } -/* void getIIDShared ([shared, retval] out nsIIDPtrShared iid); */ nsresult xptiInterfaceEntry::GetIIDShared(const nsIID * *iid) { @@ -627,7 +624,6 @@ xptiInterfaceEntry::GetIIDShared(const nsIID * *iid) return NS_OK; } -/* bool hasAncestor (in nsIIDPtr iid); */ nsresult xptiInterfaceEntry::HasAncestor(const nsIID * iid, bool *_retval) { diff --git a/xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp b/xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp index 044ef09aa6..44a14c982b 100644 --- a/xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp +++ b/xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp @@ -202,7 +202,6 @@ XPTInterfaceInfoManager::GetInterfaceEntryForIID(const nsIID *iid) return mWorkingSet.mIIDTable.Get(*iid); } -/* nsIInterfaceInfo getInfoForIID (in nsIIDPtr iid); */ NS_IMETHODIMP XPTInterfaceInfoManager::GetInfoForIID(const nsIID * iid, nsIInterfaceInfo **_retval) { @@ -214,7 +213,6 @@ XPTInterfaceInfoManager::GetInfoForIID(const nsIID * iid, nsIInterfaceInfo **_re return EntryToInfo(entry, _retval); } -/* nsIInterfaceInfo getInfoForName (in string name); */ NS_IMETHODIMP XPTInterfaceInfoManager::GetInfoForName(const char *name, nsIInterfaceInfo **_retval) { @@ -226,7 +224,6 @@ XPTInterfaceInfoManager::GetInfoForName(const char *name, nsIInterfaceInfo **_re return EntryToInfo(entry, _retval); } -/* nsIIDPtr getIIDForName (in string name); */ NS_IMETHODIMP XPTInterfaceInfoManager::GetIIDForName(const char *name, nsIID * *_retval) { @@ -243,7 +240,6 @@ XPTInterfaceInfoManager::GetIIDForName(const char *name, nsIID * *_retval) return entry->GetIID(_retval); } -/* string getNameForIID (in nsIIDPtr iid); */ NS_IMETHODIMP XPTInterfaceInfoManager::GetNameForIID(const nsIID * iid, char **_retval) { @@ -260,7 +256,6 @@ XPTInterfaceInfoManager::GetNameForIID(const nsIID * iid, char **_retval) return entry->GetName(_retval); } -/* nsIEnumerator enumerateInterfaces (); */ void XPTInterfaceInfoManager::GetScriptableInterfaces(nsCOMArray& aInterfaces) { @@ -280,7 +275,6 @@ XPTInterfaceInfoManager::GetScriptableInterfaces(nsCOMArray& a } } -/* nsIEnumerator enumerateInterfacesWhoseNamesStartWith (in string prefix); */ NS_IMETHODIMP XPTInterfaceInfoManager::EnumerateInterfacesWhoseNamesStartWith(const char *prefix, nsIEnumerator **_retval) { @@ -305,7 +299,6 @@ XPTInterfaceInfoManager::EnumerateInterfacesWhoseNamesStartWith(const char *pref return array->Enumerate(_retval); } -/* void autoRegisterInterfaces (); */ NS_IMETHODIMP XPTInterfaceInfoManager::AutoRegisterInterfaces() { diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index 7c51e30da8..6afbfd3191 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -193,7 +193,6 @@ struct IntervalComparator } // namespace -/* void Run(); */ NS_IMETHODIMP TimerThread::Run() { @@ -506,7 +505,6 @@ TimerThread::DoAfterSleep() } -/* void observe (in nsISupports aSubject, in string aTopic, in wstring aData); */ NS_IMETHODIMP TimerThread::Observe(nsISupports* /* aSubject */, const char* aTopic, const char16_t* /* aData */) diff --git a/xpfe/components/windowds/nsWindowDataSource.cpp b/xpfe/components/windowds/nsWindowDataSource.cpp index 85287297fb..519b7089f8 100644 --- a/xpfe/components/windowds/nsWindowDataSource.cpp +++ b/xpfe/components/windowds/nsWindowDataSource.cpp @@ -119,7 +119,6 @@ NS_INTERFACE_MAP_END // handle notifications from the window mediator and reflect them into // RDF -/* void onWindowTitleChange (in nsIXULWindow window, in wstring newTitle); */ NS_IMETHODIMP nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window, const char16_t *newTitle) @@ -162,7 +161,6 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window, return NS_OK; } -/* void onOpenWindow (in nsIXULWindow window); */ NS_IMETHODIMP nsWindowDataSource::OnOpenWindow(nsIXULWindow *window) { @@ -181,7 +179,6 @@ nsWindowDataSource::OnOpenWindow(nsIXULWindow *window) return NS_OK; } -/* void onCloseWindow (in nsIXULWindow window); */ NS_IMETHODIMP nsWindowDataSource::OnCloseWindow(nsIXULWindow *window) { @@ -327,7 +324,6 @@ nsWindowDataSource::GetWindowForResource(const char *aResourceString, // GetTarget() - need to handle kNC_KeyIndex -/* readonly attribute string URI; */ NS_IMETHODIMP nsWindowDataSource::GetURI(char * *aURI) { NS_ENSURE_ARG_POINTER(aURI); @@ -340,7 +336,6 @@ NS_IMETHODIMP nsWindowDataSource::GetURI(char * *aURI) return NS_OK; } -/* nsIRDFNode GetTarget (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */ NS_IMETHODIMP nsWindowDataSource::GetTarget(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsIRDFNode **_retval) { NS_ENSURE_ARG_POINTER(_retval); @@ -371,7 +366,6 @@ NS_IMETHODIMP nsWindowDataSource::GetTarget(nsIRDFResource *aSource, nsIRDFResou return mInner->GetTarget(aSource, aProperty, aTruthValue, _retval); } -/* nsIRDFResource GetSource (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ NS_IMETHODIMP nsWindowDataSource::GetSource(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsIRDFResource **_retval) { if (mInner) @@ -379,7 +373,6 @@ NS_IMETHODIMP nsWindowDataSource::GetSource(nsIRDFResource *aProperty, nsIRDFNod return NS_OK; } -/* nsISimpleEnumerator GetSources (in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ NS_IMETHODIMP nsWindowDataSource::GetSources(nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, nsISimpleEnumerator **_retval) { if (mInner) @@ -387,7 +380,6 @@ NS_IMETHODIMP nsWindowDataSource::GetSources(nsIRDFResource *aProperty, nsIRDFNo return NS_OK; } -/* nsISimpleEnumerator GetTargets (in nsIRDFResource aSource, in nsIRDFResource aProperty, in boolean aTruthValue); */ NS_IMETHODIMP nsWindowDataSource::GetTargets(nsIRDFResource *aSource, nsIRDFResource *aProperty, bool aTruthValue, nsISimpleEnumerator **_retval) { if (mInner) @@ -395,7 +387,6 @@ NS_IMETHODIMP nsWindowDataSource::GetTargets(nsIRDFResource *aSource, nsIRDFReso return NS_OK; } -/* void Assert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ NS_IMETHODIMP nsWindowDataSource::Assert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue) { if (mInner) @@ -403,7 +394,6 @@ NS_IMETHODIMP nsWindowDataSource::Assert(nsIRDFResource *aSource, nsIRDFResource return NS_OK; } -/* void Unassert (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */ NS_IMETHODIMP nsWindowDataSource::Unassert(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { if (mInner) @@ -411,7 +401,6 @@ NS_IMETHODIMP nsWindowDataSource::Unassert(nsIRDFResource *aSource, nsIRDFResour return NS_OK; } -/* void Change (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aOldTarget, in nsIRDFNode aNewTarget); */ NS_IMETHODIMP nsWindowDataSource::Change(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget) { if (mInner) @@ -419,7 +408,6 @@ NS_IMETHODIMP nsWindowDataSource::Change(nsIRDFResource *aSource, nsIRDFResource return NS_OK; } -/* void Move (in nsIRDFResource aOldSource, in nsIRDFResource aNewSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */ NS_IMETHODIMP nsWindowDataSource::Move(nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { if (mInner) @@ -427,7 +415,6 @@ NS_IMETHODIMP nsWindowDataSource::Move(nsIRDFResource *aOldSource, nsIRDFResourc return NS_OK; } -/* boolean HasAssertion (in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget, in boolean aTruthValue); */ NS_IMETHODIMP nsWindowDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget, bool aTruthValue, bool *_retval) { if (mInner) @@ -435,7 +422,6 @@ NS_IMETHODIMP nsWindowDataSource::HasAssertion(nsIRDFResource *aSource, nsIRDFRe return NS_OK; } -/* void AddObserver (in nsIRDFObserver aObserver); */ NS_IMETHODIMP nsWindowDataSource::AddObserver(nsIRDFObserver *aObserver) { if (mInner) @@ -443,7 +429,6 @@ NS_IMETHODIMP nsWindowDataSource::AddObserver(nsIRDFObserver *aObserver) return NS_OK; } -/* void RemoveObserver (in nsIRDFObserver aObserver); */ NS_IMETHODIMP nsWindowDataSource::RemoveObserver(nsIRDFObserver *aObserver) { if (mInner) @@ -451,7 +436,6 @@ NS_IMETHODIMP nsWindowDataSource::RemoveObserver(nsIRDFObserver *aObserver) return NS_OK; } -/* nsISimpleEnumerator ArcLabelsIn (in nsIRDFNode aNode); */ NS_IMETHODIMP nsWindowDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval) { if (mInner) @@ -459,7 +443,6 @@ NS_IMETHODIMP nsWindowDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumer return NS_OK; } -/* nsISimpleEnumerator ArcLabelsOut (in nsIRDFResource aSource); */ NS_IMETHODIMP nsWindowDataSource::ArcLabelsOut(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) { if (mInner) @@ -467,7 +450,6 @@ NS_IMETHODIMP nsWindowDataSource::ArcLabelsOut(nsIRDFResource *aSource, nsISimpl return NS_OK; } -/* nsISimpleEnumerator GetAllResources (); */ NS_IMETHODIMP nsWindowDataSource::GetAllResources(nsISimpleEnumerator **_retval) { if (mInner) @@ -475,7 +457,6 @@ NS_IMETHODIMP nsWindowDataSource::GetAllResources(nsISimpleEnumerator **_retval) return NS_OK; } -/* boolean IsCommandEnabled (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */ NS_IMETHODIMP nsWindowDataSource::IsCommandEnabled(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments, bool *_retval) { if (mInner) @@ -483,7 +464,6 @@ NS_IMETHODIMP nsWindowDataSource::IsCommandEnabled(nsISupportsArray *aSources, n return NS_OK; } -/* void DoCommand (in nsISupportsArray aSources, in nsIRDFResource aCommand, in nsISupportsArray aArguments); */ NS_IMETHODIMP nsWindowDataSource::DoCommand(nsISupportsArray *aSources, nsIRDFResource *aCommand, nsISupportsArray *aArguments) { if (mInner) @@ -491,7 +471,6 @@ NS_IMETHODIMP nsWindowDataSource::DoCommand(nsISupportsArray *aSources, nsIRDFRe return NS_OK; } -/* nsISimpleEnumerator GetAllCmds (in nsIRDFResource aSource); */ NS_IMETHODIMP nsWindowDataSource::GetAllCmds(nsIRDFResource *aSource, nsISimpleEnumerator **_retval) { if (mInner) @@ -499,7 +478,6 @@ NS_IMETHODIMP nsWindowDataSource::GetAllCmds(nsIRDFResource *aSource, nsISimpleE return NS_OK; } -/* boolean hasArcIn (in nsIRDFNode aNode, in nsIRDFResource aArc); */ NS_IMETHODIMP nsWindowDataSource::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, bool *_retval) { if (mInner) @@ -507,7 +485,6 @@ NS_IMETHODIMP nsWindowDataSource::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aA return NS_OK; } -/* boolean hasArcOut (in nsIRDFResource aSource, in nsIRDFResource aArc); */ NS_IMETHODIMP nsWindowDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, bool *_retval) { if (mInner) @@ -515,7 +492,6 @@ NS_IMETHODIMP nsWindowDataSource::HasArcOut(nsIRDFResource *aSource, nsIRDFResou return NS_OK; } -/* void beginUpdateBatch (); */ NS_IMETHODIMP nsWindowDataSource::BeginUpdateBatch() { if (mInner) @@ -523,7 +499,6 @@ NS_IMETHODIMP nsWindowDataSource::BeginUpdateBatch() return NS_OK; } -/* void endUpdateBatch (); */ NS_IMETHODIMP nsWindowDataSource::EndUpdateBatch() { if (mInner)