Distinguish between wrappers and proxies in WN::Unwrap (bug 623614, r=mrbkap).
authorAndreas Gal <gal@mozilla.com>
Thu, 20 Jan 2011 18:01:32 -0800
changeset 61064 b03242ce2fce26958fcab6a4d61b932784394868
parent 61063 02ff49abd451045639df41fbaf2126413053c7c7
child 61065 33313f209f4d1a161648732b25c34271d120eb64
push id18207
push usercleary@mozilla.com
push dateFri, 21 Jan 2011 05:02:09 +0000
treeherdermozilla-central@aa618e93942e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs623614
milestone2.0b10pre
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
Distinguish between wrappers and proxies in WN::Unwrap (bug 623614, r=mrbkap).
js/src/xpconnect/src/XPCWrapper.cpp
--- a/js/src/xpconnect/src/XPCWrapper.cpp
+++ b/js/src/xpconnect/src/XPCWrapper.cpp
@@ -122,17 +122,17 @@ AttachNewConstructorObject(XPCCallContex
 
 }
 
 namespace XPCWrapper {
 
 JSObject *
 Unwrap(JSContext *cx, JSObject *wrapper)
 {
-  if (wrapper->isProxy()) {
+  if (wrapper->isWrapper()) {
     if (xpc::AccessCheck::isScriptAccessOnly(cx, wrapper))
       return nsnull;
     return wrapper->unwrap();
   }
 
   return nsnull;
 }