summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge/c
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2009-11-12 14:57:10 -0800
committerNicolas Roard <nicolas@android.com>2009-11-12 15:24:11 -0800
commit50140f9c6f1ba2e46e440a7910438f68596c034c (patch)
tree5ec8c3c777e26a8c67d475eb08daf42ab0649964 /WebCore/bridge/c
parent7f9b227f4bbeb58184a4fd914ab15e384a603e8d (diff)
downloadexternal_webkit-50140f9c6f1ba2e46e440a7910438f68596c034c.zip
external_webkit-50140f9c6f1ba2e46e440a7910438f68596c034c.tar.gz
external_webkit-50140f9c6f1ba2e46e440a7910438f68596c034c.tar.bz2
Remove android-specific plugin exception mechanism
Diffstat (limited to 'WebCore/bridge/c')
-rw-r--r--WebCore/bridge/c/c_instance.cpp12
-rw-r--r--WebCore/bridge/c/c_runtime.cpp48
-rw-r--r--WebCore/bridge/c/c_runtime.h5
3 files changed, 0 insertions, 65 deletions
diff --git a/WebCore/bridge/c/c_instance.cpp b/WebCore/bridge/c/c_instance.cpp
index 81b33c8..77b5966 100644
--- a/WebCore/bridge/c/c_instance.cpp
+++ b/WebCore/bridge/c/c_instance.cpp
@@ -121,9 +121,6 @@ JSValue CInstance::invokeMethod(ExecState* exec, const MethodList& methodList, c
convertValueToNPVariant(exec, args.at(i), &cArgs[i]);
// Invoke the 'C' method.
-#ifdef ANDROID_NPN_SETEXCEPTION
- SetGlobalException(0);
-#endif
bool retval = true;
NPVariant resultVariant;
VOID_TO_NPVARIANT(resultVariant);
@@ -143,9 +140,6 @@ JSValue CInstance::invokeMethod(ExecState* exec, const MethodList& methodList, c
JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get());
_NPN_ReleaseVariantValue(&resultVariant);
-#ifdef ANDROID_NPN_SETEXCEPTION
- MoveGlobalExceptionToExecState(exec);
-#endif
return resultValue;
}
@@ -163,9 +157,6 @@ JSValue CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args)
convertValueToNPVariant(exec, args.at(i), &cArgs[i]);
// Invoke the 'C' method.
-#ifdef ANDROID_NPN_SETEXCEPTION
- SetGlobalException(0);
-#endif
bool retval = true;
NPVariant resultVariant;
VOID_TO_NPVARIANT(resultVariant);
@@ -184,9 +175,6 @@ JSValue CInstance::invokeDefaultMethod(ExecState* exec, const ArgList& args)
JSValue resultValue = convertNPVariantToValue(exec, &resultVariant, _rootObject.get());
_NPN_ReleaseVariantValue(&resultVariant);
-#ifdef ANDROID_NPN_SETEXCEPTION
- MoveGlobalExceptionToExecState(exec);
-#endif
return resultValue;
}
diff --git a/WebCore/bridge/c/c_runtime.cpp b/WebCore/bridge/c/c_runtime.cpp
index 46d7c6f..e9a7bb6 100644
--- a/WebCore/bridge/c/c_runtime.cpp
+++ b/WebCore/bridge/c/c_runtime.cpp
@@ -32,47 +32,11 @@
#include "c_instance.h"
#include "c_utility.h"
#include "npruntime_impl.h"
-#ifdef ANDROID_NPN_SETEXCEPTION
-#include "runtime/Error.h"
-#endif // ANDROID_NPN_SETEXCEPTION
#include <runtime/JSLock.h>
namespace JSC {
namespace Bindings {
-#ifdef ANDROID_NPN_SETEXCEPTION
-/*
- * When throwing an exception, we need to use the current ExecState.
- * The following two methods implement a similar solution to the
- * Objective-C implementation, where _NPN_SetException set a global
- * exception (using SetGlobalException).
- * We then test (using MoveGlobalExceptionToExecState) if the exception
- * is set, after each javascript call that might result in an exception.
- * If the exception is set we throw it with the passed ExecState.
- */
-
-static UString* globalLastException = 0;
-
-void SetGlobalException(const NPUTF8* exception)
-{
- if (globalLastException != 0) {
- delete globalLastException;
- globalLastException = 0;
- }
- if (exception != 0)
- globalLastException = new UString(exception);
-}
-
-void MoveGlobalExceptionToExecState(ExecState* exec)
-{
- if (!globalLastException)
- return;
- JSLock lock(exec);
- throwError(exec, GeneralError, *globalLastException);
- SetGlobalException(0);
-}
-#endif // ANDROID_NPN_SETEXCEPTION
-
JSValue CField::valueFromInstance(ExecState* exec, const Instance* inst) const
{
const CInstance* instance = static_cast<const CInstance*>(inst);
@@ -81,17 +45,11 @@ JSValue CField::valueFromInstance(ExecState* exec, const Instance* inst) const
NPVariant property;
VOID_TO_NPVARIANT(property);
-#ifdef ANDROID_NPN_SETEXCEPTION
- SetGlobalException(0);
-#endif // ANDROID_NPN_SETEXCEPTION
bool result;
{
JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly);
result = obj->_class->getProperty(obj, _fieldIdentifier, &property);
}
-#ifdef ANDROID_NPN_SETEXCEPTION
- MoveGlobalExceptionToExecState(exec);
-#endif // ANDROID_NPN_SETEXCEPTION
if (result) {
JSValue result = convertNPVariantToValue(exec, &property, instance->rootObject());
_NPN_ReleaseVariantValue(&property);
@@ -109,18 +67,12 @@ void CField::setValueToInstance(ExecState *exec, const Instance *inst, JSValue a
NPVariant variant;
convertValueToNPVariant(exec, aValue, &variant);
-#ifdef ANDROID_NPN_SETEXCEPTION
- SetGlobalException(0);
-#endif // ANDROID_NPN_SETEXCEPTION
{
JSLock::DropAllLocks dropAllLocks(SilenceAssertionsOnly);
obj->_class->setProperty(obj, _fieldIdentifier, &variant);
}
_NPN_ReleaseVariantValue(&variant);
-#ifdef ANDROID_NPN_SETEXCEPTION
- MoveGlobalExceptionToExecState(exec);
-#endif // ANDROID_NPN_SETEXCEPTION
}
}
diff --git a/WebCore/bridge/c/c_runtime.h b/WebCore/bridge/c/c_runtime.h
index 676d949..e797342 100644
--- a/WebCore/bridge/c/c_runtime.h
+++ b/WebCore/bridge/c/c_runtime.h
@@ -60,11 +60,6 @@ private:
NPIdentifier _methodIdentifier;
};
-#ifdef ANDROID_NPN_SETEXCEPTION
-void SetGlobalException(const NPUTF8* exception);
-void MoveGlobalExceptionToExecState(ExecState* exec);
-#endif // ANDROID_NPN_SETEXCEPTION
-
} // namespace Bindings
} // namespace JSC