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 idunknown
push userunknown
push dateunknown
reviewersmrbkap
bugs623614
milestone2.0b10pre
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;
 }