Bug 48847

Summary: More NPRuntime work
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch aroben: review+

Description Anders Carlsson 2010-11-02 10:02:09 PDT
More NPRuntime work
Comment 1 Anders Carlsson 2010-11-02 10:09:53 PDT
Created attachment 72694 [details]
Patch
Comment 2 Adam Roben (:aroben) 2010-11-02 10:18:54 PDT
Comment on attachment 72694 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72694&action=review

> WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp:54
>  NPObjectMessageReceiver::~NPObjectMessageReceiver()
>  {
> +    m_npRemoteObjectMap->unregisterNPObject(m_npObjectID);
> +

What guarantees the map hasn't been destroyed by this point?

> WebKit2/Shared/Plugins/NPVariantData.cpp:46
> +NPVariantData NPVariantData::makeVoid()
>  {
> -    notImplemented();
> -    return false;
> +    NPVariantData npVariantData;
> +
> +    return npVariantData;
> +}

How about: return NPVariantData();
Comment 3 Anders Carlsson 2010-11-02 10:20:21 PDT
(In reply to comment #2)
> (From update of attachment 72694 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72694&action=review
> 
> > WebKit2/Shared/Plugins/NPObjectMessageReceiver.cpp:54
> >  NPObjectMessageReceiver::~NPObjectMessageReceiver()
> >  {
> > +    m_npRemoteObjectMap->unregisterNPObject(m_npObjectID);
> > +
> 
> What guarantees the map hasn't been destroyed by this point?

Nothing! I'll add a FIXME.

> 
> > WebKit2/Shared/Plugins/NPVariantData.cpp:46
> > +NPVariantData NPVariantData::makeVoid()
> >  {
> > -    notImplemented();
> > -    return false;
> > +    NPVariantData npVariantData;
> > +
> > +    return npVariantData;
> > +}
> 
> How about: return NPVariantData();

Sure.
Comment 4 Anders Carlsson 2010-11-02 10:26:52 PDT
Committed r71127: <http://trac.webkit.org/changeset/71127>