Closed Bug 121003 Opened 24 years ago Closed 24 years ago

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

Categories

(Core Graveyard :: Embedding: APIs, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: timeless, Assigned: adamlock)

References

()

Details

Attachments

(1 file)

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+
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?
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
Closed: 24 years ago
Resolution: --- → FIXED
QA Contact: mdunn → depstein
verified fix is in winEmbed, mozilla 0.9.7 Gecko 20020122 build.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: