[JAEGER] Bug 585801 trial fix: innerize object passed as scope chain for JS evaluation
authorDavid Mandelin <dmandelin@mozilla.com>
Mon, 09 Aug 2010 18:29:34 -0700
changeset 53358 688ca6c81137c6972b5a7f172394c7b4d332e93d
parent 53357 167dfe95695e9535eec893e58426530613f365b8
child 53359 4546e4c7427c70da01c007324a779cdce8a37da6
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs585801
milestone2.0b4pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
[JAEGER] Bug 585801 trial fix: innerize object passed as scope chain for JS evaluation
modules/plugin/base/src/nsNPAPIPlugin.cpp
--- a/modules/plugin/base/src/nsNPAPIPlugin.cpp
+++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp
@@ -1567,16 +1567,18 @@ bool NP_CALLBACK
 
   JSObject *obj =
     nsNPObjWrapper::GetNewOrUsed(npp, cx, npobj);
 
   if (!obj) {
     return false;
   }
 
+  OBJ_TO_INNER_OBJECT(cx, obj);
+
   // Root obj and the rval (below).
   jsval vec[] = { OBJECT_TO_JSVAL(obj), JSVAL_NULL };
   js::AutoArrayRooter tvr(cx, NS_ARRAY_LENGTH(vec), vec);
   jsval *rval = &vec[1];
 
   if (result) {
     // Initialize the out param to void
     VOID_TO_NPVARIANT(*result);