Silly code checks for if (interfaceName) instead of if (instanceName)

VERIFIED FIXED

Status

()

Core
Embedding: APIs
--
critical
VERIFIED FIXED
16 years ago
16 years ago

People

(Reporter: timeless, Assigned: Adam Lock)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
nsCOMPtr<nsIClipboardCommands> clipCmds = do_GetInterface(webBrowser);
    if (nsIClipboardCommands) // <- should be clipCmds
    {
        clipCmds->CanCutSelection(&canCutSelection);
        clipCmds->CanCopySelection(&canCopySelection);
        clipCmds->CanPaste(&canPaste);
    }

nsDebug::Assertion(const char * 0x0040fbcc `string', const char * 0x0040fc10 
`string', const char * 0x0040fc20 `string', int 650) line 290 + 13 bytes
nsDebug::PreCondition(const char * 0x0040fbcc `string', const char * 0x0040fc10 
`string', const char * 0x0040fc20 `string', int 650) line 434 + 21 bytes
          NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr 
with operator->().");
nsCOMPtr<nsIClipboardCommands>::operator->() line 650 + 34 bytes
UpdateUI(nsIWebBrowserChrome * 0x01c48890) line 538 + 12 bytes
BrowserDlgProc(HWND__ * 0x00a507a8, unsigned int 278, unsigned int 587009491, 
long 0) line 608 + 9 bytes

g++ doens't seem to like if (className) so my guess is that we won't find this 
in xp code, but i think i'll try a lxr search to see if it occurs elsewhere...
Comment on attachment 65843 [details] [diff] [review]
patch for timeless

r=bzbarsky
Attachment #65843 - Flags: review+
Comment on attachment 65843 [details] [diff] [review]
patch for timeless

sr=brendan@mozilla.org, and go ahead and check in, a=brendan@mozilla.org too.

/be
Attachment #65843 - Flags: superreview+
Keywords: mozilla0.9.8+
Why didn't hyatt check this in months ago?  I reviewed it when hyatt was testing
building with VC++ 7.0, which also doesn't accept this.  Or was this a copy of
the code elsewhere that wasn't in the build then?
(Reporter)

Comment 5

16 years ago
the code i modified was dated 12/../2000. afaik winEmbed is usually in the 
build system, it's present in both my debug and nondebug builds.
Checked in
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Updated

16 years ago
QA Contact: mdunn → depstein

Comment 7

16 years ago
verified fix is in winEmbed, mozilla 0.9.7 Gecko 20020122 build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.