diff options
author | Steve Block <steveblock@google.com> | 2010-02-15 12:23:52 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-16 11:48:32 +0000 |
commit | 8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch) | |
tree | 73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/bridge/NP_jsobject.cpp | |
parent | bf14be70295513b8076f3fa47a268a7e42b2c478 (diff) | |
download | external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2 |
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/bridge/NP_jsobject.cpp')
-rw-r--r-- | WebCore/bridge/NP_jsobject.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WebCore/bridge/NP_jsobject.cpp b/WebCore/bridge/NP_jsobject.cpp index a30b6d7..09851df 100644 --- a/WebCore/bridge/NP_jsobject.cpp +++ b/WebCore/bridge/NP_jsobject.cpp @@ -30,6 +30,7 @@ #include "NP_jsobject.h" #include "PlatformString.h" +#include "PluginView.h" #include "StringSourceProvider.h" #include "c_utility.h" #include "c_instance.h" @@ -190,7 +191,7 @@ bool _NPN_Invoke(NPP npp, NPObject* o, NPIdentifier methodName, const NPVariant* return true; } -bool _NPN_Evaluate(NPP, NPObject* o, NPString* s, NPVariant* variant) +bool _NPN_Evaluate(NPP instance, NPObject* o, NPString* s, NPVariant* variant) { if (o->_class == NPScriptObjectClass) { JavaScriptObject* obj = reinterpret_cast<JavaScriptObject*>(o); @@ -199,6 +200,10 @@ bool _NPN_Evaluate(NPP, NPObject* o, NPString* s, NPVariant* variant) if (!rootObject || !rootObject->isValid()) return false; + // There is a crash in Flash when evaluating a script that destroys the + // PluginView, so we destroy it asynchronously. + PluginView::keepAlive(instance); + ExecState* exec = rootObject->globalObject()->globalExec(); JSLock lock(SilenceAssertionsOnly); String scriptString = convertNPStringToUTF16(s); |