Bug 27904

Summary: notImplemented() is too subtle
Product: WebKit Reporter: Jeremy Orlow <jorlow>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

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.