[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:16:26 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 96fb852ac1becf83e2ba97dbacd11c2a2d438384
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 10 02:02:30 2010 +0000

    2010-02-09  Mikhail Naganov  <mnaganov at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs.
            Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required
            for really enabling it in V8 bindings generation.
    
            https://bugs.webkit.org/show_bug.cgi?id=34706
    
            * inspector/InjectedScriptHost.idl:
            * inspector/InspectorBackend.cpp:
            (WebCore::InspectorBackend::currentCallFrame):
            (WebCore::InspectorBackend::getProfile):
            * inspector/InspectorBackend.h:
            * inspector/InspectorBackend.idl:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::InspectorController):
            (WebCore::InspectorController::addProfile):
            (WebCore::InspectorController::getProfile):
            (WebCore::InspectorController::startUserInitiatedProfiling):
            (WebCore::InspectorController::stopUserInitiatedProfiling):
            (WebCore::InspectorController::enableProfiler):
            (WebCore::InspectorController::disableProfiler):
            * inspector/InspectorController.h:
            * inspector/InspectorFrontend.cpp:
            (WebCore::InspectorFrontend::pausedScript):
            (WebCore::InspectorFrontend::resumedScript):
            (WebCore::InspectorFrontend::profilerWasEnabled):
            (WebCore::InspectorFrontend::profilerWasDisabled):
            (WebCore::InspectorFrontend::didGetProfile):
            * inspector/InspectorFrontend.h:
            * page/Console.idl:
    2010-02-09  Mikhail Naganov  <mnaganov at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs.
            Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required
            for really enabling it in V8 bindings generation.
    
            https://bugs.webkit.org/show_bug.cgi?id=34706
    
            * features.gypi:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54576 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 077d118..a096caa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,37 @@
+2010-02-09  Mikhail Naganov  <mnaganov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs.
+        Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required
+        for really enabling it in V8 bindings generation.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34706
+
+        * inspector/InjectedScriptHost.idl:
+        * inspector/InspectorBackend.cpp:
+        (WebCore::InspectorBackend::currentCallFrame):
+        (WebCore::InspectorBackend::getProfile):
+        * inspector/InspectorBackend.h:
+        * inspector/InspectorBackend.idl:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        (WebCore::InspectorController::addProfile):
+        (WebCore::InspectorController::getProfile):
+        (WebCore::InspectorController::startUserInitiatedProfiling):
+        (WebCore::InspectorController::stopUserInitiatedProfiling):
+        (WebCore::InspectorController::enableProfiler):
+        (WebCore::InspectorController::disableProfiler):
+        * inspector/InspectorController.h:
+        * inspector/InspectorFrontend.cpp:
+        (WebCore::InspectorFrontend::pausedScript):
+        (WebCore::InspectorFrontend::resumedScript):
+        (WebCore::InspectorFrontend::profilerWasEnabled):
+        (WebCore::InspectorFrontend::profilerWasDisabled):
+        (WebCore::InspectorFrontend::didGetProfile):
+        * inspector/InspectorFrontend.h:
+        * page/Console.idl:
+
 2010-02-09  Gavin Barraclough  <barraclough at apple.com>
 
         Rubber Stamped by Geoff Garen.
diff --git a/WebCore/inspector/InjectedScriptHost.idl b/WebCore/inspector/InjectedScriptHost.idl
index 73a36fd..bb57c3a 100644
--- a/WebCore/inspector/InjectedScriptHost.idl
+++ b/WebCore/inspector/InjectedScriptHost.idl
@@ -41,7 +41,7 @@ module core {
         void addNodesToSearchResult(in DOMString nodeIds);
         long pushNodeByPathToFrontend(in DOMString path);
 
-#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING)
         [Custom] DOMObject currentCallFrame();
         [Custom] boolean isActivation(in DOMObject object);
 #endif
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 5e3a910..c43be63 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -222,6 +222,13 @@ void InspectorBackend::setPauseOnExceptionsState(long pauseState)
     JavaScriptDebugServer::shared().setPauseOnExceptionsState(static_cast<JavaScriptDebugServer::PauseOnExceptionsState>(pauseState));
 }
 
+JavaScriptCallFrame* InspectorBackend::currentCallFrame() const
+{
+    return JavaScriptDebugServer::shared().currentCallFrame();
+}
+#endif
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
 bool InspectorBackend::profilerEnabled()
 {
     if (m_inspectorController)
@@ -264,11 +271,6 @@ void InspectorBackend::getProfile(long callId, unsigned uid)
     if (m_inspectorController)
         m_inspectorController->getProfile(callId, uid);
 }
-
-JavaScriptCallFrame* InspectorBackend::currentCallFrame() const
-{
-    return JavaScriptDebugServer::shared().currentCallFrame();
-}
 #endif
 
 void InspectorBackend::setInjectedScriptSource(const String& source)
diff --git a/WebCore/inspector/InspectorBackend.h b/WebCore/inspector/InspectorBackend.h
index 7c9644f..0df13f5 100644
--- a/WebCore/inspector/InspectorBackend.h
+++ b/WebCore/inspector/InspectorBackend.h
@@ -92,6 +92,9 @@ public:
     void stepIntoStatementInDebugger();
     void stepOutOfFunctionInDebugger();
 
+    JavaScriptCallFrame* currentCallFrame() const;
+#endif
+#if ENABLE(JAVASCRIPT_DEBUGGER)
     bool profilerEnabled();
     void enableProfiler(bool always);
     void disableProfiler(bool always);
@@ -101,8 +104,6 @@ public:
 
     void getProfileHeaders(long callId);
     void getProfile(long callId, unsigned uid);
-
-    JavaScriptCallFrame* currentCallFrame() const;
 #endif
 
     void setInjectedScriptSource(const String& source);
diff --git a/WebCore/inspector/InspectorBackend.idl b/WebCore/inspector/InspectorBackend.idl
index 043a9f5..9faae76 100644
--- a/WebCore/inspector/InspectorBackend.idl
+++ b/WebCore/inspector/InspectorBackend.idl
@@ -47,7 +47,7 @@ module core {
         void startTimelineProfiler();
         void stopTimelineProfiler();
 
-#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING)
         boolean debuggerEnabled();
         void enableDebugger(in boolean always);
         void disableDebugger(in boolean always);
@@ -65,7 +65,8 @@ module core {
 
         long pauseOnExceptionsState();
         void setPauseOnExceptionsState(in long pauseOnExceptionsState);
-
+#endif
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
         boolean profilerEnabled();
         void enableProfiler(in boolean always);
         void disableProfiler(in boolean always);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 351c771..f9145e2 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -146,7 +146,9 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
     , m_debuggerEnabled(false)
     , m_attachDebuggerWhenShown(false)
-    , m_profilerEnabled(false)
+#endif
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+    , m_profilerEnabled(!WTF_USE_JSC)
     , m_recordingUserInitiatedProfile(false)
     , m_currentUserInitiatedProfileNumber(-1)
     , m_nextUserInitiatedProfileNumber(1)
@@ -1342,7 +1344,7 @@ void InspectorController::moveWindowBy(float x, float y) const
     m_page->chrome()->setWindowRect(frameRect);
 }
 
-#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
 void InspectorController::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL)
 {
     if (!enabled())
@@ -1352,7 +1354,9 @@ void InspectorController::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsig
     m_profiles.add(profile->uid(), profile);
 
     if (m_frontend) {
+#if USE(JSC)
         JSLock lock(SilenceAssertionsOnly);
+#endif
         m_frontend->addProfileHeader(createProfileHeader(*profile));
     }
 
@@ -1390,8 +1394,10 @@ void InspectorController::getProfile(long callId, unsigned uid)
     if (!m_frontend)
         return;
     ProfilesMap::iterator it = m_profiles.find(uid);
+#if USE(JSC)
     if (it != m_profiles.end())
         m_frontend->didGetProfile(callId, toJS(m_frontendScriptState, it->second.get()));
+#endif
 }
 
 ScriptObject InspectorController::createProfileHeader(const ScriptProfile& profile)
@@ -1423,14 +1429,20 @@ void InspectorController::startUserInitiatedProfiling(Timer<InspectorController>
 
     if (!profilerEnabled()) {
         enableProfiler(false, true);
+#if USE(JSC)
         JavaScriptDebugServer::shared().recompileAllJSFunctions();
+#endif
     }
 
     m_recordingUserInitiatedProfile = true;
 
     String title = getCurrentUserInitiatedProfileName(true);
 
+#if USE(JSC)
     ExecState* scriptState = toJSDOMWindow(m_inspectedPage->mainFrame(), debuggerWorld())->globalExec();
+#else
+    ScriptState* scriptState = 0;
+#endif
     ScriptProfiler::start(scriptState, title);
 
     addStartProfilingMessageToConsole(title, 0, String());
@@ -1447,7 +1459,11 @@ void InspectorController::stopUserInitiatedProfiling()
 
     String title = getCurrentUserInitiatedProfileName();
 
+#if USE(JSC)
     ExecState* scriptState = toJSDOMWindow(m_inspectedPage->mainFrame(), debuggerWorld())->globalExec();
+#else
+    ScriptState* scriptState = 0;
+#endif
     RefPtr<ScriptProfile> profile = ScriptProfiler::stop(scriptState, title);
     if (profile)
         addProfile(profile, 0, String());
@@ -1472,8 +1488,10 @@ void InspectorController::enableProfiler(bool always, bool skipRecompile)
 
     m_profilerEnabled = true;
 
+#if USE(JSC)
     if (!skipRecompile)
         JavaScriptDebugServer::shared().recompileAllJSFunctionsSoon();
+#endif
 
     if (m_frontend)
         m_frontend->profilerWasEnabled();
@@ -1489,12 +1507,16 @@ void InspectorController::disableProfiler(bool always)
 
     m_profilerEnabled = false;
 
+#if USE(JSC)
     JavaScriptDebugServer::shared().recompileAllJSFunctionsSoon();
+#endif
 
     if (m_frontend)
         m_frontend->profilerWasDisabled();
 }
+#endif
 
+#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
 void InspectorController::enableDebuggerFromFrontend(bool always)
 {
     if (always)
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 6904380..2f25eec 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -220,7 +220,7 @@ public:
 
     void markTimeline(const String& message); 
 
-#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
     void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
     void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
     void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
@@ -234,7 +234,9 @@ public:
     void enableProfiler(bool always = false, bool skipRecompile = false);
     void disableProfiler(bool always = false);
     bool profilerEnabled() const { return enabled() && m_profilerEnabled; }
+#endif
 
+#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
     void enableDebugger();
     void disableDebugger(bool always = false);
     bool debuggerEnabled() const { return m_debuggerEnabled; }
@@ -268,7 +270,7 @@ private:
 
     void deleteCookie(const String& cookieName, const String& domain);
 
-#if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
+#if ENABLE(JAVASCRIPT_DEBUGGER)
     typedef HashMap<unsigned int, RefPtr<ScriptProfile> > ProfilesMap;
 
     void startUserInitiatedProfilingSoon();
@@ -349,6 +351,8 @@ private:
 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
     bool m_debuggerEnabled;
     bool m_attachDebuggerWhenShown;
+#endif
+#if ENABLE(JAVASCRIPT_DEBUGGER)
     bool m_profilerEnabled;
     bool m_recordingUserInitiatedProfile;
     int m_currentUserInitiatedProfileNumber;
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 1bce1f3..90b60f4 100755
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -266,16 +266,6 @@ void InspectorFrontend::debuggerWasDisabled()
     callSimpleFunction("debuggerWasDisabled");
 }
 
-void InspectorFrontend::profilerWasEnabled()
-{
-    callSimpleFunction("profilerWasEnabled");
-}
-
-void InspectorFrontend::profilerWasDisabled()
-{
-    callSimpleFunction("profilerWasDisabled");
-}
-
 void InspectorFrontend::parsedScriptSource(const JSC::SourceCode& source)
 {
     ScriptFunctionCall function(m_webInspector, "dispatch"); 
@@ -299,6 +289,32 @@ void InspectorFrontend::failedToParseScriptSource(const JSC::SourceCode& source,
     function.call();
 }
 
+void InspectorFrontend::pausedScript(SerializedScriptValue* callFrames)
+{
+    ScriptValue callFramesValue = ScriptValue::deserialize(scriptState(), callFrames);
+    ScriptFunctionCall function(m_webInspector, "dispatch");
+    function.appendArgument("pausedScript");
+    function.appendArgument(callFramesValue);
+    function.call();
+}
+
+void InspectorFrontend::resumedScript()
+{
+    callSimpleFunction("resumedScript");
+}
+#endif
+
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+void InspectorFrontend::profilerWasEnabled()
+{
+    callSimpleFunction("profilerWasEnabled");
+}
+
+void InspectorFrontend::profilerWasDisabled()
+{
+    callSimpleFunction("profilerWasDisabled");
+}
+
 void InspectorFrontend::addProfileHeader(const ScriptValue& profile)
 {
     ScriptFunctionCall function(m_webInspector, "dispatch"); 
@@ -332,20 +348,6 @@ void InspectorFrontend::didGetProfile(int callId, const ScriptValue& profile)
     function.appendArgument(profile);
     function.call();
 }
-
-void InspectorFrontend::pausedScript(SerializedScriptValue* callFrames)
-{
-    ScriptValue callFramesValue = ScriptValue::deserialize(scriptState(), callFrames);
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("pausedScript");
-    function.appendArgument(callFramesValue);
-    function.call();
-}
-
-void InspectorFrontend::resumedScript()
-{
-    callSimpleFunction("resumedScript");
-}
 #endif
 
 void InspectorFrontend::setDocument(const ScriptObject& root)
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index c3d1212..1a37256 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -88,16 +88,18 @@ namespace WebCore {
         void attachDebuggerWhenShown();
         void debuggerWasEnabled();
         void debuggerWasDisabled();
-        void profilerWasEnabled();
-        void profilerWasDisabled();
         void parsedScriptSource(const JSC::SourceCode&);
         void failedToParseScriptSource(const JSC::SourceCode&, int errorLine, const JSC::UString& errorMessage);
+        void pausedScript(SerializedScriptValue* callFrames);
+        void resumedScript();
+#endif
+#if ENABLE(JAVASCRIPT_DEBUGGER)
+        void profilerWasEnabled();
+        void profilerWasDisabled();
         void addProfileHeader(const ScriptValue& profile);
         void setRecordingProfile(bool isProfiling);
         void didGetProfileHeaders(int callId, const ScriptArray& headers);
         void didGetProfile(int callId, const ScriptValue& profile);
-        void pausedScript(SerializedScriptValue* callFrames);
-        void resumedScript();
 #endif
 
 #if ENABLE(DATABASE)
diff --git a/WebCore/page/Console.idl b/WebCore/page/Console.idl
index b3c0c24..c08fcc0 100644
--- a/WebCore/page/Console.idl
+++ b/WebCore/page/Console.idl
@@ -30,7 +30,8 @@ module window {
 
     interface [OmitConstructor] Console {
 
-#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
+        // Not enabled in V8 because it requires request-reply style.
+#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING)
         readonly attribute [CustomGetter] Array profiles;
 #endif
     
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 383ccd4..5d7ef52 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-09  Mikhail Naganov  <mnaganov at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs.
+        Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required
+        for really enabling it in V8 bindings generation.
+
+        https://bugs.webkit.org/show_bug.cgi?id=34706
+
+        * features.gypi:
+
 2010-02-09  Jian Li  <jianli at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 7465fb1..29e3130 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -47,6 +47,7 @@
         'ENABLE_DASHBOARD_SUPPORT=0',
         'ENABLE_DOM_STORAGE=1',
         'ENABLE_GEOLOCATION=1',
+        'ENABLE_JAVASCRIPT_DEBUGGER=1',
         'ENABLE_JSC_MULTIPLE_THREADS=0',
         'ENABLE_ICONDATABASE=0',
         'ENABLE_INDEXED_DATABASE=1',

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list