diff options
author | Andrew Azores <[email protected]> | 2013-10-17 10:32:46 -0400 |
---|---|---|
committer | Andrew Azores <[email protected]> | 2013-10-17 10:32:46 -0400 |
commit | 72cc555dc703aa3f6a7338b5c3ade9fee7e799e3 (patch) | |
tree | 0466bae5ae3699db02603754f98926c1709c57bc /plugin/icedteanp/IcedTeaScriptablePluginObject.h | |
parent | 7ec1205e53b3516947f61cc19a0affcccf8c4898 (diff) |
Back out changeset 420d72e5cee7
Back out changeset 420d72e5cee7 due to breaking LiveConnect feature.
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-October/024919.html
* plugin/icedteanp/IcedTeaNPPlugin.cc: undo 420d72e5cee7
* plugin/icedteanp/IcedTeaPluginUtils.cc: undo 420d72e5cee7
* plugin/icedteanp/IcedTeaPluginUtils.h: undo 420d72e5cee7
* plugin/icedteanp/IcedTeaScriptablePluginObject.cc: undo 420d72e5cee7
* plugin/icedteanp/IcedTeaScriptablePluginObject.h: undo 420d72e5cee7
* tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc: undo 420d72e5cee7
Diffstat (limited to 'plugin/icedteanp/IcedTeaScriptablePluginObject.h')
-rw-r--r-- | plugin/icedteanp/IcedTeaScriptablePluginObject.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/plugin/icedteanp/IcedTeaScriptablePluginObject.h b/plugin/icedteanp/IcedTeaScriptablePluginObject.h index 99e89c2..a02df53 100644 --- a/plugin/icedteanp/IcedTeaScriptablePluginObject.h +++ b/plugin/icedteanp/IcedTeaScriptablePluginObject.h @@ -145,20 +145,13 @@ class IcedTeaScriptableJavaObject: public NPObject private: NPP instance; bool is_object_array; - /* These may be empty if 'initialized' is false */ + /* These may be empty if 'is_applet_instance' is true + * and the object has not yet been used */ std::string class_id, instance_id; - bool initialized, initialization_failed; - - /* If we are uninitialized, make a Java request for the applet java class & instance ID for the plugin instance. - * Only objects representing an applet will begin uninitialized, to prevent blocking when the browser requests the object. - * Returns false on initialization error. */ - bool tryToInitializeIfApplet(); public: IcedTeaScriptableJavaObject(NPP instance) { this->instance = instance; - this->is_object_array = false; - this->initialized = false; - this->initialization_failed = false; + is_object_array = false; } static void deAllocate(NPObject *npobj) { delete (IcedTeaScriptableJavaObject*)npobj; @@ -173,12 +166,8 @@ public: return getClassID() + ":" + getInstanceID(); } static void invalidate(NPObject *npobj) { - IcedTeaScriptableJavaObject* scriptable_object = (IcedTeaScriptableJavaObject*) npobj; - /* Nothing to do if we have not been initialized */ - if (!scriptable_object->initialized) { - return; - } IcedTeaPluginUtilities::removeInstanceID(npobj); + IcedTeaScriptableJavaObject* scriptable_object = (IcedTeaScriptableJavaObject*) npobj; IcedTeaPluginUtilities::removeObjectMapping(scriptable_object->objectKey()); } static bool hasMethod(NPObject *npobj, NPIdentifier name_id); @@ -206,12 +195,15 @@ public: } static bool construct(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); - - static NPObjectRef get_scriptable_applet_object(NPP instance); - static NPObjectRef get_scriptable_java_object(NPP instance, + /* Creates and retains a scriptable java object (intended to be called asynch.) */ + static NPObject* get_scriptable_java_object(NPP instance, std::string class_id, std::string instance_id, bool isArray); }; +/* Creates and retains a scriptable java object (intended to be called asynch.) */ + +void _createAndRetainJavaObject(void* data); + #endif /* __ICEDTEASCRIPTABLEPLUGINOBJECT_H_ */ |