Changeset 126140 in webkit


Ignore:
Timestamp:
Aug 21, 2012 12:24:05 AM (12 years ago)
Author:
loislo@chromium.org
Message:

Unreviewed, rolling out r126028.
http://trac.webkit.org/changeset/126028
https://bugs.webkit.org/show_bug.cgi?id=94576

it broke compilation on apple webkit win. (Requested by loislo
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-08-21

  • inspector/CodeGeneratorInspector.py:
  • inspector/InjectedScriptWebGLModule.cpp:

(WebCore::InjectedScriptWebGLModule::captureFrame):

  • inspector/InjectedScriptWebGLModule.h:

(InjectedScriptWebGLModule):

  • inspector/Inspector.json:
  • inspector/InspectorController.cpp:

(WebCore::InspectorController::InspectorController):

  • inspector/InspectorWebGLAgent.cpp:

(WebCore::InspectorWebGLAgent::InspectorWebGLAgent):

  • inspector/InspectorWebGLAgent.h:

(WebCore):
(WebCore::InspectorWebGLAgent::create):
(InspectorWebGLAgent):

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r126139 r126140  
     12012-08-21  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r126028.
     4        http://trac.webkit.org/changeset/126028
     5        https://bugs.webkit.org/show_bug.cgi?id=94576
     6
     7        it broke compilation on apple webkit win. (Requested by loislo
     8        on #webkit).
     9
     10        * inspector/CodeGeneratorInspector.py:
     11        * inspector/InjectedScriptWebGLModule.cpp:
     12        (WebCore::InjectedScriptWebGLModule::captureFrame):
     13        * inspector/InjectedScriptWebGLModule.h:
     14        (InjectedScriptWebGLModule):
     15        * inspector/Inspector.json:
     16        * inspector/InspectorController.cpp:
     17        (WebCore::InspectorController::InspectorController):
     18        * inspector/InspectorWebGLAgent.cpp:
     19        (WebCore::InspectorWebGLAgent::InspectorWebGLAgent):
     20        * inspector/InspectorWebGLAgent.h:
     21        (WebCore):
     22        (WebCore::InspectorWebGLAgent::create):
     23        (InspectorWebGLAgent):
     24
    1252012-08-20  Ilya Tikhonovsky  <loislo@chromium.org>
    226
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.py

    r126028 r126140  
    5959
    6060TYPES_WITH_RUNTIME_CAST_SET = frozenset(["Runtime.RemoteObject", "Runtime.PropertyDescriptor",
    61                                          "Debugger.FunctionDetails", "Debugger.CallFrame", "WebGL.TraceLog",
     61                                         "Debugger.FunctionDetails", "Debugger.CallFrame",
    6262                                         # This should be a temporary hack. TimelineEvent should be created via generated C++ API.
    6363                                         "Timeline.TimelineEvent"])
  • trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.cpp

    r126028 r126140  
    7373}
    7474
    75 void InjectedScriptWebGLModule::captureFrame(ErrorString* errorString, String* traceLogId)
     75void InjectedScriptWebGLModule::captureFrame(ErrorString* errorString, const String& contextId)
    7676{
    7777    ScriptFunctionCall function(injectedScriptObject(), "captureFrame");
    78     RefPtr<InspectorValue> resultValue;
    79     makeCall(function, &resultValue);
    80     if (!resultValue || resultValue->type() != InspectorValue::TypeString || !resultValue->asString(traceLogId))
    81         *errorString = "Internal error: captureFrame";
    82 }
    83 
    84 void InjectedScriptWebGLModule::dropTraceLog(ErrorString* errorString, const String& traceLogId)
    85 {
    86     ScriptFunctionCall function(injectedScriptObject(), "dropTraceLog");
    87     function.appendArgument(traceLogId);
     78    function.appendArgument(contextId);
    8879    bool hadException = false;
    8980    callFunctionWithEvalEnabled(function, hadException);
    9081    ASSERT(!hadException);
    9182    if (hadException)
    92         *errorString = "Internal error: dropTraceLog";
    93 }
    94 
    95 void InjectedScriptWebGLModule::traceLog(ErrorString* errorString, const String& traceLogId, RefPtr<TypeBuilder::WebGL::TraceLog>* traceLog)
    96 {
    97     ScriptFunctionCall function(injectedScriptObject(), "traceLog");
    98     function.appendArgument(traceLogId);
    99     RefPtr<InspectorValue> resultValue;
    100     makeCall(function, &resultValue);
    101     if (!resultValue || resultValue->type() != InspectorValue::TypeObject) {
    102         if (!resultValue->asString(errorString))
    103             *errorString = "Internal error: traceLog";
    104         return;
    105     }
    106     *traceLog = TypeBuilder::WebGL::TraceLog::runtimeCast(resultValue);
    107 }
    108 
    109 void InjectedScriptWebGLModule::replayTraceLog(ErrorString* errorString, const String& traceLogId, int stepNo, String* result)
    110 {
    111     ScriptFunctionCall function(injectedScriptObject(), "replayTraceLog");
    112     function.appendArgument(traceLogId);
    113     function.appendArgument(stepNo);
    114     RefPtr<InspectorValue> resultValue;
    115     makeCall(function, &resultValue);
    116     if (!resultValue || resultValue->type() != InspectorValue::TypeString || !resultValue->asString(result))
    117         *errorString = "Internal error: replayTraceLog";
     83        *errorString = "Internal error";
    11884}
    11985
  • trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.h

    r126028 r126140  
    4545class InjectedScriptWebGLModule : public InjectedScriptModule {
    4646public:
    47     InjectedScriptWebGLModule();
    48    
    4947    virtual String source() const;
    5048
     
    5250
    5351    ScriptObject wrapWebGLContext(const ScriptObject& glContext);
    54     void captureFrame(ErrorString*, String*);
    55     void dropTraceLog(ErrorString*, const String&);
    56     void traceLog(ErrorString*, const String&, RefPtr<TypeBuilder::WebGL::TraceLog>*);
    57     void replayTraceLog(ErrorString*, const String&, int, String*);
     52    void captureFrame(ErrorString*, const String& contextId);
     53
     54private:
     55    InjectedScriptWebGLModule();
    5856};
    5957
  • trunk/Source/WebCore/inspector/Inspector.json

    r126028 r126140  
    31183118        "domain": "WebGL",
    31193119        "hidden": true,
    3120         "types": [
    3121             {
    3122                 "id": "TraceLogId",
    3123                 "type": "string",
    3124                 "description": "Unique object identifier."
    3125             },
    3126             {
    3127                 "id": "Call",
    3128                 "type": "object",
    3129                 "properties": [
    3130                     { "name": "functionName", "type": "string" }
    3131                 ]
    3132             },
    3133             {
    3134                 "id": "TraceLog",
    3135                 "type": "object",
    3136                 "properties": [
    3137                     { "name": "id", "$ref": "TraceLogId" },
    3138                     { "name": "calls", "type": "array", "items": { "$ref": "Call" }}
    3139                 ]
    3140             }
    3141         ],
     3120        "types": [],
    31423121        "commands": [
    31433122            {
     
    31483127                "name": "disable",
    31493128                "description": "Disables WebGL inspection."
    3150             },
    3151             {
    3152                 "name": "dropTraceLog",
    3153                 "parameters": [
    3154                     { "name": "traceLogId", "$ref": "TraceLogId" }
    3155                 ]
    3156             },
    3157             {
    3158                 "name": "captureFrame",
    3159                 "returns": [
    3160                     { "name": "traceLogId", "$ref": "TraceLogId" }
    3161                 ]
    3162             },
    3163             {
    3164                 "name": "getTraceLog",
    3165                 "parameters": [
    3166                     { "name": "traceLogId", "$ref": "TraceLogId" }
    3167                 ],
    3168                 "returns": [
    3169                     { "name": "traceLog", "$ref": "TraceLog" }
    3170                 ]
    3171             },
    3172             {
    3173                 "name": "replayTraceLog",
    3174                 "parameters": [
    3175                     { "name": "traceLogId", "$ref": "TraceLogId" },
    3176                     { "name": "stepNo", "type": "integer" }
    3177                 ],
    3178                 "returns": [
    3179                     { "name": "screenshotDataUrl", "type": "string" }
    3180                 ]
    31813129            }
    31823130        ],
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r126028 r126140  
    149149
    150150#if ENABLE(WEBGL)
    151     m_agents.append(InspectorWebGLAgent::create(m_instrumentingAgents.get(), m_state.get(), page, m_injectedScriptManager.get()));
     151    m_agents.append(InspectorWebGLAgent::create(m_instrumentingAgents.get(), m_state.get(), m_injectedScriptManager.get()));
    152152#endif
    153153
  • trunk/Source/WebCore/inspector/InspectorWebGLAgent.cpp

    r126028 r126140  
    3535#include "InspectorWebGLAgent.h"
    3636
    37 #include "InjectedScript.h"
    3837#include "InjectedScriptManager.h"
    3938#include "InjectedScriptWebGLModule.h"
     
    4140#include "InspectorState.h"
    4241#include "InstrumentingAgents.h"
    43 #include "Page.h"
    4442#include "ScriptObject.h"
    4543#include "ScriptState.h"
     
    5149};
    5250
    53 InspectorWebGLAgent::InspectorWebGLAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page, InjectedScriptManager* injectedScriptManager)
     51InspectorWebGLAgent::InspectorWebGLAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager)
    5452    : InspectorBaseAgent<InspectorWebGLAgent>("WebGL", instrumentingAgents, state)
    55     , m_inspectedPage(page)
    5653    , m_injectedScriptManager(injectedScriptManager)
    5754    , m_frontend(0)
     
    9996}
    10097
    101 void InspectorWebGLAgent::dropTraceLog(ErrorString* errorString, const String& traceLogId)
    102 {
    103     InjectedScriptWebGLModule module = injectedScriptWebGLModuleForTraceLogId(errorString, traceLogId);
    104     if (!module.hasNoValue())
    105         module.dropTraceLog(errorString, traceLogId);
    106 }
    107 
    108 void InspectorWebGLAgent::captureFrame(ErrorString* errorString, String* traceLogId)
    109 {
    110     ScriptState* scriptState = mainWorldScriptState(m_inspectedPage->mainFrame());
    111     InjectedScriptWebGLModule module = InjectedScriptWebGLModule::moduleForState(m_injectedScriptManager, scriptState);
    112     if (module.hasNoValue()) {
    113         *errorString = "Inspected frame has gone";
    114         return;
    115     }
    116     module.captureFrame(errorString, traceLogId);
    117 }
    118 
    119 void InspectorWebGLAgent::getTraceLog(ErrorString* errorString, const String& traceLogId, RefPtr<TypeBuilder::WebGL::TraceLog>& traceLog)
    120 {
    121     InjectedScriptWebGLModule module = injectedScriptWebGLModuleForTraceLogId(errorString, traceLogId);
    122     if (!module.hasNoValue())
    123         module.traceLog(errorString, traceLogId, &traceLog);
    124 }
    125 
    126 void InspectorWebGLAgent::replayTraceLog(ErrorString* errorString, const String& traceLogId, int stepNo, String* result)
    127 {
    128     InjectedScriptWebGLModule module = injectedScriptWebGLModuleForTraceLogId(errorString, traceLogId);
    129     if (!module.hasNoValue())
    130         module.replayTraceLog(errorString, traceLogId, stepNo, result);
    131 }
    132 
    13398ScriptObject InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation(const ScriptObject& glContext)
    13499{
     
    145110}
    146111
    147 InjectedScriptWebGLModule InspectorWebGLAgent::injectedScriptWebGLModuleForTraceLogId(ErrorString* errorString, const String& traceLogId)
    148 {
    149     InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(traceLogId);
    150     if (injectedScript.hasNoValue()) {
    151         *errorString = "Inspected frame has gone";
    152         return InjectedScriptWebGLModule();
    153     }
    154     InjectedScriptWebGLModule module = InjectedScriptWebGLModule::moduleForState(m_injectedScriptManager, injectedScript.scriptState());
    155     if (module.hasNoValue()) {
    156         ASSERT_NOT_REACHED();
    157         *errorString = "Internal error: no WebGL module";
    158         return InjectedScriptWebGLModule();
    159     }
    160     return module;
    161 }
    162 
    163112} // namespace WebCore
    164113
  • trunk/Source/WebCore/inspector/InspectorWebGLAgent.h

    r126028 r126140  
    3636#include "InspectorBaseAgent.h"
    3737#include "InspectorFrontend.h"
    38 #include "InspectorTypeBuilder.h"
    3938#include "PlatformString.h"
    4039#include "ScriptState.h"
     
    4544
    4645class InjectedScriptManager;
    47 class InjectedScriptWebGLModule;
    4846class InspectorState;
    4947class InstrumentingAgents;
    50 class Page;
    5148class ScriptObject;
    5249
     
    5552class InspectorWebGLAgent : public InspectorBaseAgent<InspectorWebGLAgent>, public InspectorBackendDispatcher::WebGLCommandHandler {
    5653public:
    57     static PassOwnPtr<InspectorWebGLAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page, InjectedScriptManager* injectedScriptManager)
     54    static PassOwnPtr<InspectorWebGLAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager)
    5855    {
    59         return adoptPtr(new InspectorWebGLAgent(instrumentingAgents, state, page, injectedScriptManager));
     56        return adoptPtr(new InspectorWebGLAgent(instrumentingAgents, state, injectedScriptManager));
    6057    }
    6158    ~InspectorWebGLAgent();
     
    7269    virtual void enable(ErrorString*);
    7370    virtual void disable(ErrorString*);
    74     virtual void dropTraceLog(ErrorString*, const String&);
    75     virtual void captureFrame(ErrorString*, String*);
    76     virtual void getTraceLog(ErrorString*, const String&, RefPtr<TypeBuilder::WebGL::TraceLog>&);
    77     virtual void replayTraceLog(ErrorString*, const String&, int, String*);
    7871
    7972    // Called from the injected script.
     
    8275
    8376private:
    84     InspectorWebGLAgent(InstrumentingAgents*, InspectorState*, Page*, InjectedScriptManager*);
     77    InspectorWebGLAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*);
    8578
    86     InjectedScriptWebGLModule injectedScriptWebGLModuleForTraceLogId(ErrorString*, const String&);
    87 
    88     Page* m_inspectedPage;
    8979    InjectedScriptManager* m_injectedScriptManager;
    9080    InspectorFrontend::WebGL* m_frontend;
Note: See TracChangeset for help on using the changeset viewer.