superreview granted: [Bug 253570] Add NPP arguments to some of the new NPP_ npruntime functions : [Attachment 154668] Add NPP arguments, and make use of them. Also add initial support for exception t

Brendan Eich <brendan@mozilla.org> has granted Johnny Stenback
<jst@mozilla.jstenback.com>'s request for superreview:
Bug 253570: Add NPP arguments to some of the new NPP_ npruntime functions
http://bugzilla.mozilla.org/show_bug.cgi?id=253570

Attachment 154668: Add NPP arguments, and make use of them. Also add initial
support for exception throwing from plugins.
http://bugzilla.mozilla.org/attachment.cgi?id=154668&action=edit

------- Additional Comments from Brendan Eich <brendan@mozilla.org>
>+void
>+PopException()
>+{
>+  NS_ASSERTION(!gNPPException, "Uh, no NPP exception to pop!");
>+
>+  if (gNPPException) {
>+    free(gNPPException);

Doncha wanna null gNPPException after the free?

>+++ modules/plugin/base/src/ns4xPluginInstance.h	29 Jul 2004 17:31:54
-0000
>@@ -157,18 +157,24 @@ public:
>     virtual ~ns4xPluginInstance(void);
> 
>     // returns the state of mStarted
>     PRBool IsStarted(void);
> 
>     // cache this 4.x plugin like an XPCOM plugin
>     nsresult SetCached(PRBool aCache) { mCached = aCache; return NS_OK; };
> 
>     virtual JSObject *GetJSObject(JSContext *cx);
>+
>+    // Non-refcounting accessor for faster access to the peer...
>+    nsIPluginInstancePeer *GetPeer()
>+    {
>+	  return mPeer;
>+    }

If mPeer must be non-null for any fully-constructed instance of
ns4xPluginInstance on which GetPeer might be called, use the new
deCOMtamination name scheme: Peer(), no Get prefix.

> static JSContext *
> GetJSContext(NPP npp)
> {
>+  NS_ENSURE_TRUE(npp, nsnull);
>+
>   ns4xPluginInstance *inst = (ns4xPluginInstance *)npp->ndata;
>   NS_ENSURE_TRUE(inst, nsnull);
> 
>-  nsCOMPtr<nsIPluginInstancePeer> pip;
>-  inst->GetPeer(getter_AddRefs(pip));
>-  nsCOMPtr<nsPIPluginInstancePeer> pp (do_QueryInterface(pip));
>+  nsCOMPtr<nsPIPluginInstancePeer> pp(do_QueryInterface(inst->GetPeer()));

Aha, no null check!  So inst->Peer() wins.

>-  return GetProperty(npjsobj->mCx, npjsobj->mJSObj, identifier, &v) &&
>-    JSValToNPVariant(npjsobj->mNpp, npjsobj->mCx, v, result);
>+  return GetProperty(cx, npjsobj->mJSObj, identifier, &v) &&
>+    JSValToNPVariant(npp, cx, v, result);

Nit: multiline return value always looks more readable to me if the overflow
lines are indented to line up with the return expression's first char.

> PR_STATIC_CALLBACK(PRBool)
>-NPObjWrapperHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry,

>+JSObjWrapperHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry,

>			     const void *key)
> {
>+  const nsJSObjWrapperKey *ke = NS_STATIC_CAST(const nsJSObjWrapperKey *,
key);

The name |ke| confuses me -- how about |owk| or something longer for
obj-wrapper-key?

Looks good generally, r+sr=me with nits picked.

/be
0
bugzilla
7/29/2004 9:30:52 PM
netscape.mozilla.reviewers 29156 articles. 0 followers. Follow

0 Replies
950 Views

Similar Articles

[PageSpeed] 59
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

superreview requested: [Bug 253570] Add NPP arguments to some of the new NPP_ npruntime functions : [Attachment 154668] Add NPP arguments, and make use of them. Also add initial support for exception
Johnny Stenback <jst@mozilla.jstenback.com> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 253570: Add NPP arguments to some of the new NPP_ npruntime functions http://bugzilla.mozilla.org/show_bug.cgi?id=253570 Attachment 154668: Add NPP arguments, and make use of them. Also add initial support for exception throwing from plugins. http://bugzilla.mozilla.org/attachment.cgi?id=154668&action=edit ...

superreview granted: [Bug 256944] Add NPClass argument to NPAllocateFunctionPtr : [Attachment 157030] Add NPClass argument to NPAllocateFunctionPtr.
Brendan Eich <brendan@mozilla.org> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 256944: Add NPClass argument to NPAllocateFunctionPtr http://bugzilla.mozilla.org/show_bug.cgi?id=256944 Attachment 157030: Add NPClass argument to NPAllocateFunctionPtr. http://bugzilla.mozilla.org/attachment.cgi?id=157030&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> r+sr=brendan@mozilla.org. /be ...

superreview requested: [Bug 256944] Add NPClass argument to NPAllocateFunctionPtr : [Attachment 157030] Add NPClass argument to NPAllocateFunctionPtr.
Johnny Stenback <jst@mozilla.jstenback.com> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 256944: Add NPClass argument to NPAllocateFunctionPtr http://bugzilla.mozilla.org/show_bug.cgi?id=256944 Attachment 157030: Add NPClass argument to NPAllocateFunctionPtr. http://bugzilla.mozilla.org/attachment.cgi?id=157030&action=edit ...

superreview granted: [Bug 298957] PK11_TokenKeyGen shuld add CKA_UNWRAP and CKA_WRAP attributes to object template : [Attachment 187534] Add new function PK11_TokenKeyGenWithFlags
Nelson Bolyard <nelson@bolyard.com> has granted Wan-Teh Chang <wtchang@redhat.com>'s request for superreview: Bug 298957: PK11_TokenKeyGen shuld add CKA_UNWRAP and CKA_WRAP attributes to object template https://bugzilla.mozilla.org/show_bug.cgi?id=298957 Attachment 187534: Add new function PK11_TokenKeyGenWithFlags https://bugzilla.mozilla.org/attachment.cgi?id=187534&action=edit ------- Additional Comments from Nelson Bolyard <nelson@bolyard.com> Looks right to me. ...

superreview requested: [Bug 298957] Need to add CKA_UNWRAP and CKA_WRAP attributes to PK11_TokenKeyGen function : [Attachment 187534] Add new function PK11_TokenKeyGenWithFlags
Wan-Teh Chang <wtchang@redhat.com> has asked Nelson Bolyard <nelson@bolyard.com> for superreview: Bug 298957: Need to add CKA_UNWRAP and CKA_WRAP attributes to PK11_TokenKeyGen function https://bugzilla.mozilla.org/show_bug.cgi?id=298957 Attachment 187534: Add new function PK11_TokenKeyGenWithFlags https://bugzilla.mozilla.org/attachment.cgi?id=187534&action=edit ------- Additional Comments from Wan-Teh Chang <wtchang@redhat.com> This patch adds a new function PK11_TokenKeyGenWithFlags, with has one more parameter (CF_FLAGS flags) than the existing PK11_Toke...

superreview granted: [Bug 246115] Add support for launching calendar to xremote : [Attachment 173764] Proposed fix to add calendar support to remote (Ver 2)
Mike Shaver <shaver@mozilla.org> has granted Mike Shaver <shaver@mozilla.org>'s request for superreview: Bug 246115: Add support for launching calendar to xremote https://bugzilla.mozilla.org/show_bug.cgi?id=246115 Attachment 173764: Proposed fix to add calendar support to remote (Ver 2) https://bugzilla.mozilla.org/attachment.cgi?id=173764&action=edit ------- Additional Comments from Mike Shaver <shaver@mozilla.org> r+sr=shaver, thanks! ...

superreview granted: [Bug 243484] Add PRUint32 length out param to ToNewUTF8String() and UTF8ToNewUnicode() : [Attachment 148393] Use default arguments, no more inlines
Darin Fisher (IBM) <darin@meer.net> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 243484: Add PRUint32 length out param to ToNewUTF8String() and UTF8ToNewUnicode() http://bugzilla.mozilla.org/show_bug.cgi?id=243484 Attachment 148393: Use default arguments, no more inlines http://bugzilla.mozilla.org/attachment.cgi?id=148393&action=edit ...

superreview granted: [Bug 240597] Add support for CP869 : [Attachment 146190] Add 869 for OS/2 only
Michael Kaply (IBM) <mkaply@us.ibm.com> has granted Michael Kaply (IBM) <mkaply@us.ibm.com>'s request for superreview: Bug 240597: Add support for CP869 http://bugzilla.mozilla.org/show_bug.cgi?id=240597 Attachment 146190: Add 869 for OS/2 only http://bugzilla.mozilla.org/attachment.cgi?id=146190&action=edit ------- Additional Comments from Michael Kaply (IBM) <mkaply@us.ibm.com> r=pedemont, sr=blizzard (platform specific) a=mkaply (OS/2 only) We need this to complete our new codepage support. ...

superreview granted: [Bug 198168] LDAP v3 isn't supported... : [Attachment 141127] patch to add and use a .protocolVersion preference, v1
Scott MacGregor <mscott@mozilla.org> has granted Scott MacGregor <mscott@mozilla.org>'s request for superreview: Bug 198168: LDAP v3 isn't supported... http://bugzilla.mozilla.org/show_bug.cgi?id=198168 Attachment 141127: patch to add and use a .protocolVersion preference, v1 http://bugzilla.mozilla.org/attachment.cgi?id=141127&action=edit ------- Additional Comments from Scott MacGregor <mscott@mozilla.org> r/sr=sspitzer on just the ldap changes, with some nits suggested to dmose over aim. the x-image-url stuff is not part of this fix. ...

superreview granted: [Bug 252067] Add support for translucent windows for Win32 (Windows 2000 and later) : [Attachment 154014] step 1 of 2. New functionality only
Robert O'Callahan <roc@ocallahan.org> has granted Dainis Jonitis <Dainis_Jonitis@swh-t.lv>'s request for superreview: Bug 252067: Add support for translucent windows for Win32 (Windows 2000 and later) http://bugzilla.mozilla.org/show_bug.cgi?id=252067 Attachment 154014: step 1 of 2. New functionality only http://bugzilla.mozilla.org/attachment.cgi?id=154014&action=edit ...

superreview granted: [Bug 174164] enhancements to xremoteservice (add adressbook) : [Attachment 102701] adds support for xfeDoCommand(openAddressBook)
Dan Mosedale <dmose@mozilla.org> has granted Andrew Schultz <ajschult@eos.ncsu.edu>'s request for superreview: Bug 174164: enhancements to xremoteservice (add adressbook) http://bugzilla.mozilla.org/show_bug.cgi?id=174164 Attachment 102701: adds support for xfeDoCommand(openAddressBook) http://bugzilla.mozilla.org/attachment.cgi?id=102701&action=edit ------- Additional Comments from Dan Mosedale <dmose@mozilla.org> Just a few minor nits: >diff -uBwr src.old/XRemoteService.cpp src/XRemoteService.cpp >--- xpfe/components/xremote/src/XRemoteService...

superreview granted: [Bug 245274] Make quirks mode not validate createElement's tagName argument to preserve 1.4 compat : [Attachment 149775] Adds quirks check
Johnny Stenback <jst@mozilla.jstenback.com> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 245274: Make quirks mode not validate createElement's tagName argument to preserve 1.4 compat http://bugzilla.mozilla.org/show_bug.cgi?id=245274 Attachment 149775: Adds quirks check http://bugzilla.mozilla.org/attachment.cgi?id=149775&action=edit ------- Additional Comments from Johnny Stenback <jst@mozilla.jstenback.com> r+sr=jst for this change to get back backwards compatibility. ...

superreview granted: [Bug 208121] Some String properties of a Java object are read as 'null' by Javascript : [Attachment 137276] new patch addressed review comments, also add some null pointer check
Brendan Eich <brendan@mozilla.org> has granted Kyle Yuan <kyle.yuan@sun.com>'s request for superreview: Bug 208121: Some String properties of a Java object are read as 'null' by Javascript http://bugzilla.mozilla.org/show_bug.cgi?id=208121 Attachment 137276: new patch addressed review comments, also add some null pointer checking http://bugzilla.mozilla.org/attachment.cgi?id=137276&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> How about a followup bug to add an Init method and move fallible code from the ctor to...

superreview granted: [Bug 245297] Add style system support for CSS column properties : [Attachment 149802] add nsStyleColumn and related machinery
David Baron <dbaron@dbaron.org> has granted Robert O'Callahan <roc@ocallahan.org>'s request for superreview: Bug 245297: Add style system support for CSS column properties http://bugzilla.mozilla.org/show_bug.cgi?id=245297 Attachment 149802: add nsStyleColumn and related machinery http://bugzilla.mozilla.org/attachment.cgi?id=149802&action=edit ...

Web resources about - superreview granted: [Bug 253570] Add NPP arguments to some of the new NPP_ npruntime functions : [Attachment 154668] Add NPP arguments, and make use of them. Also add initial support for exception t - netscape.mozilla.reviewers

Biz & Finance Magazines
Australian magazine subscriptions price comparison.

Ehsan Akhgari
Bugzilla is an essential tool to the working process of Mozilla, and many of us spend a good portion of their day in Bugzilla. The Bugzilla Tweaks ...

Resources last updated: 1/15/2016 10:19:18 AM