Closed Bug 1143651 Opened 6 years ago Closed 5 years ago

don't use CallQueryInterface when the compiler can do the cast for us

Categories

(Core :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

No description provided.
This is all older code, so the performance gain is not huge, but still.
Attachment #8578009 - Flags: review?(ehsan)
Comment on attachment 8578009 [details] [diff] [review]
don't use CallQueryInterface when the compiler can do the cast for us

Review of attachment 8578009 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/xbl/nsXBLContentSink.cpp
@@ -39,5 @@
>    NS_ENSURE_ARG_POINTER(aResult);
>  
> -  nsXBLContentSink* it = new nsXBLContentSink();
> -
> -  nsCOMPtr<nsIXMLContentSink> kungFuDeathGrip = it;

This code is laughable!
Attachment #8578009 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/73d9939c6095
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.