Commit c9e8eb3f authored by andersca@apple.com's avatar andersca@apple.com

Remove ScriptInstance.h

https://bugs.webkit.org/show_bug.cgi?id=115900

Reviewed by Andreas Kling.

Remove yet another abstraction now that we don't support V8.

* GNUmakefile.list.am:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.h:
(Bindings):
(ScriptController):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/ScriptInstance.h: Removed.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
* html/HTMLPlugInElement.h:
(Bindings):
(HTMLPlugInElement):
* platform/graphics/wince/MediaPlayerProxy.h:
(WebMediaPlayerProxy):
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 63fdfa78
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove ScriptInstance.h
https://bugs.webkit.org/show_bug.cgi?id=115900
Reviewed by Andreas Kling.
Remove yet another abstraction now that we don't support V8.
* GNUmakefile.list.am:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.h:
(Bindings):
(ScriptController):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/ScriptInstance.h: Removed.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
* html/HTMLPlugInElement.h:
(Bindings):
(HTMLPlugInElement):
* platform/graphics/wince/MediaPlayerProxy.h:
(WebMediaPlayerProxy):
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:
2013-05-10 Anders Carlsson <andersca@apple.com>
Unreviewed, rolling out r149866.
......
......@@ -2543,7 +2543,6 @@ webcore_sources += \
Source/WebCore/bindings/js/ScriptGCEvent.cpp \
Source/WebCore/bindings/js/ScriptGCEvent.h \
Source/WebCore/bindings/js/ScriptHeapSnapshot.h \
Source/WebCore/bindings/js/ScriptInstance.h \
Source/WebCore/bindings/js/ScriptObject.cpp \
Source/WebCore/bindings/js/ScriptObject.h \
Source/WebCore/bindings/js/ScriptProfile.cpp \
......
......@@ -73069,10 +73069,6 @@
RelativePath="..\bindings\js\ScriptHeapSnapshot.h"
>
</File>
<File
RelativePath="..\bindings\js\ScriptInstance.h"
>
</File>
<File
RelativePath="..\bindings\js\ScriptObject.cpp"
>
......@@ -12943,7 +12943,6 @@
<ClInclude Include="..\bindings\js\ScriptFunctionCall.h" />
<ClInclude Include="..\bindings\js\ScriptGCEvent.h" />
<ClInclude Include="..\bindings\js\ScriptHeapSnapshot.h" />
<ClInclude Include="..\bindings\js\ScriptInstance.h" />
<ClInclude Include="..\bindings\js\ScriptObject.h" />
<ClInclude Include="..\bindings\js\ScriptProfile.h" />
<ClInclude Include="..\bindings\js\ScriptProfileNode.h" />
......@@ -11493,9 +11493,6 @@
<ClInclude Include="..\bindings\js\ScriptHeapSnapshot.h">
<Filter>bindings\js</Filter>
</ClInclude>
<ClInclude Include="..\bindings\js\ScriptInstance.h">
<Filter>bindings\js</Filter>
</ClInclude>
<ClInclude Include="..\bindings\js\ScriptObject.h">
<Filter>bindings\js</Filter>
</ClInclude>
......
......@@ -2824,7 +2824,6 @@
934CC0E10ED39D6F00A658F2 /* ScriptValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 934CC0DF0ED39D6F00A658F2 /* ScriptValue.cpp */; };
934CC0E20ED39D6F00A658F2 /* ScriptValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 934CC0E00ED39D6F00A658F2 /* ScriptValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
934CC10A0EDB223900A658F2 /* ScriptSourceCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 934CC1090EDB223900A658F2 /* ScriptSourceCode.h */; };
934CC1170EDCAC7300A658F2 /* ScriptInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 934CC1160EDCAC7300A658F2 /* ScriptInstance.h */; settings = {ATTRIBUTES = (Private, ); }; };
934D9BA50B8C116B007B42A9 /* WebCoreNSStringExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */; };
934D9BA70B8C1175007B42A9 /* WebCoreNSStringExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
934F71380D5A6EFF00018D69 /* AuthenticationChallengeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 934F71370D5A6EFF00018D69 /* AuthenticationChallengeBase.cpp */; };
......@@ -9253,7 +9252,6 @@
934CC0DF0ED39D6F00A658F2 /* ScriptValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptValue.cpp; sourceTree = "<group>"; };
934CC0E00ED39D6F00A658F2 /* ScriptValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptValue.h; sourceTree = "<group>"; };
934CC1090EDB223900A658F2 /* ScriptSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptSourceCode.h; sourceTree = "<group>"; };
934CC1160EDCAC7300A658F2 /* ScriptInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptInstance.h; sourceTree = "<group>"; };
934D9BA40B8C116B007B42A9 /* WebCoreNSStringExtras.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreNSStringExtras.mm; sourceTree = "<group>"; };
934D9BA60B8C1175007B42A9 /* WebCoreNSStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreNSStringExtras.h; sourceTree = "<group>"; };
934F71370D5A6EFF00018D69 /* AuthenticationChallengeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationChallengeBase.cpp; sourceTree = "<group>"; };
......@@ -18769,7 +18767,6 @@
4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */,
4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */,
9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */,
934CC1160EDCAC7300A658F2 /* ScriptInstance.h */,
41F066E30F64BCF600A07EAC /* ScriptObject.cpp */,
41F066E20F64BCF600A07EAC /* ScriptObject.h */,
F33F0281120947F200E5743A /* ScriptProfile.cpp */,
......@@ -23339,7 +23336,6 @@
41002CCD0F66EDEF009E660D /* ScriptFunctionCall.h in Headers */,
4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */,
9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */,
934CC1170EDCAC7300A658F2 /* ScriptInstance.h in Headers */,
41F066E40F64BCF600A07EAC /* ScriptObject.h in Headers */,
FD31603612B0267600C1A359 /* ScriptProcessorNode.h in Headers */,
9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */,
......@@ -25,7 +25,6 @@
#include "FrameLoaderTypes.h"
#include "JSDOMWindowShell.h"
#include "ScriptControllerBase.h"
#include "ScriptInstance.h"
#include <JavaScriptCore/JSBase.h>
#include <heap/Strong.h>
#include <wtf/Forward.h>
......@@ -45,6 +44,7 @@ namespace JSC {
class ExecState;
namespace Bindings {
class Instance;
class RootObject;
}
}
......@@ -134,7 +134,7 @@ public:
void updatePlatformScriptObjects();
PassScriptInstance createScriptInstanceForWidget(Widget*);
PassRefPtr<JSC::Bindings::Instance> createScriptInstanceForWidget(Widget*);
JSC::Bindings::RootObject* bindingRootObject();
JSC::Bindings::RootObject* cacheableBindingRootObject();
......
......@@ -60,7 +60,7 @@ using namespace JSC::Bindings;
namespace WebCore {
PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widget)
PassRefPtr<JSC::Bindings::Instance> ScriptController::createScriptInstanceForWidget(Widget* widget)
{
NSView* widgetView = widget->platformWidget();
if (!widgetView)
......
/*
* Copyright (c) 2008, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ScriptInstance_h
#define ScriptInstance_h
#include "BridgeJSC.h"
#include <wtf/RefPtr.h>
namespace WebCore {
typedef RefPtr<JSC::Bindings::Instance> ScriptInstance;
typedef PassRefPtr<JSC::Bindings::Instance> PassScriptInstance;
} // namespace WebCore
#endif // ScriptInstance_h
......@@ -24,6 +24,7 @@
#include "HTMLPlugInElement.h"
#include "Attribute.h"
#include "BridgeJSC.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSPropertyNames.h"
......@@ -118,7 +119,7 @@ void HTMLPlugInElement::resetInstance()
m_instance.clear();
}
PassScriptInstance HTMLPlugInElement::getInstance()
PassRefPtr<JSC::Bindings::Instance> HTMLPlugInElement::getInstance()
{
Frame* frame = document()->frame();
if (!frame)
......
......@@ -26,12 +26,16 @@
#include "HTMLFrameOwnerElement.h"
#include "Image.h"
#include "ScriptInstance.h"
#if ENABLE(NETSCAPE_PLUGIN_API)
struct NPObject;
#endif
namespace JSC {
namespace Bindings {
class Instance;
}
}
namespace WebCore {
class RenderEmbeddedObject;
......@@ -44,7 +48,7 @@ public:
void resetInstance();
PassScriptInstance getInstance();
PassRefPtr<JSC::Bindings::Instance> getInstance();
Widget* pluginWidget() const;
......@@ -104,7 +108,7 @@ private:
virtual bool isKeyboardFocusable(KeyboardEvent*) const;
virtual bool isPluginElement() const;
mutable ScriptInstance m_instance;
RefPtr<JSC::Bindings::Instance> m_instance;
#if ENABLE(NETSCAPE_PLUGIN_API)
NPObject* m_NPObject;
#endif
......
......@@ -24,7 +24,6 @@
#if ENABLE(VIDEO)
#include <wtf/Forward.h>
#include "ScriptInstance.h"
namespace WebCore {
......@@ -54,7 +53,7 @@ namespace WebCore {
void load(const String& url);
HTMLMediaElement* element();
void invokeMethod(const String& methodName);
ScriptInstance pluginInstance();
RefPtr<JSC::Bindings::Instance> pluginInstance();
private:
MediaPlayer* m_mediaPlayer;
......
......@@ -55,6 +55,7 @@
#include "Settings.h"
#include "Text.h"
#include "TextRun.h"
#include <wtf/StackStats.h>
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
#include "HTMLMediaElement.h"
......
......@@ -42,6 +42,7 @@
#include "Path.h"
#include "PlatformMouseEvent.h"
#include "RenderView.h"
#include <wtf/StackStats.h>
namespace WebCore {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment