Bug 27904 - notImplemented() is too subtle
Summary: notImplemented() is too subtle
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-31 17:16 PDT by Jeremy Orlow
Modified: 2009-08-11 10:22 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2009-07-31 17:16:50 PDT
I was just debugging a problem and found out that notImplemented() was being called but I had never noticed.  I looked at the source code, and this is all it does:

#define notImplemented() do { \
        static bool havePrinted = false; \
        if (!havePrinted && !supressNotImplementedWarning()) { \
            WTFLogVerbose(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, &::WebCore::LogNotYetImplemented, "UNIMPLEMENTED: "); \
            havePrinted = true; \
        } \
    } while (0)

I'm wondering why this doesn't do something more obvious.  Isn't hitting not-implemented code kind of a big deal?  Shouldn't we do an assert so that someone who's debugging sees it?

If we want to fix this, feel free to assign to me and I can take care of it.
Comment 1 Sam Weinig 2009-07-31 17:21:59 PDT
I don't think we want to change this.  notImplemented is helpful for bringing up a port, and asserting all over the place would not be useful in those circumstances.
Comment 2 Jeremy Orlow 2009-07-31 17:29:14 PDT
We could make the behavior port specific.  When ports are mature, they can opt-into it being an assert.
Comment 3 Alexey Proskuryakov 2009-08-11 10:22:20 PDT
My understanding is that even ports that are quite mature still hit notImplemented() fairly often - in particular, on notification calls for Web Inspector and such.