diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/Netscape')
6 files changed, 18 insertions, 11 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp index 5aadd13f4..b4657f95f 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp @@ -163,7 +163,7 @@ void NPRuntimeObjectMap::convertJSValueToNPVariant(ExecState* exec, JSValue valu } if (value.isString()) { - NPString npString = createNPString(value.toString(exec).utf8()); + NPString npString = createNPString(value.toString(exec)->value(exec).utf8()); STRINGN_TO_NPVARIANT(npString.UTF8Characters, npString.UTF8Length, variant); return; } diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h index bef701bee..deffd5431 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h @@ -26,9 +26,7 @@ #ifndef NPJSObjectWrapperMap_h #define NPJSObjectWrapperMap_h - -#include "RunLoop.h" - +#include <WebCore/RunLoop.h> #include <heap/Weak.h> #include <wtf/Forward.h> #include <wtf/HashMap.h> @@ -98,7 +96,7 @@ private: HashMap<JSC::JSObject*, NPJSObject*> m_npJSObjects; HashMap<NPObject*, JSC::Weak<JSNPObject> > m_jsNPObjects; Vector<NPObject*> m_npObjectsToFinalize; - RunLoop::Timer<NPRuntimeObjectMap> m_finalizationTimer; + WebCore::RunLoop::Timer<NPRuntimeObjectMap> m_finalizationTimer; }; } // namespace WebKit diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp index a8a806e01..e09ada40a 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp @@ -408,6 +408,9 @@ static const unsigned WKNVSupportsCompositingCoreAnimationPluginsBool = 74656; // Whether the browser expects a non-retained Core Animation layer. static const unsigned WKNVExpectsNonretainedLayer = 74657; +// Whether plug-in code is allowed to enter (arbitrary) sandbox for the process. +static const unsigned WKNVAllowedToEnterSandbox = 74658; + // The Core Animation render server port. static const unsigned WKNVCALayerRenderServerPort = 71879; @@ -495,6 +498,10 @@ static NPError NPN_GetValue(NPP npp, NPNVariable variable, void *value) break; } + case WKNVAllowedToEnterSandbox: + *(NPBool*)value = true; + break; + #ifndef NP_NO_QUICKDRAW case NPNVsupportsQuickDrawBool: // We don't support the QuickDraw drawing model. diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h index 84541820c..adad2d015 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h @@ -28,10 +28,10 @@ #include "NetscapePluginModule.h" #include "Plugin.h" -#include "RunLoop.h" #include <WebCore/AffineTransform.h> #include <WebCore/GraphicsLayer.h> #include <WebCore/IntRect.h> +#include <WebCore/RunLoop.h> #include <wtf/HashMap.h> #include <wtf/text/CString.h> #include <wtf/text/StringHash.h> @@ -291,7 +291,7 @@ private: bool m_repeat; TimerFunc m_timerFunc; - RunLoop::Timer<Timer> m_timer; + WebCore::RunLoop::Timer<Timer> m_timer; }; typedef HashMap<unsigned, Timer*> TimerMap; TimerMap m_timers; @@ -332,7 +332,7 @@ private: // FIXME: It's a bit wasteful to have one null event timer per plug-in. // We should investigate having one per window. - RunLoop::Timer<NetscapePlugin> m_nullEventTimer; + WebCore::RunLoop::Timer<NetscapePlugin> m_nullEventTimer; NP_CGContext m_npCGContext; #endif #elif PLUGIN_ARCHITECTURE(WIN) diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp index 23a83fe6d..5e496e306 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp @@ -28,6 +28,8 @@ #include "NetscapePlugin.h" #include <utility> +#include <wtf/PassOwnPtr.h> +#include <wtf/Vector.h> using namespace WebCore; using namespace std; diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h index de26827fc..05873e4f4 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h @@ -26,8 +26,8 @@ #ifndef NetscapePluginStream_h #define NetscapePluginStream_h -#include "RunLoop.h" #include <WebCore/FileSystem.h> +#include <WebCore/RunLoop.h> #include <WebCore/npruntime_internal.h> #include <wtf/Forward.h> #include <wtf/PassRefPtr.h> @@ -36,7 +36,7 @@ #include <wtf/text/CString.h> namespace WebCore { - class KURL; +class KURL; } namespace WebKit { @@ -103,7 +103,7 @@ private: CString m_mimeType; CString m_headers; - RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer; + WebCore::RunLoop::Timer<NetscapePluginStream> m_deliveryDataTimer; OwnPtr< Vector<uint8_t> > m_deliveryData; bool m_stopStreamWhenDoneDelivering; }; |