Made USE(JSC) unconditional
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 20:44:20 +0000 (20:44 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 20:44:20 +0000 (20:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114058

Reviewed by Anders Carlsson.

../JavaScriptCore:

* config.h:

../ThirdParty:

* gtest/include/gtest/internal/gtest-port.h:

../WebCore:

* Modules/webdatabase/Database.cpp:
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/JavaScriptCallFrame.cpp:
* bindings/js/JavaScriptCallFrame.h:
* bindings/scripts/InFilesCompiler.pm:
(generateHeadersHeader):
* css/MediaQueryListListener.cpp:
(WebCore::MediaQueryListListener::queryChanged):
* dom/ContainerNode.cpp:
(WebCore::dispatchChildRemovalEvents):
* dom/EventListener.h:
(EventListener):
(WebCore::EventListener::visitJSFunction):
* dom/EventTarget.h:
(EventTarget):
(WebCore):
(WebCore::EventTarget::visitJSEventListeners):
* dom/Node.cpp:
* dom/Node.h:
* dom/ScriptExecutionContext.cpp:
(WebCore):
(WebCore::ScriptExecutionContext::globalData):
* dom/ScriptExecutionContext.h:
(ScriptExecutionContext):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::notifyFinished):
* inspector/InjectedScriptHost.h:
(InjectedScriptHost):
(WebCore::InjectedScriptHost::evaluateReturnsEvalFunction):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* page/Frame.cpp:
* page/Settings.cpp:
(WebCore):
(WebCore::Settings::shouldRespectPriorityInCSSAttributeSetters):
* page/Settings.h:
(Settings):
* plugins/PluginView.cpp:
(WebCore::PluginView::start):
(WebCore::PluginView::stop):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::npObject):
(WebCore):
(WebCore::PluginView::bindingInstance):
(WebCore::PluginView::privateBrowsingStateChanged):
* plugins/PluginView.h:
(PluginView):
* plugins/PluginViewBase.h:
(PluginViewBase):
(WebCore::PluginViewBase::scriptObject):
* plugins/PluginViewNone.cpp:
(WebCore):
(WebCore::PluginView::bindingInstance):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):

../WebKit/efl:

* ewk/ewk_frame.cpp:
(ewk_frame_script_execute):

../WebKit/qt:

* Api/qwebscriptworld.cpp:
(QWebScriptWorld::QWebScriptWorld):

../WebKit2:

* Shared/linux/WebMemorySamplerLinux.cpp:
(WebKit::WebMemorySampler::sampleWebKit):
* config.h:

../WTF:

* wtf/ThreadRestrictionVerifier.h:
(WTF):
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
(WTF::WTFThreadData::~WTFThreadData):
* wtf/WTFThreadData.h:
(WTFThreadData):
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

43 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/config.h
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h
Source/WTF/ChangeLog
Source/WTF/wtf/ThreadRestrictionVerifier.h
Source/WTF/wtf/WTFThreadData.cpp
Source/WTF/wtf/WTFThreadData.h
Source/WTF/wtf/text/StringImpl.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/Database.cpp
Source/WebCore/bindings/ScriptControllerBase.cpp
Source/WebCore/bindings/js/JavaScriptCallFrame.cpp
Source/WebCore/bindings/js/JavaScriptCallFrame.h
Source/WebCore/bindings/scripts/InFilesCompiler.pm
Source/WebCore/css/MediaQueryListListener.cpp
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/EventListener.h
Source/WebCore/dom/EventTarget.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/ScriptExecutionContext.cpp
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLImageLoader.cpp
Source/WebCore/inspector/InjectedScriptHost.h
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/plugins/PluginView.cpp
Source/WebCore/plugins/PluginView.h
Source/WebCore/plugins/PluginViewBase.h
Source/WebCore/plugins/PluginViewNone.cpp
Source/WebCore/plugins/qt/PluginViewQt.cpp
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_frame.cpp
Source/WebKit/qt/Api/qwebscriptworld.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/linux/WebMemorySamplerLinux.cpp
Source/WebKit2/config.h

index 6d6b715..cc19089 100644 (file)
@@ -1,3 +1,12 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * config.h:
+
 2013-04-05  Filip Pizlo  <fpizlo@apple.com>
 
         Unreviewed, rolling out http://trac.webkit.org/changeset/147729
index 7976ec4..4e1d2b9 100644 (file)
 
 #include <wtf/Platform.h>
 #include <wtf/ExportMacros.h>
-// WTF cannot depend on JSC even if USE(JSC).
-#if USE(JSC) && !defined(BUILDING_WTF)
+#if !defined(BUILDING_WTF)
 #include "JSExportMacros.h"
-#elif PLATFORM(CHROMIUM)
-// Chromium doesn't have runtime/ in its include paths.
-#include "runtime/JSExportMacros.h"
 #endif
 
 #if OS(WINDOWS)
index 93d431c..9cad3df 100644 (file)
@@ -1,3 +1,12 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * gtest/include/gtest/internal/gtest-port.h:
+
 2013-03-29  Martin Robinson  <mrobinson@igalia.com>
 
         Update the version of gyp in the repository
index fb3b376..c4af916 100644 (file)
 
 #include <wtf/Platform.h>
 #include <wtf/ExportMacros.h>
-#if USE(JSC)
 #include <runtime/JSExportMacros.h>
-#endif
 #include <wtf/Assertions.h>
 #include <wtf/FastMalloc.h>
 
index 6408e2c..81a5679 100644 (file)
@@ -1,3 +1,20 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/ThreadRestrictionVerifier.h:
+        (WTF):
+        * wtf/WTFThreadData.cpp:
+        (WTF::WTFThreadData::WTFThreadData):
+        (WTF::WTFThreadData::~WTFThreadData):
+        * wtf/WTFThreadData.h:
+        (WTFThreadData):
+        * wtf/text/StringImpl.cpp:
+        (WTF::StringImpl::~StringImpl):
+
 2013-04-05  Roger Fong  <roger_fong@apple.com>
 
         More VS2010 solution makefile fixes.
index cff49d3..f7ada50 100644 (file)
@@ -47,7 +47,12 @@ namespace WTF {
 // The default mode is to verify that the object will only be used on a single thread. The
 // thread gets captured when setShared(true) is called.
 // The mode may be changed by calling useMutexMode (or turnOffVerification).
-#if !USE(JSC) // This verifier is completely wrong for JavaScript implementations that use threads
+
+// FIXME: This verifier is switched off because it fires false positives for
+// objects that are used on multiple threads. Instead of an opt-out verifier,
+// we probably need an opt-in verifier that marks select objects as being
+// tied to select threads.
+#if 0
 class ThreadRestrictionVerifier {
 public:
     ThreadRestrictionVerifier()
@@ -169,7 +174,7 @@ private:
     dispatch_queue_t m_owningQueue;
 #endif
 };
-#else // !USE(JSC) => so the JSC case
+#else
 class ThreadRestrictionVerifier {
 public:
     ThreadRestrictionVerifier()
index 70e7a84..ec3e500 100644 (file)
@@ -35,14 +35,12 @@ WTFThreadData::WTFThreadData()
     : m_apiData(0)
     , m_atomicStringTable(0)
     , m_atomicStringTableDestructor(0)
-#if USE(JSC)
     , m_defaultIdentifierTable(new JSC::IdentifierTable())
     , m_currentIdentifierTable(m_defaultIdentifierTable)
     , m_stackBounds(StackBounds::currentThreadStackBounds())
 #if ENABLE(STACK_STATS)
     , m_stackStats()
 #endif
-#endif // USE(JSC)
 {
 }
 
@@ -50,14 +48,11 @@ WTFThreadData::~WTFThreadData()
 {
     if (m_atomicStringTableDestructor)
         m_atomicStringTableDestructor(m_atomicStringTable);
-#if USE(JSC)
     delete m_defaultIdentifierTable;
-#endif
 }
 
 } // namespace WTF
 
-#if USE(JSC)
 namespace JSC {
 
 IdentifierTable::~IdentifierTable()
@@ -75,5 +70,3 @@ HashSet<StringImpl*>::AddResult IdentifierTable::add(StringImpl* value)
 }
 
 } // namespace JSC
-#endif
-
index eea788b..86f40e0 100644 (file)
@@ -36,7 +36,6 @@
 #include <wtf/ThreadSpecific.h>
 #include <wtf/Threading.h>
 
-#if USE(JSC)
 // FIXME: This is a temporary layering violation while we move more string code to WTF.
 namespace JSC {
 
@@ -68,7 +67,6 @@ private:
 };
 
 }
-#endif
 
 namespace WTF {
 
@@ -87,7 +85,6 @@ public:
         return m_atomicStringTable;
     }
 
-#if USE(JSC)
     JSC::IdentifierTable* currentIdentifierTable()
     {
         return m_currentIdentifierTable;
@@ -121,7 +118,6 @@ public:
         return m_stackStats;
     }
 #endif
-#endif // USE(JSC)
 
     void* m_apiData;
 
@@ -129,14 +125,12 @@ private:
     AtomicStringTable* m_atomicStringTable;
     AtomicStringTableDestructor m_atomicStringTableDestructor;
 
-#if USE(JSC)
     JSC::IdentifierTable* m_defaultIdentifierTable;
     JSC::IdentifierTable* m_currentIdentifierTable;
     StackBounds m_stackBounds;
 #if ENABLE(STACK_STATS)
     StackStats::PerThreadStats m_stackStats;
 #endif
-#endif // USE(JSC)
 
     static WTF_EXPORTDATA ThreadSpecific<WTFThreadData>* staticData;
     friend WTFThreadData& wtfThreadData();
index b59e62d..48c5cba 100644 (file)
@@ -115,12 +115,10 @@ StringImpl::~StringImpl()
 
     if (isAtomic())
         AtomicString::remove(this);
-#if USE(JSC)
     if (isIdentifier()) {
         if (!wtfThreadData().currentIdentifierTable()->remove(this))
             CRASH();
     }
-#endif
 
     BufferOwnership ownership = bufferOwnership();
 
index 33cf7cd..ceaf73c 100644 (file)
@@ -1,3 +1,73 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * Modules/webdatabase/Database.cpp:
+        * bindings/ScriptControllerBase.cpp:
+        (WebCore::ScriptController::executeIfJavaScriptURL):
+        * bindings/js/JavaScriptCallFrame.cpp:
+        * bindings/js/JavaScriptCallFrame.h:
+        * bindings/scripts/InFilesCompiler.pm:
+        (generateHeadersHeader):
+        * css/MediaQueryListListener.cpp:
+        (WebCore::MediaQueryListListener::queryChanged):
+        * dom/ContainerNode.cpp:
+        (WebCore::dispatchChildRemovalEvents):
+        * dom/EventListener.h:
+        (EventListener):
+        (WebCore::EventListener::visitJSFunction):
+        * dom/EventTarget.h:
+        (EventTarget):
+        (WebCore):
+        (WebCore::EventTarget::visitJSEventListeners):
+        * dom/Node.cpp:
+        * dom/Node.h:
+        * dom/ScriptExecutionContext.cpp:
+        (WebCore):
+        (WebCore::ScriptExecutionContext::globalData):
+        * dom/ScriptExecutionContext.h:
+        (ScriptExecutionContext):
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::createImageBuffer):
+        * html/HTMLImageLoader.cpp:
+        (WebCore::HTMLImageLoader::notifyFinished):
+        * inspector/InjectedScriptHost.h:
+        (InjectedScriptHost):
+        (WebCore::InjectedScriptHost::evaluateReturnsEvalFunction):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore):
+        (WebCore::InspectorInstrumentation::didCommitLoadImpl):
+        * page/Frame.cpp:
+        * page/Settings.cpp:
+        (WebCore):
+        (WebCore::Settings::shouldRespectPriorityInCSSAttributeSetters):
+        * page/Settings.h:
+        (Settings):
+        * plugins/PluginView.cpp:
+        (WebCore::PluginView::start):
+        (WebCore::PluginView::stop):
+        (WebCore::PluginView::performRequest):
+        (WebCore::PluginView::npObject):
+        (WebCore):
+        (WebCore::PluginView::bindingInstance):
+        (WebCore::PluginView::privateBrowsingStateChanged):
+        * plugins/PluginView.h:
+        (PluginView):
+        * plugins/PluginViewBase.h:
+        (PluginViewBase):
+        (WebCore::PluginViewBase::scriptObject):
+        * plugins/PluginViewNone.cpp:
+        (WebCore):
+        (WebCore::PluginView::bindingInstance):
+        * plugins/qt/PluginViewQt.cpp:
+        (WebCore::PluginView::dispatchNPEvent):
+        (WebCore::PluginView::setNPWindowIfNeeded):
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::dropProtection):
+
 2013-04-05  Roger Fong  <roger_fong@apple.com>
 
         More VS2010 solution makefile fixes.
index 7cabcfd..e475bec 100644 (file)
@@ -41,6 +41,7 @@
 #include "DatabaseThread.h"
 #include "DatabaseTracker.h"
 #include "Document.h"
+#include "JSDOMWindow.h"
 #include "Logging.h"
 #include "NotImplemented.h"
 #include "Page.h"
 #include <wtf/StdLibExtras.h>
 #include <wtf/text/CString.h>
 
-#if USE(JSC)
-#include "JSDOMWindow.h"
-#endif
-
 namespace WebCore {
 
 PassRefPtr<Database> Database::create(ScriptExecutionContext*, PassRefPtr<DatabaseBackendBase> backend)
index 05805d9..963dcbc 100644 (file)
@@ -99,15 +99,10 @@ bool ScriptController::executeIfJavaScriptURL(const KURL& url, ShouldReplaceDocu
         return true;
 
     String scriptResult;
-#if USE(JSC)
     JSDOMWindowShell* shell = windowShell(mainThreadNormalWorld());
     JSC::ExecState* exec = shell->window()->globalExec();
     if (!result.getString(exec, scriptResult))
         return true;
-#else
-    if (!result.getString(scriptResult))
-        return true;
-#endif
 
     // FIXME: We should always replace the document, but doing so
     //        synchronously can cause crashes:
index 00f0990..3604d0b 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
 
 #include "JavaScriptCallFrame.h"
 
index 1bbc45d..ab8f8f3 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef JavaScriptCallFrame_h
 #define JavaScriptCallFrame_h
 
-#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
 
 #include <debugger/DebuggerCallFrame.h>
 #include <interpreter/CallFrame.h>
index 3dcd772..297568c 100644 (file)
@@ -279,11 +279,7 @@ sub generateHeadersHeader()
 
         print F "#if " . $object->conditionalStringFromAttributeValue($conditional) . "\n" if $conditional;
         print F "#include \"$interfaceName.h\"\n";
-        print F "#if USE(JSC)\n";
         print F "#include \"JS$interfaceName.h\"\n";
-        print F "#elif USE(V8)\n";
-        print F "#include \"V8$interfaceName.h\"\n";
-        print F "#endif\n";
         print F "#endif\n" if $conditional;
     }
 
index 03c4157..f771a09 100644 (file)
 #include "MediaQueryList.h"
 #include "ScriptFunctionCall.h"
 
-#if USE(JSC)
 #include "JSMediaQueryList.h"
-#else
-#include "V8MediaQueryList.h"
-#endif
 
 namespace WebCore {
 
 void MediaQueryListListener::queryChanged(ScriptState* state, MediaQueryList* query)
 {
     ScriptCallback callback(state, m_value);
-#if USE(JSC)
     callback.appendArgument(toJS(state, deprecatedGlobalObjectForPrototype(state), query));
-#else
-    v8::HandleScope handleScope;
-    v8::Handle<v8::Context> context = state->context();
-    if (context.IsEmpty())
-       return; // JS may not be enabled.
-    v8::Context::Scope scope(context);
-    callback.appendArgument(toV8(query, v8::Handle<v8::Object>(), context->GetIsolate()));
-#endif
     callback.call();
 }
 
index cbf593e..8a25837 100644 (file)
@@ -56,9 +56,7 @@
 #include <wtf/CurrentTime.h>
 #include <wtf/Vector.h>
 
-#if USE(JSC)
 #include "JSNode.h"
-#endif
 
 using namespace std;
 
@@ -1124,9 +1122,7 @@ static void dispatchChildRemovalEvents(Node* child)
 
     ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
 
-#if USE(JSC)
     willCreatePossiblyOrphanedTreeByRemoval(child);
-#endif
     InspectorInstrumentation::willRemoveDOMNode(child->document(), child);
 
     RefPtr<Node> c = child;
index d1a6e8f..30bf9b9 100644 (file)
@@ -51,9 +51,7 @@ namespace WebCore {
         virtual void handleEvent(ScriptExecutionContext*, Event*) = 0;
         virtual bool wasCreatedFromMarkup() const { return false; }
 
-#if USE(JSC)
         virtual void visitJSFunction(JSC::SlotVisitor&) { }
-#endif
 
         bool isAttribute() const { return virtualisAttribute(); }
         Type type() const { return m_type; }
index 7a2e100..82777a8 100644 (file)
@@ -129,10 +129,8 @@ namespace WebCore {
         bool fireEventListeners(Event*);
         bool isFiringEventListeners();
 
-#if USE(JSC)
         void visitJSEventListeners(JSC::SlotVisitor&);
         void invalidateJSEventListeners(JSC::JSObject*);
-#endif
 
     protected:
         virtual ~EventTarget();
@@ -175,14 +173,12 @@ namespace WebCore {
         EventListener* on##attribute() { return recipient ? recipient->getAttributeEventListener(eventNames().attribute##Event) : 0; } \
         void setOn##attribute(PassRefPtr<EventListener> listener) { if (recipient) recipient->setAttributeEventListener(eventNames().attribute##Event, listener); } \
 
-#if USE(JSC)
     inline void EventTarget::visitJSEventListeners(JSC::SlotVisitor& visitor)
     {
         EventListenerIterator iterator(this);
         while (EventListener* listener = iterator.nextListener())
             listener->visitJSFunction(visitor);
     }
-#endif
 
     inline bool EventTarget::isFiringEventListeners()
     {
index d2c0b50..d27a374 100644 (file)
 #include "InspectorController.h"
 #endif
 
-#if USE(JSC)
 #include <runtime/JSGlobalData.h>
 #include <runtime/Operations.h>
-#endif
 
 #if ENABLE(MICRODATA)
 #include "HTMLPropertiesCollection.h"
index eae9149..538a7fb 100644 (file)
 #include <wtf/ListHashSet.h>
 #include <wtf/text/AtomicString.h>
 
-#if USE(JSC)
 namespace JSC {
     class JSGlobalData;
     class SlotVisitor;
 }
-#endif
 
 // This needs to be here because Document.h also depends on it.
 #define DUMP_NODE_STATISTICS 0
index f4757f3..7facd95 100644 (file)
 #include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
 
-#if USE(JSC)
 // FIXME: This is a layering violation.
 #include "JSDOMWindow.h"
-#endif
 
 #if ENABLE(SQL_DATABASE)
 #include "DatabaseContext.h"
@@ -411,7 +409,6 @@ ScriptExecutionContext::Task::~Task()
 {
 }
 
-#if USE(JSC)
 JSC::JSGlobalData* ScriptExecutionContext::globalData()
 {
      if (isDocument())
@@ -425,7 +422,6 @@ JSC::JSGlobalData* ScriptExecutionContext::globalData()
     ASSERT_NOT_REACHED();
     return 0;
 }
-#endif
 
 #if ENABLE(SQL_DATABASE)
 void ScriptExecutionContext::setDatabaseContext(DatabaseContext* databaseContext)
index 9f19a3e..0d962bc 100644 (file)
@@ -35,6 +35,7 @@
 #include "ScriptState.h"
 #include "SecurityContext.h"
 #include "Supplementable.h"
+#include <runtime/JSGlobalData.h>
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
 #include <wtf/Noncopyable.h>
 #include <wtf/Threading.h>
 #include <wtf/text/StringHash.h>
 
-#if USE(JSC)
-#include <runtime/JSGlobalData.h>
-#endif
-
 namespace WebCore {
 
 class CachedScript;
@@ -147,9 +144,7 @@ public:
     void removeTimeout(int timeoutId) { m_timeouts.remove(timeoutId); }
     DOMTimer* findTimeout(int timeoutId) { return m_timeouts.get(timeoutId); }
 
-#if USE(JSC)
     JSC::JSGlobalData* globalData();
-#endif
 
     // Interval is in seconds.
     void adjustMinimumTimerInterval(double oldMinimumTimerInterval);
index 753dc8a..fab875e 100644 (file)
 #include <math.h>
 #include <stdio.h>
 
-#if USE(JSC)
 #include <runtime/JSLock.h>
 #include <runtime/Operations.h>
-#endif
 
 #if ENABLE(WEBGL)    
 #include "WebGLContextAttributes.h"
@@ -565,11 +563,9 @@ void HTMLCanvasElement::createImageBuffer() const
     m_imageBuffer->context()->setStrokeThickness(1);
     m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer->context()));
 
-#if USE(JSC)
     JSC::JSLockHolder lock(scriptExecutionContext()->globalData());
     size_t numBytes = 4 * m_imageBuffer->internalSize().width() * m_imageBuffer->internalSize().height();
     scriptExecutionContext()->globalData()->heap.reportExtraMemoryCost(numBytes);
-#endif
 
 #if USE(IOSURFACE_CANVAS_BACKING_STORE) || (ENABLE(ACCELERATED_2D_CANVAS) && USE(ACCELERATED_COMPOSITING))
     if (m_context && m_context->is2d())
index a3a34a1..623cebc 100644 (file)
 #include "HTMLParserIdioms.h"
 #include "Settings.h"
 
-#if USE(JSC)
 #include "JSDOMWindowBase.h"
 #include <runtime/JSLock.h>
 #include <runtime/Operations.h>
-#endif
 
 namespace WebCore {
 
@@ -79,7 +77,6 @@ void HTMLImageLoader::notifyFinished(CachedResource*)
     ImageLoader::notifyFinished(cachedImage);
 
     bool loadError = cachedImage->errorOccurred() || cachedImage->response().httpStatusCode() >= 400;
-#if USE(JSC)
     if (!loadError) {
         if (!element->inDocument()) {
             JSC::JSGlobalData* globalData = JSDOMWindowBase::commonJSGlobalData();
@@ -87,7 +84,6 @@ void HTMLImageLoader::notifyFinished(CachedResource*)
             globalData->heap.reportExtraMemoryCost(cachedImage->encodedSize());
         }
     }
-#endif
 
     if (loadError && element->hasTagName(HTMLNames::objectTag))
         static_cast<HTMLObjectElement*>(element.get())->renderFallbackContent();
index 9372c2f..29bf8dd 100644 (file)
@@ -105,11 +105,7 @@ public:
     void getEventListenersImpl(Node*, Vector<EventListenerInfo>& listenersArray);
 
     // FIXME: Remove evaluateReturnsEvalFunction once InjectedScriptHost returns eval in evaluate on V8. https://webkit.org/b/113134
-#if USE(JSC)
     bool evaluateReturnsEvalFunction() { return true; }
-#else
-    bool evaluateReturnsEvalFunction() { return false; }
-#endif
 
     void clearConsoleMessages();
     void copyText(const String& text);
index 308e6f2..0574958 100644 (file)
@@ -908,7 +908,7 @@ void InspectorInstrumentation::didCommitLoadImpl(InstrumentingAgents* instrument
 
         if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())
             resourceAgent->mainFrameNavigated(loader);
-#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
         if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent())
             profilerAgent->resetState();
         if (InspectorHeapProfilerAgent* heapProfilerAgent = instrumentingAgents->inspectorHeapProfilerAgent())
index c1e2420..501f1e6 100644 (file)
 #include "CSSComputedStyleDeclaration.h"
 #include "CSSPropertyNames.h"
 #include "CachedCSSStyleSheet.h"
+#include "CachedResourceLoader.h"
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "DOMWindow.h"
-#include "CachedResourceLoader.h"
 #include "DocumentType.h"
 #include "EditorClient.h"
 #include "Event.h"
@@ -60,7 +60,9 @@
 #include "HitTestResult.h"
 #include "ImageBuffer.h"
 #include "InspectorInstrumentation.h"
+#include "JSDOMWindowShell.h"
 #include "Logging.h"
+#include "MathMLNames.h"
 #include "MediaFeatureNames.h"
 #include "Navigator.h"
 #include "NodeList.h"
@@ -75,6 +77,7 @@
 #include "RenderTheme.h"
 #include "RenderView.h"
 #include "RuntimeEnabledFeatures.h"
+#include "SVGNames.h"
 #include "ScriptController.h"
 #include "ScriptSourceCode.h"
 #include "ScriptValue.h"
 #include "UserTypingGestureIndicator.h"
 #include "VisibleUnits.h"
 #include "WebKitFontFamilyNames.h"
+#include "XLinkNames.h"
 #include "XMLNSNames.h"
 #include "XMLNames.h"
 #include "htmlediting.h"
 #include "markup.h"
 #include "npruntime_impl.h"
+#include "runtime_root.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefCountedLeakCounter.h>
 #include <wtf/StdLibExtras.h>
 #include "RenderLayerCompositor.h"
 #endif
 
-#if USE(JSC)
-#include "JSDOMWindowShell.h"
-#include "runtime_root.h"
-#endif
-
-#include "MathMLNames.h"
-#include "SVGNames.h"
-#include "XLinkNames.h"
-
 #if ENABLE(SVG)
 #include "SVGDocument.h"
 #include "SVGDocumentExtensions.h"
index 331a279..1876eb3 100644 (file)
@@ -107,9 +107,7 @@ bool Settings::gUsesOverlayScrollbars = false;
 bool Settings::gShouldUseHighResolutionTimers = true;
 #endif
     
-#if USE(JSC)
 bool Settings::gShouldRespectPriorityInCSSAttributeSetters = false;
-#endif
 
 // NOTEs
 //  1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well as QtWebKit when built on Mac;
@@ -595,7 +593,6 @@ bool Settings::usesOverlayScrollbars()
     return gUsesOverlayScrollbars;
 }
 
-#if USE(JSC)
 void Settings::setShouldRespectPriorityInCSSAttributeSetters(bool flag)
 {
     gShouldRespectPriorityInCSSAttributeSetters = flag;
@@ -605,7 +602,6 @@ bool Settings::shouldRespectPriorityInCSSAttributeSetters()
 {
     return gShouldRespectPriorityInCSSAttributeSetters;
 }
-#endif
 
 #if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
 void Settings::setHiddenPageDOMTimerThrottlingEnabled(bool flag)
index 2adaead..5c590aa 100644 (file)
@@ -259,10 +259,8 @@ namespace WebCore {
         void setAggressiveTileRetentionEnabled(bool);
         bool aggressiveTileRetentionEnabled() { return m_aggressiveTileRetentionEnabled; }
 
-#if USE(JSC)
         static void setShouldRespectPriorityInCSSAttributeSetters(bool);
         static bool shouldRespectPriorityInCSSAttributeSetters();
-#endif
 
         void setTimeWithoutMouseMovementBeforeHidingControls(double time) { m_timeWithoutMouseMovementBeforeHidingControls = time; }
         double timeWithoutMouseMovementBeforeHidingControls() const { return m_timeWithoutMouseMovementBeforeHidingControls; }
@@ -357,9 +355,7 @@ namespace WebCore {
 #if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
         static bool gShouldUseHighResolutionTimers;
 #endif
-#if USE(JSC)
         static bool gShouldRespectPriorityInCSSAttributeSetters;
-#endif
 
         static double gHiddenPageDOMTimerAlignmentInterval;
     };
index c1587ea..864b3f3 100644 (file)
@@ -28,9 +28,7 @@
 #include "config.h"
 #include "PluginView.h"
 
-#if USE(JSC)
 #include "BridgeJSC.h"
-#endif
 #include "Chrome.h"
 #include "CookieJar.h"
 #include "Document.h"
@@ -47,6 +45,8 @@
 #include "HTMLNames.h"
 #include "HTMLPlugInElement.h"
 #include "Image.h"
+#include "JSDOMBinding.h"
+#include "JSDOMWindow.h"
 #include "KeyboardEvent.h"
 #include "MIMETypeRegistry.h"
 #include "MouseEvent.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
 #include "WheelEvent.h"
+#include "c_instance.h"
 #include "npruntime_impl.h"
+#include "runtime_root.h"
+#include <runtime/JSCJSValue.h>
+#include <runtime/JSLock.h>
 #include <wtf/ASCIICType.h>
 #include <wtf/text/WTFString.h>
 
 #include "PluginMessageThrottlerWin.h"
 #endif
 
-#if USE(JSC)
-#include "JSDOMBinding.h"
-#include "JSDOMWindow.h"
-#include "c_instance.h"
-#include "runtime_root.h"
-#include <runtime/JSCJSValue.h>
-#include <runtime/JSLock.h>
-
 using JSC::ExecState;
 using JSC::JSLock;
 using JSC::JSObject;
 using JSC::JSValue;
-#endif
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
 
@@ -250,9 +245,7 @@ bool PluginView::start()
     NPError npErr;
     {
         PluginView::setCurrentPluginView(this);
-#if USE(JSC)
         JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
         setCallingPlugin(true);
         npErr = m_plugin->pluginFuncs()->newp((NPMIMEType)m_mimeType.utf8().data(), m_instance, m_mode, m_paramCount, m_paramNames, m_paramValues, NULL);
         setCallingPlugin(false);
@@ -340,9 +333,7 @@ void PluginView::stop()
 
     m_isStarted = false;
 
-#if USE(JSC)
     JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
 #if defined(XP_WIN) && !PLATFORM(GTK)
@@ -459,9 +450,7 @@ void PluginView::performRequest(PluginRequest* request)
             // FIXME: <rdar://problem/4807469> This should be sent when the document has finished loading
             if (request->sendNotification()) {
                 PluginView::setCurrentPluginView(this);
-#if USE(JSC)
                 JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
                 setCallingPlugin(true);
                 m_plugin->pluginFuncs()->urlnotify(m_instance, requestURL.string().utf8().data(), NPRES_DONE, request->notifyData());
                 setCallingPlugin(false);
@@ -482,11 +471,7 @@ void PluginView::performRequest(PluginRequest* request)
     if (targetFrameName.isNull()) {
         String resultString;
 
-#if USE(JSC)
         ScriptState* scriptState = m_parentFrame->script()->globalObject(pluginWorld())->globalExec();
-#elif USE(V8)
-        ScriptState* scriptState = 0; // Not used with V8
-#endif
         CString cstr;
         if (result.getString(scriptState, resultString))
             cstr = resultString.utf8();
@@ -749,9 +734,7 @@ NPObject* PluginView::npObject()
     NPError npErr;
     {
         PluginView::setCurrentPluginView(this);
-#if USE(JSC)
         JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
         setCallingPlugin(true);
         npErr = m_plugin->pluginFuncs()->getvalue(m_instance, NPPVpluginScriptableNPObject, &object);
         setCallingPlugin(false);
@@ -765,7 +748,6 @@ NPObject* PluginView::npObject()
 }
 #endif
 
-#if USE(JSC)
 PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance()
 {
 #if ENABLE(NETSCAPE_PLUGIN_API)
@@ -790,7 +772,6 @@ PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance()
     return 0;
 #endif
 }
-#endif
 
 void PluginView::disconnectStream(PluginStream* stream)
 {
@@ -1525,9 +1506,7 @@ void PluginView::privateBrowsingStateChanged(bool privateBrowsingEnabled)
         return;
 
     PluginView::setCurrentPluginView(this);
-#if USE(JSC)
     JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
     setCallingPlugin(true);
     NPBool value = privateBrowsingEnabled;
     setValue(m_instance, NPNVprivateModeBool, &value);
index 7e76040..04944a8 100644 (file)
@@ -75,13 +75,11 @@ QT_END_NAMESPACE
 typedef struct _GtkSocket GtkSocket;
 #endif
 
-#if USE(JSC)
 namespace JSC {
     namespace Bindings {
         class Instance;
     }
 }
-#endif
 
 namespace WebCore {
     class Frame;
@@ -156,9 +154,7 @@ namespace WebCore {
 #if ENABLE(NETSCAPE_PLUGIN_API)
         NPObject* npObject();
 #endif
-#if USE(JSC)
         PassRefPtr<JSC::Bindings::Instance> bindingInstance();
-#endif
 
         PluginStatus status() const { return m_status; }
 
index 311c9cc..b60fa92 100644 (file)
 #include "Widget.h"
 #include <wtf/text/WTFString.h>
 
-#if USE(V8)
-struct NPObject;
-#endif
-#if USE(JSC)
 namespace JSC {
     class ExecState;
     class JSGlobalObject;
     class JSObject;
 }
-#endif
 
 namespace WebCore {
 
@@ -53,12 +48,7 @@ public:
     virtual PlatformLayer* platformLayer() const { return 0; }
 #endif
 
-#if USE(V8)
-    virtual NPObject* scriptableObject() { return 0; }
-#endif
-#if USE(JSC)
     virtual JSC::JSObject* scriptObject(JSC::JSGlobalObject*) { return 0; }
-#endif
     virtual void storageBlockingStateChanged() { }
     virtual void privateBrowsingStateChanged(bool) { }
     virtual bool getFormValue(String&) { return false; }
index 93cc6cf..ed8f890 100644 (file)
 #include "config.h"
 #include "PluginView.h"
 
-#if USE(JSC)
 #include "BridgeJSC.h"
 #include <runtime/JSObject.h>
-#endif
 
 using namespace WTF;
 
@@ -141,12 +139,10 @@ void PluginView::keepAlive(NPP)
 }
 #endif
 
-#if USE(JSC)
 PassRefPtr<JSC::Bindings::Instance> PluginView::bindingInstance()
 {
     return 0;
 }
-#endif
 
 void PluginView::privateBrowsingStateChanged(bool)
 {
index e419008..e64c914 100644 (file)
@@ -28,9 +28,7 @@
 #include "config.h"
 #include "PluginView.h"
 
-#if USE(JSC)
 #include "BridgeJSC.h"
-#endif
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "Document.h"
@@ -49,9 +47,7 @@
 #include "HostWindow.h"
 #include "IFrameShimSupport.h"
 #include "Image.h"
-#if USE(JSC)
 #include "JSDOMBinding.h"
-#endif
 #include "KeyboardEvent.h"
 #include "MouseEvent.h"
 #include "NotImplemented.h"
@@ -65,9 +61,7 @@
 #include "RenderObject.h"
 #include "Settings.h"
 #include "npruntime_impl.h"
-#if USE(JSC)
 #include "runtime_root.h"
-#endif
 #include <QKeyEvent>
 #include <QPainter>
 #include <X11/X.h>
@@ -85,9 +79,7 @@
 #include <qpa/qplatformnativeinterface.h>
 
 using JSC::ExecState;
-#if USE(JSC)
 using JSC::Interpreter;
-#endif
 using JSC::JSLock;
 using JSC::JSObject;
 
@@ -281,9 +273,7 @@ bool PluginView::dispatchNPEvent(NPEvent& event)
     }
 
     PluginView::setCurrentPluginView(this);
-#if USE(JSC)
     JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
     setCallingPlugin(true);
     bool accepted = !m_plugin->pluginFuncs()->event(m_instance, &event);
     setCallingPlugin(false);
@@ -566,9 +556,7 @@ void PluginView::setNPWindowIfNeeded()
     }
 
     PluginView::setCurrentPluginView(this);
-#if USE(JSC)
     JSC::JSLock::DropAllLocks dropAllLocks(JSDOMWindowBase::commonJSGlobalData());
-#endif
     setCallingPlugin(true);
     m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow);
     setCallingPlugin(false);
index 1f0fe29..779544f 100644 (file)
@@ -40,6 +40,8 @@
 #include "HTTPParsers.h"
 #include "HistogramSupport.h"
 #include "InspectorInstrumentation.h"
+#include "JSDOMBinding.h"
+#include "JSDOMWindow.h"
 #include "MemoryCache.h"
 #include "ParsedContentType.h"
 #include "ResourceError.h"
@@ -56,6 +58,9 @@
 #include "XMLHttpRequestProgressEvent.h"
 #include "XMLHttpRequestUpload.h"
 #include "markup.h"
+#include <heap/Strong.h>
+#include <runtime/JSLock.h>
+#include <runtime/Operations.h>
 #include <wtf/ArrayBuffer.h>
 #include <wtf/ArrayBufferView.h>
 #include <wtf/RefCountedLeakCounter.h>
 #include "CachedResourceRequestInitiators.h"
 #endif
 
-#if USE(JSC)
-#include "JSDOMBinding.h"
-#include "JSDOMWindow.h"
-#include <heap/Strong.h>
-#include <runtime/JSLock.h>
-#include <runtime/Operations.h>
-#endif
-
 namespace WebCore {
 
 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, xmlHttpRequestCounter, ("XMLHttpRequest"));
@@ -936,7 +933,6 @@ void XMLHttpRequest::abortError()
 
 void XMLHttpRequest::dropProtection()
 {
-#if USE(JSC)
     // The XHR object itself holds on to the responseText, and
     // thus has extra cost even independent of any
     // responseText or responseXML objects it has handed
@@ -946,7 +942,6 @@ void XMLHttpRequest::dropProtection()
     JSC::JSGlobalData* globalData = scriptExecutionContext()->globalData();
     JSC::JSLockHolder lock(globalData);
     globalData->heap.reportExtraMemoryCost(m_responseBuilder.length() * 2);
-#endif
 
     unsetPendingActivity(this);
 }
index 4686672..6bd1fc4 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_script_execute):
+
 2013-04-04  Christophe Dumez  <ch.dumez@sisa.samsung.com>
 
         [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo
index 44904b8..5d4f1e6 100644 (file)
@@ -446,7 +446,6 @@ const char* ewk_frame_script_execute(Evas_Object* ewkFrame, const char* script)
     EINA_SAFETY_ON_NULL_RETURN_VAL(smartData->frame, 0);
     EINA_SAFETY_ON_NULL_RETURN_VAL(script, 0);
 
-#if USE(JSC)
     WTF::String resultString;
     JSC::JSValue result = smartData->frame->script()->executeScript(WTF::String::fromUTF8(script), true).jsValue();
 
@@ -460,10 +459,6 @@ const char* ewk_frame_script_execute(Evas_Object* ewkFrame, const char* script)
     JSC::JSLockHolder lock(exec);
     resultString = result.toString(exec)->value(exec);
     return eina_stringshare_add(resultString.utf8().data());
-#else
-    notImplemented();
-    return 0;
-#endif
 }
 
 Eina_Bool ewk_frame_editable_get(const Evas_Object* ewkFrame)
index 7a44813..afeb5bb 100644 (file)
@@ -32,9 +32,7 @@ using namespace WebCore;
 */
 QWebScriptWorld::QWebScriptWorld()
 {
-#if USE(JSC)
     d = new QWebScriptWorldPrivate(ScriptController::createWorld());
-#endif
 }
 
 QWebScriptWorld::QWebScriptWorld(const QWebScriptWorld& other)
index 43aa4ed..50acb3b 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * Api/qwebscriptworld.cpp:
+        (QWebScriptWorld::QWebScriptWorld):
+
 2013-04-04  Sze Howe Koh  <szehowe.koh@gmail.com>
 
         [Qt] docs: Fix module name format
index c685688..7ae3b30 100644 (file)
@@ -1,3 +1,14 @@
+2013-04-05  Geoffrey Garen  <ggaren@apple.com>
+
+        Made USE(JSC) unconditional
+        https://bugs.webkit.org/show_bug.cgi?id=114058
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/linux/WebMemorySamplerLinux.cpp:
+        (WebKit::WebMemorySampler::sampleWebKit):
+        * config.h:
+
 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
 
         [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING)
index a7d3ccb..519c8a7 100644 (file)
@@ -154,7 +154,6 @@ WebMemoryStatistics WebMemorySampler::sampleWebKit() const
     appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Fast Malloc Committed Memory"), fastMallocBytesCommitted);
 #endif
 
-#if USE(JSC)
     size_t jscHeapBytesInUse = JSDOMWindow::commonJSGlobalData()->heap.size();
     size_t jscHeapBytesCommitted = JSDOMWindow::commonJSGlobalData()->heap.capacity();
     totalBytesInUse += jscHeapBytesInUse;
@@ -169,7 +168,6 @@ WebMemoryStatistics WebMemorySampler::sampleWebKit() const
     
     appendKeyValuePair(webKitMemoryStats, ASCIILiteral("JavaScript Stack Bytes"), globalMemoryStats.stackBytes);
     appendKeyValuePair(webKitMemoryStats, ASCIILiteral("JavaScript JIT Bytes"), globalMemoryStats.JITBytes);
-#endif
 
     appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Total Memory In Use"), totalBytesInUse);
     appendKeyValuePair(webKitMemoryStats, ASCIILiteral("Total Committed Memory"), totalBytesCommitted);
index 77b9a21..4bf2bd8 100644 (file)
 #include "cmakeconfig.h"
 #endif
 
+#include <runtime/JSExportMacros.h>
 #include <wtf/DisallowCType.h>
 #include <wtf/Platform.h>
 #include <wtf/ExportMacros.h>
-#if USE(JSC)
-#include <runtime/JSExportMacros.h>
-#endif
 
 #ifdef __cplusplus
 #ifndef EXTERN_C_BEGIN