Title: [126140] trunk/Source/WebCore
Revision
126140
Author
[email protected]
Date
2012-08-21 00:24:05 -0700 (Tue, 21 Aug 2012)

Log 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 <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126139 => 126140)


--- trunk/Source/WebCore/ChangeLog	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/ChangeLog	2012-08-21 07:24:05 UTC (rev 126140)
@@ -1,3 +1,27 @@
+2012-08-21  Sheriff Bot  <[email protected]>
+
+        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).
+
+        * 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):
+
 2012-08-20  Ilya Tikhonovsky  <[email protected]>
 
         Web Inspector: NMI: wrong size was reported for immutable StylePropertySet

Modified: trunk/Source/WebCore/inspector/CodeGeneratorInspector.py (126139 => 126140)


--- trunk/Source/WebCore/inspector/CodeGeneratorInspector.py	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/CodeGeneratorInspector.py	2012-08-21 07:24:05 UTC (rev 126140)
@@ -58,7 +58,7 @@
 
 
 TYPES_WITH_RUNTIME_CAST_SET = frozenset(["Runtime.RemoteObject", "Runtime.PropertyDescriptor",
-                                         "Debugger.FunctionDetails", "Debugger.CallFrame", "WebGL.TraceLog",
+                                         "Debugger.FunctionDetails", "Debugger.CallFrame",
                                          # This should be a temporary hack. TimelineEvent should be created via generated C++ API.
                                          "Timeline.TimelineEvent"])
 

Modified: trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.cpp (126139 => 126140)


--- trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.cpp	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.cpp	2012-08-21 07:24:05 UTC (rev 126140)
@@ -72,51 +72,17 @@
     return ScriptObject(glContext.scriptState(), resultValue);
 }
 
-void InjectedScriptWebGLModule::captureFrame(ErrorString* errorString, String* traceLogId)
+void InjectedScriptWebGLModule::captureFrame(ErrorString* errorString, const String& contextId)
 {
     ScriptFunctionCall function(injectedScriptObject(), "captureFrame");
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeString || !resultValue->asString(traceLogId))
-        *errorString = "Internal error: captureFrame";
-}
-
-void InjectedScriptWebGLModule::dropTraceLog(ErrorString* errorString, const String& traceLogId)
-{
-    ScriptFunctionCall function(injectedScriptObject(), "dropTraceLog");
-    function.appendArgument(traceLogId);
+    function.appendArgument(contextId);
     bool hadException = false;
     callFunctionWithEvalEnabled(function, hadException);
     ASSERT(!hadException);
     if (hadException)
-        *errorString = "Internal error: dropTraceLog";
+        *errorString = "Internal error";
 }
 
-void InjectedScriptWebGLModule::traceLog(ErrorString* errorString, const String& traceLogId, RefPtr<TypeBuilder::WebGL::TraceLog>* traceLog)
-{
-    ScriptFunctionCall function(injectedScriptObject(), "traceLog");
-    function.appendArgument(traceLogId);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeObject) {
-        if (!resultValue->asString(errorString))
-            *errorString = "Internal error: traceLog";
-        return;
-    }
-    *traceLog = TypeBuilder::WebGL::TraceLog::runtimeCast(resultValue);
-}
-
-void InjectedScriptWebGLModule::replayTraceLog(ErrorString* errorString, const String& traceLogId, int stepNo, String* result)
-{
-    ScriptFunctionCall function(injectedScriptObject(), "replayTraceLog");
-    function.appendArgument(traceLogId);
-    function.appendArgument(stepNo);
-    RefPtr<InspectorValue> resultValue;
-    makeCall(function, &resultValue);
-    if (!resultValue || resultValue->type() != InspectorValue::TypeString || !resultValue->asString(result))
-        *errorString = "Internal error: replayTraceLog";
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(INSPECTOR) && ENABLE(WEBGL)

Modified: trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.h (126139 => 126140)


--- trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.h	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/InjectedScriptWebGLModule.h	2012-08-21 07:24:05 UTC (rev 126140)
@@ -44,17 +44,15 @@
 
 class InjectedScriptWebGLModule : public InjectedScriptModule {
 public:
-    InjectedScriptWebGLModule();
-    
     virtual String source() const;
 
     static InjectedScriptWebGLModule moduleForState(InjectedScriptManager*, ScriptState*);
 
     ScriptObject wrapWebGLContext(const ScriptObject& glContext);
-    void captureFrame(ErrorString*, String*);
-    void dropTraceLog(ErrorString*, const String&);
-    void traceLog(ErrorString*, const String&, RefPtr<TypeBuilder::WebGL::TraceLog>*);
-    void replayTraceLog(ErrorString*, const String&, int, String*);
+    void captureFrame(ErrorString*, const String& contextId);
+
+private:
+    InjectedScriptWebGLModule();
 };
 
 #endif

Modified: trunk/Source/WebCore/inspector/Inspector.json (126139 => 126140)


--- trunk/Source/WebCore/inspector/Inspector.json	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/Inspector.json	2012-08-21 07:24:05 UTC (rev 126140)
@@ -3117,28 +3117,7 @@
     {
         "domain": "WebGL",
         "hidden": true,
-        "types": [
-            {
-                "id": "TraceLogId",
-                "type": "string",
-                "description": "Unique object identifier."
-            },
-            {
-                "id": "Call",
-                "type": "object",
-                "properties": [
-                    { "name": "functionName", "type": "string" }
-                ]
-            },
-            {
-                "id": "TraceLog",
-                "type": "object",
-                "properties": [
-                    { "name": "id", "$ref": "TraceLogId" },
-                    { "name": "calls", "type": "array", "items": { "$ref": "Call" }}
-                ]
-            }
-        ],
+        "types": [],
         "commands": [
             {
                 "name": "enable",
@@ -3147,37 +3126,6 @@
             {
                 "name": "disable",
                 "description": "Disables WebGL inspection."
-            },
-            {
-                "name": "dropTraceLog",
-                "parameters": [
-                    { "name": "traceLogId", "$ref": "TraceLogId" }
-                ]
-            },
-            {
-                "name": "captureFrame",
-                "returns": [
-                    { "name": "traceLogId", "$ref": "TraceLogId" }
-                ]
-            },
-            {
-                "name": "getTraceLog",
-                "parameters": [
-                    { "name": "traceLogId", "$ref": "TraceLogId" }
-                ],
-                "returns": [
-                    { "name": "traceLog", "$ref": "TraceLog" }
-                ]
-            },
-            {
-                "name": "replayTraceLog",
-                "parameters": [
-                    { "name": "traceLogId", "$ref": "TraceLogId" },
-                    { "name": "stepNo", "type": "integer" }
-                ],
-                "returns": [
-                    { "name": "screenshotDataUrl", "type": "string" }
-                ]
             }
         ],
         "events": []

Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (126139 => 126140)


--- trunk/Source/WebCore/inspector/InspectorController.cpp	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp	2012-08-21 07:24:05 UTC (rev 126140)
@@ -148,7 +148,7 @@
 #endif
 
 #if ENABLE(WEBGL)
-    m_agents.append(InspectorWebGLAgent::create(m_instrumentingAgents.get(), m_state.get(), page, m_injectedScriptManager.get()));
+    m_agents.append(InspectorWebGLAgent::create(m_instrumentingAgents.get(), m_state.get(), m_injectedScriptManager.get()));
 #endif
 
     ASSERT_ARG(inspectorClient, inspectorClient);

Modified: trunk/Source/WebCore/inspector/InspectorWebGLAgent.cpp (126139 => 126140)


--- trunk/Source/WebCore/inspector/InspectorWebGLAgent.cpp	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/InspectorWebGLAgent.cpp	2012-08-21 07:24:05 UTC (rev 126140)
@@ -34,13 +34,11 @@
 
 #include "InspectorWebGLAgent.h"
 
-#include "InjectedScript.h"
 #include "InjectedScriptManager.h"
 #include "InjectedScriptWebGLModule.h" 
 #include "InspectorFrontend.h"
 #include "InspectorState.h"
 #include "InstrumentingAgents.h"
-#include "Page.h"
 #include "ScriptObject.h"
 #include "ScriptState.h"
 
@@ -50,9 +48,8 @@
 static const char webGLAgentEnabled[] = "webGLAgentEnabled";
 };
 
-InspectorWebGLAgent::InspectorWebGLAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page, InjectedScriptManager* injectedScriptManager)
+InspectorWebGLAgent::InspectorWebGLAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager)
     : InspectorBaseAgent<InspectorWebGLAgent>("WebGL", instrumentingAgents, state)
-    , m_inspectedPage(page)
     , m_injectedScriptManager(injectedScriptManager)
     , m_frontend(0)
     , m_enabled(false)
@@ -98,38 +95,6 @@
     m_state->setBoolean(WebGLAgentState::webGLAgentEnabled, m_enabled);
 }
 
-void InspectorWebGLAgent::dropTraceLog(ErrorString* errorString, const String& traceLogId)
-{
-    InjectedScriptWebGLModule module = injectedScriptWebGLModuleForTraceLogId(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.dropTraceLog(errorString, traceLogId);
-}
-
-void InspectorWebGLAgent::captureFrame(ErrorString* errorString, String* traceLogId)
-{
-    ScriptState* scriptState = mainWorldScriptState(m_inspectedPage->mainFrame());
-    InjectedScriptWebGLModule module = InjectedScriptWebGLModule::moduleForState(m_injectedScriptManager, scriptState);
-    if (module.hasNoValue()) {
-        *errorString = "Inspected frame has gone";
-        return;
-    }
-    module.captureFrame(errorString, traceLogId);
-}
-
-void InspectorWebGLAgent::getTraceLog(ErrorString* errorString, const String& traceLogId, RefPtr<TypeBuilder::WebGL::TraceLog>& traceLog)
-{
-    InjectedScriptWebGLModule module = injectedScriptWebGLModuleForTraceLogId(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.traceLog(errorString, traceLogId, &traceLog);
-}
-
-void InspectorWebGLAgent::replayTraceLog(ErrorString* errorString, const String& traceLogId, int stepNo, String* result)
-{
-    InjectedScriptWebGLModule module = injectedScriptWebGLModuleForTraceLogId(errorString, traceLogId);
-    if (!module.hasNoValue())
-        module.replayTraceLog(errorString, traceLogId, stepNo, result);
-}
-
 ScriptObject InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation(const ScriptObject& glContext)
 {
     if (glContext.hasNoValue()) {
@@ -144,22 +109,6 @@
     return module.wrapWebGLContext(glContext);
 }
 
-InjectedScriptWebGLModule InspectorWebGLAgent::injectedScriptWebGLModuleForTraceLogId(ErrorString* errorString, const String& traceLogId)
-{
-    InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(traceLogId);
-    if (injectedScript.hasNoValue()) {
-        *errorString = "Inspected frame has gone";
-        return InjectedScriptWebGLModule();
-    }
-    InjectedScriptWebGLModule module = InjectedScriptWebGLModule::moduleForState(m_injectedScriptManager, injectedScript.scriptState());
-    if (module.hasNoValue()) {
-        ASSERT_NOT_REACHED();
-        *errorString = "Internal error: no WebGL module";
-        return InjectedScriptWebGLModule();
-    }
-    return module;
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(INSPECTOR) && ENABLE(WEBGL)

Modified: trunk/Source/WebCore/inspector/InspectorWebGLAgent.h (126139 => 126140)


--- trunk/Source/WebCore/inspector/InspectorWebGLAgent.h	2012-08-21 07:17:53 UTC (rev 126139)
+++ trunk/Source/WebCore/inspector/InspectorWebGLAgent.h	2012-08-21 07:24:05 UTC (rev 126140)
@@ -35,7 +35,6 @@
 
 #include "InspectorBaseAgent.h"
 #include "InspectorFrontend.h"
-#include "InspectorTypeBuilder.h"
 #include "PlatformString.h"
 #include "ScriptState.h"
 #include <wtf/PassOwnPtr.h>
@@ -44,19 +43,17 @@
 namespace WebCore {
 
 class InjectedScriptManager;
-class InjectedScriptWebGLModule;
 class InspectorState;
 class InstrumentingAgents;
-class Page;
 class ScriptObject;
 
 typedef String ErrorString;
 
 class InspectorWebGLAgent : public InspectorBaseAgent<InspectorWebGLAgent>, public InspectorBackendDispatcher::WebGLCommandHandler {
 public:
-    static PassOwnPtr<InspectorWebGLAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page, InjectedScriptManager* injectedScriptManager)
+    static PassOwnPtr<InspectorWebGLAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager)
     {
-        return adoptPtr(new InspectorWebGLAgent(instrumentingAgents, state, page, injectedScriptManager));
+        return adoptPtr(new InspectorWebGLAgent(instrumentingAgents, state, injectedScriptManager));
     }
     ~InspectorWebGLAgent();
 
@@ -71,21 +68,14 @@
     // Called from the front-end.
     virtual void enable(ErrorString*);
     virtual void disable(ErrorString*);
-    virtual void dropTraceLog(ErrorString*, const String&);
-    virtual void captureFrame(ErrorString*, String*);
-    virtual void getTraceLog(ErrorString*, const String&, RefPtr<TypeBuilder::WebGL::TraceLog>&);
-    virtual void replayTraceLog(ErrorString*, const String&, int, String*);
 
     // Called from the injected script.
 
     // Called from InspectorInstrumentation
 
 private:
-    InspectorWebGLAgent(InstrumentingAgents*, InspectorState*, Page*, InjectedScriptManager*);
+    InspectorWebGLAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*);
 
-    InjectedScriptWebGLModule injectedScriptWebGLModuleForTraceLogId(ErrorString*, const String&);
-
-    Page* m_inspectedPage;
     InjectedScriptManager* m_injectedScriptManager;
     InspectorFrontend::WebGL* m_frontend;
     bool m_enabled;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to