Bug 542263 - Deallocating a scriptable object shouldn't cause us to mark the actor as invalidated. If the object is resurrected by a racing call from the other side, simply create a new NPObject on this side to represent the actor (Crash at NPObjWrapper_NewResolve with Silverlight), r=bent

This commit is contained in:
Benjamin Smedberg 2010-02-02 17:18:39 -08:00
Родитель db7b660e30
Коммит 604f1ba55c
2 изменённых файлов: 1 добавлений и 13 удалений

Просмотреть файл

@ -86,11 +86,6 @@ PluginScriptableObjectChild::ScriptableDeallocate(NPObject* aObject)
}
ChildNPObject* object = reinterpret_cast<ChildNPObject*>(aObject);
if (!object->invalidated) {
ScriptableInvalidate(aObject);
}
NS_ASSERTION(object->invalidated, "Should have invalidated already!");
PluginScriptableObjectChild* actor = object->parent;
if (actor) {
NS_ASSERTION(actor->Type() == Proxy, "Bad type!");

Просмотреть файл

@ -128,11 +128,6 @@ PluginScriptableObjectParent::ScriptableDeallocate(NPObject* aObject)
}
ParentNPObject* object = reinterpret_cast<ParentNPObject*>(aObject);
if (!object->invalidated) {
ScriptableInvalidate(aObject);
}
NS_ASSERTION(object->invalidated, "Should have invalidated already!");
PluginScriptableObjectParent* actor = object->parent;
if (actor) {
NS_ASSERTION(actor->Type() == Proxy, "Bad type!");
@ -730,9 +725,7 @@ PluginScriptableObjectParent::DropNPObject()
instance->UnregisterNPObject(mObject);
mObject = nsnull;
if (!CallUnprotect()) {
NS_WARNING("Failed to send message!");
}
CallUnprotect();
}
bool