Closed Bug 250666 Opened 21 years ago Closed 21 years ago

Implement the npruntime plugin scriptability API

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha2

People

(Reporter: jst, Assigned: jst)

References

()

Details

(Keywords: fixed-aviary1.0, fixed1.7.5)

Attachments

(1 file)

The URL says it all, I've got an implementation that I'm about to attach.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8alpha2
Attachment #152726 - Flags: superreview?(brendan)
Attachment #152726 - Flags: review?(brendan)
Summary: Implment the npruntime plugin scriptability API → Implement the npruntime plugin scriptability API
Comment on attachment 152726 [details] [diff] [review] Implement the npruntime plugin scriptability API Stuff I already gave to jst over IRC (sans my own misreadings): nptypes.h too Win16-based: long for int32 should be exception, not rule? int is most commonly 32 bits now Missing breaks in NPVariantToJSVal String and Object cases Canonicalize int32 stored in double to avoid 2.0 != 2 in NPVariantToJSVal, using JS_NewNumberValue in the NPVariantType_Double case else after return in GetProperty return ok == JS_TRUE; => return ok; in nsJSObjWrapper::NP_Invoke return ok && found == JSVAL_TRUE; => return ok && !JSVAL_IS_VOID(found); in nsJSObjWrapper::NP_HasProperty assert that id is int if not string in all the hooks that take an id arg r+sr=me with these fixes. I reviewed quickly (food poisoning), but it looks good to go. /be
Attachment #152726 - Flags: superreview?(brendan)
Attachment #152726 - Flags: superreview+
Attachment #152726 - Flags: review?(brendan)
Attachment #152726 - Flags: review+
Comment on attachment 152726 [details] [diff] [review] Implement the npruntime plugin scriptability API Nit: JSObjNPPHashEntry seems unused. Idea: A GC root per nsJSObjWrapper/JSObjWrapperHashEntry makes for a separately new/delete'd objct (nsJSObjWrapper), the sJSObjWrappers double-hashtable entry, and the GC roots double-hashtable entry. You could get rid of the last by marking each obj reached from the next-to-last, using a GCCallback for JSGC_MARK_END. /be
Attachment #152726 - Flags: approval1.8a2?
Comment on attachment 152726 [details] [diff] [review] Implement the npruntime plugin scriptability API a=asa (on behalf of drivers) for checkin to 1.8a2.
Attachment #152726 - Flags: approval1.8a2? → approval1.8a2+
Nominating for firefox 1.0, hopefully this will be a popular release and it would certainly help adoption for this new API if it's supported in 1.0. Not sure how much testing it will need though.
Flags: blocking-aviary1.0RC1?
Flags: blocking-aviary1.0?
Blocks: 251151
Ok, after a long day of build bustage across the board thanks to C99, this is checked in on the trunk. Brendan, I chose to not start changing how we control the lifetime of JSObjects here for the initial landing, I filed bug 251149 on tracking that. Marking this FIXED.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
The change at line 1520 in ns4xPluginInstance.cpp was not correct: PR_BEGIN_EXTERN_C void _releaseobject(NPObject *obj); PR_END_EXTERN_C In ns4xPlugin.h, _releaseobject as defined as NP_EXPORT and you can't add NP_EXPORT to the statement in ns4xPluginInstance.h, since it is defined in ns4xPlugin.h. ns4xPluginInstance.cpp should be including ns4xPlugin.h, not definining a custom reference for _releaseobject.
Duh, yeah, leftover cruft from hacking. Fixed.
Keywords: fixed-aviary1.0
Flags: blocking-aviary1.0PR?
Flags: blocking-aviary1.0?
Keywords: fixed1.7.5
Anyone know if there's a plugin sdk with updated versions of np_entry.cpp, npn_gate.cpp, npp_gate.cpp for the new npruntime stuff (or plans in the works to do this)?
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: