Title: [132978] trunk/Source/WebKit
Revision
132978
Author
[email protected]
Date
2012-10-30 19:50:30 -0700 (Tue, 30 Oct 2012)

Log Message

[BlackBerry] Clean the code of "_javascript_DebuggerBlackBerry"
https://bugs.webkit.org/show_bug.cgi?id=100724

Patch by Peter Wang <[email protected]> on 2012-10-30
Reviewed by Rob Buis.

Remove the code of _javascript_DebuggerBlackBerry.

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

* Api/WebPage.cpp:
* Api/WebPage.h:
* Api/WebPage_p.h:
(WebCore):
(WebPagePrivate):
* WebCoreSupport/_javascript_DebuggerBlackBerry.cpp: Removed.
* WebCoreSupport/_javascript_DebuggerBlackBerry.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (132977 => 132978)


--- trunk/Source/WebKit/ChangeLog	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/ChangeLog	2012-10-31 02:50:30 UTC (rev 132978)
@@ -1,3 +1,14 @@
+2012-10-30  Peter Wang  <[email protected]>
+
+        [BlackBerry] Clean the code of "_javascript_DebuggerBlackBerry"
+        https://bugs.webkit.org/show_bug.cgi?id=100724
+
+        Reviewed by Rob Buis.
+
+        Remove the code of _javascript_DebuggerBlackBerry.
+
+        * PlatformBlackBerry.cmake:
+
 2012-10-28  Mark Rowe  <[email protected]>
 
         Remove references to unsupported OS and Xcode versions.

Modified: trunk/Source/WebKit/PlatformBlackBerry.cmake (132977 => 132978)


--- trunk/Source/WebKit/PlatformBlackBerry.cmake	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/PlatformBlackBerry.cmake	2012-10-31 02:50:30 UTC (rev 132978)
@@ -112,7 +112,6 @@
     blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp
     blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
     blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
-    blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.cpp
     blackberry/WebCoreSupport/NetworkInfoClientBlackBerry.cpp
     blackberry/WebCoreSupport/NotificationPresenterImpl.cpp
     blackberry/WebCoreSupport/PagePopupBlackBerry.cpp

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (132977 => 132978)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-10-31 02:50:30 UTC (rev 132978)
@@ -81,7 +81,6 @@
 #include "InspectorController.h"
 #include "InspectorInstrumentation.h"
 #include "InspectorOverlay.h"
-#include "_javascript_DebuggerBlackBerry.h"
 #include "_javascript_Variant_p.h"
 #include "LayerWebKitThread.h"
 #if ENABLE(NETWORK_INFO)
@@ -4888,108 +4887,6 @@
 #endif
 }
 
-bool WebPage::enableScriptDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        return true;
-
-    d->m_scriptDebugger = adoptPtr(new _javascript_DebuggerBlackBerry(this->d));
-
-    return !!d->m_scriptDebugger;
-#endif
-}
-
-bool WebPage::disableScriptDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (!d->m_scriptDebugger)
-        return true;
-
-    d->m_scriptDebugger.clear();
-    return true;
-#endif
-}
-
-void WebPage::addBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength)
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->addBreakpoint(url, urlLength, lineNumber, condition, conditionLength);
-#endif
-}
-
-void WebPage::updateBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength)
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->updateBreakpoint(url, urlLength, lineNumber, condition, conditionLength);
-#endif
-}
-
-void WebPage::removeBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber)
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->removeBreakpoint(url, urlLength, lineNumber);
-#endif
-}
-
-bool WebPage::pauseOnExceptions()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    return d->m_scriptDebugger ? d->m_scriptDebugger->pauseOnExceptions() : false;
-#endif
-}
-
-void WebPage::setPauseOnExceptions(bool pause)
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->setPauseOnExceptions(pause);
-#endif
-}
-
-void WebPage::pauseInDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->pauseInDebugger();
-#endif
-}
-
-void WebPage::resumeDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->resumeDebugger();
-#endif
-}
-
-void WebPage::stepOverStatementInDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->stepOverStatementInDebugger();
-#endif
-}
-
-void WebPage::stepIntoStatementInDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->stepIntoStatementInDebugger();
-#endif
-}
-
-void WebPage::stepOutOfFunctionInDebugger()
-{
-#if ENABLE(_javascript__DEBUGGER)
-    if (d->m_scriptDebugger)
-        d->m_scriptDebugger->stepOutOfFunctionInDebugger();
-#endif
-}
-
 unsigned WebPage::timeoutForJavaScriptExecution() const
 {
     return Settings::timeoutForJavaScriptExecution(d->m_page->groupName());

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.h (132977 => 132978)


--- trunk/Source/WebKit/blackberry/Api/WebPage.h	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.h	2012-10-31 02:50:30 UTC (rev 132978)
@@ -228,27 +228,9 @@
     // Case sensitivity, wrapping, and highlighting all matches are also toggleable.
     bool findNextString(const char*, bool forward, bool caseSensitive, bool wrap, bool highlightAllMatches);
 
-    // _javascript_Debugger interface.
-    bool enableScriptDebugger();
-    bool disableScriptDebugger();
-
     JSContextRef scriptContext() const;
     JSValueRef windowObject() const;
 
-    void addBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength);
-    void updateBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength);
-    void removeBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber);
-
-    bool pauseOnExceptions();
-    void setPauseOnExceptions(bool);
-
-    void pauseInDebugger();
-    void resumeDebugger();
-
-    void stepOverStatementInDebugger();
-    void stepIntoStatementInDebugger();
-    void stepOutOfFunctionInDebugger();
-
     unsigned timeoutForJavaScriptExecution() const;
     void setTimeoutForJavaScriptExecution(unsigned ms);
 

Modified: trunk/Source/WebKit/blackberry/Api/WebPage_p.h (132977 => 132978)


--- trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-10-31 02:50:30 UTC (rev 132978)
@@ -55,7 +55,6 @@
 class Frame;
 class GeolocationClientBlackBerry;
 class GraphicsLayerBlackBerry;
-class _javascript_DebuggerBlackBerry;
 class LayerWebKitThread;
 class Node;
 class Page;
@@ -480,10 +479,6 @@
     OwnPtr<WebTapHighlight> m_tapHighlight;
     OwnPtr<SelectionOverlay> m_selectionOverlay;
 
-#if ENABLE(_javascript__DEBUGGER)
-    OwnPtr<WebCore::_javascript_DebuggerBlackBerry> m_scriptDebugger;
-#endif
-
     bool m_visible;
     ActivationStateType m_activationState;
     bool m_shouldResetTilesWhenShown;

Modified: trunk/Source/WebKit/blackberry/ChangeLog (132977 => 132978)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-10-31 02:50:30 UTC (rev 132978)
@@ -1,3 +1,20 @@
+2012-10-30  Peter Wang  <[email protected]>
+
+        [BlackBerry] Clean the code of "_javascript_DebuggerBlackBerry"
+        https://bugs.webkit.org/show_bug.cgi?id=100724
+
+        Reviewed by Rob Buis.
+
+        Remove the code of _javascript_DebuggerBlackBerry.
+
+        * Api/WebPage.cpp:
+        * Api/WebPage.h:
+        * Api/WebPage_p.h:
+        (WebCore):
+        (WebPagePrivate):
+        * WebCoreSupport/_javascript_DebuggerBlackBerry.cpp: Removed.
+        * WebCoreSupport/_javascript_DebuggerBlackBerry.h: Removed.
+
 2012-10-29  Rob Buis  <[email protected]>
 
         [BlackBerry] Simplify AuthenticationChallengeManager::instance

Deleted: trunk/Source/WebKit/blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.cpp (132977 => 132978)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.cpp	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.cpp	2012-10-31 02:50:30 UTC (rev 132978)
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
- * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "config.h"
-
-#if ENABLE(_javascript__DEBUGGER)
-#include "_javascript_DebuggerBlackBerry.h"
-
-#include "_javascript_CallFrame.h"
-#include "PageScriptDebugServer.h"
-#include "ScriptBreakpoint.h"
-#include "SourceCode.h"
-#include "WebPage_p.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-_javascript_DebuggerBlackBerry::_javascript_DebuggerBlackBerry(BlackBerry::WebKit::WebPagePrivate* webPagePrivate)
-    : m_webPagePrivate(webPagePrivate)
-    , m_debugServer(PageScriptDebugServer::shared())
-{
-    start();
-}
-
-_javascript_DebuggerBlackBerry::~_javascript_DebuggerBlackBerry()
-{
-    stop();
-}
-
-void _javascript_DebuggerBlackBerry::start()
-{
-    m_debugServer.addListener(this, m_webPagePrivate->m_page);
-}
-
-void _javascript_DebuggerBlackBerry::stop()
-{
-    m_debugServer.removeListener(this, m_webPagePrivate->m_page);
-}
-
-void _javascript_DebuggerBlackBerry::addBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength)
-{
-    if (!url || !urlLength)
-        return;
-    if (!m_currentCallFrame)
-        return;
-
-    String sourceString(url, urlLength);
-    String conditionString(condition, conditionLength);
-    int actualLineNumber;
-    m_debugServer.setBreakpoint(sourceString, ScriptBreakpoint(lineNumber, 0, conditionString), &lineNumber, &actualLineNumber);
-}
-
-void _javascript_DebuggerBlackBerry::updateBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength)
-{
-    if (!url || !urlLength)
-        return;
-    if (!m_currentCallFrame)
-        return;
-
-    String sourceString(url, urlLength);
-    String conditionString(condition, conditionLength);
-    int actualLineNumber;
-    m_debugServer.setBreakpoint(sourceString, ScriptBreakpoint(lineNumber, 0, conditionString), &lineNumber, &actualLineNumber);
-}
-
-
-void _javascript_DebuggerBlackBerry::removeBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber)
-{
-    if (!url || !urlLength)
-        return;
-    if (!m_currentCallFrame)
-        return;
-
-    String sourceString(url, urlLength);
-    sourceString += ":" + lineNumber;
-    m_debugServer.removeBreakpoint(sourceString);
-}
-
-
-bool _javascript_DebuggerBlackBerry::pauseOnExceptions()
-{
-    return m_debugServer.pauseOnExceptionsState() == ScriptDebugServer::PauseOnAllExceptions;
-}
-
-void _javascript_DebuggerBlackBerry::setPauseOnExceptions(bool pause)
-{
-    m_debugServer.setPauseOnExceptionsState(pause ? ScriptDebugServer::PauseOnAllExceptions : ScriptDebugServer::DontPauseOnExceptions);
-}
-
-void _javascript_DebuggerBlackBerry::pauseInDebugger()
-{
-    m_debugServer.setPauseOnNextStatement(true);
-}
-
-void _javascript_DebuggerBlackBerry::resumeDebugger()
-{
-    m_debugServer.continueProgram();
-}
-
-void _javascript_DebuggerBlackBerry::stepOverStatementInDebugger()
-{
-    m_debugServer.stepOverStatement();
-}
-
-void _javascript_DebuggerBlackBerry::stepIntoStatementInDebugger()
-{
-    m_debugServer.stepIntoStatement();
-}
-
-void _javascript_DebuggerBlackBerry::stepOutOfFunctionInDebugger()
-{
-    m_debugServer.stepOutOfFunction();
-}
-
-void _javascript_DebuggerBlackBerry::didParseSource(const String& sourceID, const Script& script)
-{
-    m_webPagePrivate->m_client->_javascript_SourceParsed(script.url.characters(), script.url.length(), script.source.characters(), script.source.length());
-}
-
-void _javascript_DebuggerBlackBerry::failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage)
-{
-    m_webPagePrivate->m_client->_javascript_ParsingFailed(url.impl()->characters(), url.length(), errorMessage.impl()->characters(), errorMessage.length(), errorLine);
-}
-
-void _javascript_DebuggerBlackBerry::didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception)
-{
-    String stacks;
-
-    m_currentCallFrame = m_debugServer.currentCallFrame();
-    _javascript_CallFrame* frame = m_currentCallFrame;
-
-    while (frame && frame->isValid()) {
-        JSC::SourceProvider* provider = reinterpret_cast<JSC::SourceProvider*>(frame->sourceID());
-        String url(provider->url().characters(), provider->url().length());
-        if (url.length())
-            stacks += url;
-        stacks += ": ";
-
-        if (frame->type() == JSC::DebuggerCallFrame::FunctionType) {
-            String name = frame->functionName();
-            if (name.length())
-                stacks += name;
-        }
-        stacks += "(): ";
-
-        String line = String::number(frame->line());
-        stacks += line + "\n";
-
-        frame = frame->caller();
-    }
-
-    m_webPagePrivate->m_client->_javascript_Paused(reinterpret_cast<const unsigned short*>(stacks.characters()), stacks.length());
-}
-
-void _javascript_DebuggerBlackBerry::didContinue()
-{
-    m_currentCallFrame = 0;
-    m_webPagePrivate->m_client->_javascript_Continued();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(_javascript__DEBUGGER)

Deleted: trunk/Source/WebKit/blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.h (132977 => 132978)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.h	2012-10-31 02:39:17 UTC (rev 132977)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.h	2012-10-31 02:50:30 UTC (rev 132978)
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
- * Copyright (C) 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef _javascript_DebuggerBlackBerry_h
-#define _javascript_DebuggerBlackBerry_h
-
-#if ENABLE(_javascript__DEBUGGER)
-
-#include "ScriptDebugListener.h"
-
-namespace BlackBerry {
-namespace WebKit {
-class WebPagePrivate;
-}
-}
-
-namespace WebCore {
-
-class _javascript_CallFrame;
-class PageScriptDebugServer;
-
-class _javascript_DebuggerBlackBerry : public ScriptDebugListener {
-public:
-    _javascript_DebuggerBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
-    ~_javascript_DebuggerBlackBerry();
-
-    void addBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength);
-    void updateBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber, const unsigned short* condition, unsigned conditionLength);
-    void removeBreakpoint(const unsigned short* url, unsigned urlLength, int lineNumber);
-
-    bool pauseOnExceptions();
-    void setPauseOnExceptions(bool);
-
-    void pauseInDebugger();
-    void resumeDebugger();
-
-    void stepOverStatementInDebugger();
-    void stepIntoStatementInDebugger();
-    void stepOutOfFunctionInDebugger();
-
-    // From ScriptDebugListener
-    virtual void didParseSource(const String&  sourceID, const Script&);
-    virtual void failedToParseSource(const String& url, const String& data, int firstLine, int errorLine, const String& errorMessage);
-    virtual void didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception);
-    virtual void didContinue();
-
-protected:
-    void start();
-    void stop();
-
-private:
-    BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
-    PageScriptDebugServer& m_debugServer;
-
-    _javascript_CallFrame* m_currentCallFrame;
-};
-
-} // WebCore
-
-#endif // ENABLE(_javascript__DEBUGGER)
-#endif // _javascript_DebuggerBlackBerry_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to