OSDN Git Service

Automated import from //branches/donutburger/...@141184,141184
authorAndrei Popescu <>
Wed, 25 Mar 2009 02:46:53 +0000 (19:46 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Wed, 25 Mar 2009 02:46:53 +0000 (19:46 -0700)
WebCore/bridge/NP_jsobject.cpp

index 19b4b60..45f9f6d 100644 (file)
@@ -379,11 +379,17 @@ bool _NPN_HasMethod(NPP, NPObject* o, NPIdentifier methodName)
     return false;
 }
 
-void _NPN_SetException(NPObject*, const NPUTF8* message)
+void _NPN_SetException(NPObject* o, const NPUTF8* message)
 {
+#ifdef ANDROID_NPN_SETEXCEPTION
+    if (o->_class == NPScriptObjectClass) {
+        JSC::Bindings::SetGlobalException(message);
+    }
+#else
     // Ignorning the NPObject param is consistent with the Mozilla implementation.
     UString exception(message);
     CInstance::setGlobalException(exception);
+#endif  // ANDROID_NPN_SETEXCEPTION
 }
 
 bool _NPN_Enumerate(NPP, NPObject* o, NPIdentifier** identifier, uint32_t* count)