diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
commit | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch) | |
tree | cdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/WebKit2/WebProcess/Plugins/PluginView.cpp | |
parent | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff) | |
download | qtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz |
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/PluginView.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/Plugins/PluginView.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp index 03dd60f59..de17915b0 100644 --- a/Source/WebKit2/WebProcess/Plugins/PluginView.cpp +++ b/Source/WebKit2/WebProcess/Plugins/PluginView.cpp @@ -227,8 +227,10 @@ void PluginView::Stream::didFinishLoading(NetscapePlugInStreamLoader*) // Calling streamDidFinishLoading could cause us to be deleted, so we hold on to a reference here. RefPtr<Stream> protectStream(this); +#if ENABLE(NETSCAPE_PLUGIN_API) // Protect the plug-in while we're calling into it. NPRuntimeObjectMap::PluginProtector pluginProtector(&m_pluginView->m_npRuntimeObjectMap); +#endif m_pluginView->m_plugin->streamDidFinishLoading(m_streamID); m_pluginView->removeStream(this); @@ -261,7 +263,9 @@ PluginView::PluginView(PassRefPtr<HTMLPlugInElement> pluginElement, PassRefPtr<P , m_isWaitingUntilMediaCanStart(false) , m_isBeingDestroyed(false) , m_pendingURLRequestsTimer(RunLoop::main(), this, &PluginView::pendingURLRequestsTimerFired) +#if ENABLE(NETSCAPE_PLUGIN_API) , m_npRuntimeObjectMap(this) +#endif , m_manualStreamState(StreamStateInitial) { #if PLATFORM(MAC) @@ -293,8 +297,10 @@ PluginView::~PluginView() #endif } +#if ENABLE(NETSCAPE_PLUGIN_API) // Invalidate the object map. m_npRuntimeObjectMap.invalidate(); +#endif cancelAllStreams(); @@ -529,6 +535,7 @@ JSObject* PluginView::scriptObject(JSGlobalObject* globalObject) if (!m_isInitialized || !m_plugin) return 0; +#if ENABLE(NETSCAPE_PLUGIN_API) NPObject* scriptableNPObject = m_plugin->pluginScriptableNPObject(); if (!scriptableNPObject) return 0; @@ -537,6 +544,10 @@ JSObject* PluginView::scriptObject(JSGlobalObject* globalObject) releaseNPObject(scriptableNPObject); return jsObject; +#else + UNUSED_PARAM(globalObject); + return 0; +#endif } void PluginView::privateBrowsingStateChanged(bool privateBrowsingEnabled) @@ -1054,6 +1065,7 @@ void PluginView::cancelManualStreamLoad() documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(m_parameters.url)); } +#if ENABLE(NETSCAPE_PLUGIN_API) NPObject* PluginView::windowScriptNPObject() { if (!frame()) @@ -1090,6 +1102,7 @@ bool PluginView::evaluate(NPObject* npObject, const String& scriptString, NPVari UserGestureIndicator gestureIndicator(allowPopups ? DefinitelyProcessingUserGesture : PossiblyProcessingUserGesture); return m_npRuntimeObjectMap.evaluate(npObject, scriptString, result); } +#endif void PluginView::setStatusbarText(const String& statusbarText) { |