Changeset 54597 in webkit


Ignore:
Timestamp:
Feb 10, 2010 7:18:24 AM (14 years ago)
Author:
mnaganov@chromium.org
Message:

2010-02-10 Mikhail Naganov <mnaganov@chromium.org>

Reviewed by Pavel Feldman.

Remove several #if USE(JSC) branches. Introduce ScriptDebugServer class for
making JavaScriptDebugServer engine-agnostic.

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

  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pro:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/ScriptDebugServer.cpp: Added. (WebCore::ScriptDebugServer::recompileAllJSFunctions): (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
  • bindings/js/ScriptDebugServer.h: Added.
  • bindings/v8/ScriptDebugServer.cpp: Added. (WebCore::ScriptDebugServer::recompileAllJSFunctions): (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
  • bindings/v8/ScriptDebugServer.h: Added.
  • inspector/InspectorController.cpp: (WebCore::InspectorController::startUserInitiatedProfiling): (WebCore::InspectorController::enableProfiler): (WebCore::InspectorController::disableProfiler):
  • page/Console.cpp: (WebCore::Console::profile): (WebCore::Console::profileEnd):
Location:
trunk/WebCore
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r54596 r54597  
     12010-02-10  Mikhail Naganov  <mnaganov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Remove several #if USE(JSC) branches. Introduce ScriptDebugServer class for
     6        making JavaScriptDebugServer engine-agnostic.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=34795
     9
     10        * GNUmakefile.am:
     11        * WebCore.gypi:
     12        * WebCore.pro:
     13        * WebCore.xcodeproj/project.pbxproj:
     14        * bindings/js/JSBindingsAllInOne.cpp:
     15        * bindings/js/ScriptDebugServer.cpp: Added.
     16        (WebCore::ScriptDebugServer::recompileAllJSFunctions):
     17        (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
     18        * bindings/js/ScriptDebugServer.h: Added.
     19        * bindings/v8/ScriptDebugServer.cpp: Added.
     20        (WebCore::ScriptDebugServer::recompileAllJSFunctions):
     21        (WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
     22        * bindings/v8/ScriptDebugServer.h: Added.
     23        * inspector/InspectorController.cpp:
     24        (WebCore::InspectorController::startUserInitiatedProfiling):
     25        (WebCore::InspectorController::enableProfiler):
     26        (WebCore::InspectorController::disableProfiler):
     27        * page/Console.cpp:
     28        (WebCore::Console::profile):
     29        (WebCore::Console::profileEnd):
     30
    1312009-10-06  Yongjun Zhang  <yongjun.zhang@nokia.com>
    232
  • trunk/WebCore/GNUmakefile.am

    r54427 r54597  
    478478        WebCore/bindings/js/ScriptController.cpp \
    479479        WebCore/bindings/js/ScriptController.h \
     480        WebCore/bindings/js/ScriptDebugServer.cpp \
     481        WebCore/bindings/js/ScriptDebugServer.h \
    480482        WebCore/bindings/js/ScriptEventListener.cpp \
    481483        WebCore/bindings/js/ScriptEventListener.h \
  • trunk/WebCore/WebCore.gypi

    r54593 r54597  
    802802            'bindings/v8/ScriptController.cpp',
    803803            'bindings/v8/ScriptController.h',
     804            'bindings/v8/ScriptDebugServer.cpp',
     805            'bindings/v8/ScriptDebugServer.h',
    804806            'bindings/v8/ScriptEventListener.cpp',
    805807            'bindings/v8/ScriptEventListener.h',
  • trunk/WebCore/WebCore.pro

    r54490 r54597  
    344344    bindings/js/ScriptCallStack.cpp \
    345345    bindings/js/ScriptController.cpp \
     346    bindings/js/ScriptDebugServer.cpp \
    346347    bindings/js/ScriptEventListener.cpp \
    347348    bindings/js/ScriptFunctionCall.cpp \
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r54503 r54597  
    24562456                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; };
    24572457                97EF7DFE107E55B700D7C49C /* ScriptControllerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */; };
     2458                9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */; };
     2459                9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
    24582460                9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
    24592461                9F72305011184B4100AD0126 /* ScriptProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F72304D11184B4100AD0126 /* ScriptProfiler.cpp */; };
     
    77957797                97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = "<group>"; };
    77967798                97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptControllerBase.cpp; sourceTree = "<group>"; };
     7799                9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptDebugServer.cpp; sourceTree = "<group>"; };
     7800                9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugServer.h; sourceTree = "<group>"; };
    77977801                9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = "<group>"; };
    77987802                9F72304D11184B4100AD0126 /* ScriptProfiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProfiler.cpp; sourceTree = "<group>"; };
     
    1462714631                                93B70D5409EB0C7C009D8468 /* ScriptController.h */,
    1462814632                                A83E1C720E49042B00140B9C /* ScriptControllerMac.mm */,
     14633                                9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */,
     14634                                9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */,
    1462914635                                411046400FA222A600BA436A /* ScriptEventListener.cpp */,
    1463014636                                4110463F0FA222A600BA436A /* ScriptEventListener.h */,
     
    1850618512                                9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */,
    1850718513                                9F72305111184B4100AD0126 /* ScriptProfiler.h in Headers */,
     18514                                9F6FC1971122E82A00E80196 /* ScriptDebugServer.h in Headers */,
    1850818515                        );
    1850918516                        runOnlyForDeploymentPostprocessing = 0;
     
    2068420691                                B776D43D1104527500BEB0EC /* PrintContext.cpp in Sources */,
    2068520692                                9F72305011184B4100AD0126 /* ScriptProfiler.cpp in Sources */,
     20693                                9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */,
    2068620694                        );
    2068720695                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r54277 r54597  
    141141#include "ScriptController.cpp"
    142142#include "ScriptControllerWin.cpp"
     143#include "ScriptDebugServer.cpp"
    143144#include "ScriptEventListener.cpp"
    144145#include "ScriptFunctionCall.cpp"
  • trunk/WebCore/inspector/InspectorController.cpp

    r54576 r54597  
    5454#include "HTMLFrameOwnerElement.h"
    5555#include "HitTestResult.h"
     56#include "InjectedScript.h"
    5657#include "InjectedScriptHost.h"
    57 #include "InjectedScript.h"
    5858#include "InspectorBackend.h"
    5959#include "InspectorClient.h"
     
    7373#include "ResourceResponse.h"
    7474#include "ScriptCallStack.h"
     75#include "ScriptDebugServer.h"
    7576#include "ScriptFunctionCall.h"
    7677#include "ScriptObject.h"
     
    14301431    if (!profilerEnabled()) {
    14311432        enableProfiler(false, true);
    1432 #if USE(JSC)
    1433         JavaScriptDebugServer::shared().recompileAllJSFunctions();
    1434 #endif
     1433        ScriptDebugServer::recompileAllJSFunctions();
    14351434    }
    14361435
     
    14891488    m_profilerEnabled = true;
    14901489
    1491 #if USE(JSC)
    14921490    if (!skipRecompile)
    1493         JavaScriptDebugServer::shared().recompileAllJSFunctionsSoon();
    1494 #endif
     1491        ScriptDebugServer::recompileAllJSFunctionsSoon();
    14951492
    14961493    if (m_frontend)
     
    15081505    m_profilerEnabled = false;
    15091506
    1510 #if USE(JSC)
    1511     JavaScriptDebugServer::shared().recompileAllJSFunctionsSoon();
    1512 #endif
     1507    ScriptDebugServer::recompileAllJSFunctionsSoon();
    15131508
    15141509    if (m_frontend)
  • trunk/WebCore/page/Console.cpp

    r54417 r54597  
    321321        return;
    322322
    323 #if ENABLE(INSPECTOR) && USE(JSC)
     323#if ENABLE(INSPECTOR)
    324324    InspectorController* controller = page->inspectorController();
    325325    // FIXME: log a console message when profiling is disabled.
     
    330330    String resolvedTitle = title;
    331331    if (title.isNull()) // no title so give it the next user initiated profile title.
    332 #if ENABLE(INSPECTOR) && USE(JSC)
     332#if ENABLE(INSPECTOR)
    333333        resolvedTitle = controller->getCurrentUserInitiatedProfileName(true);
    334334#else
     
    338338    ScriptProfiler::start(callStack->state(), resolvedTitle);
    339339
    340 #if ENABLE(INSPECTOR) && USE(JSC)
     340#if ENABLE(INSPECTOR)
    341341    const ScriptCallFrame& lastCaller = callStack->at(0);
    342342    controller->addStartProfilingMessageToConsole(resolvedTitle, lastCaller.lineNumber(), lastCaller.sourceURL());
     
    350350        return;
    351351
    352     if (!this->page())
    353         return;
    354 
    355 #if ENABLE(INSPECTOR) && USE(JSC)
     352#if ENABLE(INSPECTOR)
    356353    InspectorController* controller = page->inspectorController();
    357354    if (!controller->profilerEnabled())
     
    365362    m_profiles.append(profile);
    366363
    367 #if ENABLE(INSPECTOR) && USE(JSC)
     364#if ENABLE(INSPECTOR)
    368365    const ScriptCallFrame& lastCaller = callStack->at(0);
    369366    controller->addProfile(profile, lastCaller.lineNumber(), lastCaller.sourceURL());
Note: See TracChangeset for help on using the changeset viewer.