From: Benjamin Smedberg <benjamin@smedbergs.us>
Date: Tue, 2 Aug 2011 15:51:02 -0700
Subject: Bug 655098 - Root the jsid stored in
 NPObjectMemberPrivate.methodName, r=cdleary,mrbkap a=LegNeato

---
 modules/plugin/base/src/nsJSNPRuntime.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/plugin/base/src/nsJSNPRuntime.cpp b/modules/plugin/base/src/nsJSNPRuntime.cpp
index 377b68d..93427e7 100644
--- a/modules/plugin/base/src/nsJSNPRuntime.cpp
+++ b/modules/plugin/base/src/nsJSNPRuntime.cpp
@@ -2176,6 +2176,11 @@ NPObjectMember_Mark(JSContext *cx, JSObject *obj, void *arg)
                      "NPObject Member => fieldValue", arg);
   }
 
+  if (!JSVAL_IS_PRIMITIVE(memberPrivate->methodName)) {
+    ::JS_MarkGCThing(cx, JSVAL_TO_OBJECT(memberPrivate->methodName),
+                     "NPObject Member => methodName", arg);
+  }
+
   // There's no strong reference from our private data to the
   // NPObject, so make sure to mark the NPObject wrapper to keep the
   // NPObject alive as long as this NPObjectMember is alive.
