Bug 1441205 - XPTMethodDescriptor::result is unused. r=njn

This sounds weird, but either:
1) A method is notxpcom, so it can't be called from script and the XPT
information is unused.
2) A method is not notxpcom, in which case the result type is nsresult.

MozReview-Commit-ID: a7SRJn8PlP

--HG--
extra : rebase_source : 457051a47dd3f1f2f49b5f11ef3e5138f9d814e1
This commit is contained in:
Andrew McCreight 2018-02-26 08:49:19 -08:00
parent 258bda4dae
commit 2820521bfb
3 changed files with 7 additions and 4 deletions

View File

@ -198,8 +198,6 @@ public:
NS_PRECONDITION(idx < GetParamCount(),"bad arg");
return params[idx];
}
const nsXPTParamInfo GetResult() const
{return result;}
private:
nsXPTMethodInfo(); // no implementation
// NO DATA - this a flyweight wrapper

View File

@ -316,7 +316,12 @@ DoMethodDescriptor(XPTArena *arena, NotNull<XPTCursor*> cursor,
return false;
}
if (!DoParamDescriptor(arena, cursor, &md->result, id))
// |result| appears in the on-disk format but it isn't used,
// because a method is either notxpcom, in which case it can't be
// called from script so the XPT information is irrelevant, or the
// result type is nsresult.
XPTParamDescriptor result;
if (!DoParamDescriptor(arena, cursor, &result, id))
return false;
return true;

View File

@ -286,7 +286,7 @@ struct XPTParamDescriptor {
struct XPTMethodDescriptor {
char *name;
XPTParamDescriptor *params;
XPTParamDescriptor result;
//XPTParamDescriptor result; // Present on disk, omitted here.
uint8_t flags;
uint8_t num_args;
};