From 4b1cfb162bc380ab4f8ea3c89f50612e2c54d632 Mon Sep 17 00:00:00 2001 From: Andrei Popescu <> Date: Tue, 24 Mar 2009 19:46:53 -0700 Subject: [PATCH] Automated import from //branches/donutburger/...@141184,141184 --- WebCore/bridge/NP_jsobject.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/WebCore/bridge/NP_jsobject.cpp b/WebCore/bridge/NP_jsobject.cpp index 19b4b608b..45f9f6d65 100644 --- a/WebCore/bridge/NP_jsobject.cpp +++ b/WebCore/bridge/NP_jsobject.cpp @@ -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) -- 2.11.0