Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 892693006: Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (Closed)

Created:
5 years, 10 months ago by dcheng
Modified:
5 years, 10 months ago
Reviewers:
kozy, dgozman, yurys, pfeldman
CC:
blink-reviews, eae+blinkwatch, apavlov+blink_chromium.org, aandrey+blink_chromium.org, rwlbuis, caseq+blink_chromium.org, arv+blink, malch+blink_chromium.org, yurys+blink_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, loislo+blink_chromium.org, sof, lushnikov+blink_chromium.org, eustas+blink_chromium.org, paulirish+reviews_chromium.org, Nate Chapin, tyoshino+watch_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, Inactive, sergeyv+blink_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. (patchset #5 id:80001 of https://codereview.chromium.org/898593002/) Reason for revert: Speculatively reverting to try to fix telemetry_unittests failures in Blink roll: http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/22581 DevtoolsTargetCrashException: Devtools target crashed Original issue's description: > DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones. > This change also migrates all the agents to the new inspector's InspectorPageAgent::mainFrame() notion which is now localFrameRoot(). > > BUG=451004 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189412 TBR=yurys@chromium.org,dgozman@chromium.org,kozyatinskiy@chromium.org,pfeldman@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=451004

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -276 lines) Patch
M Source/bindings/core/v8/PageScriptDebugServer.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/bindings/core/v8/PageScriptDebugServer.cpp View 5 chunks +18 lines, -20 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/FrameHost.h View 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/frame/FrameHost.cpp View 2 chunks +0 lines, -6 lines 0 comments Download
M Source/core/frame/FrameView.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/frame/LocalFrame.h View 3 chunks +0 lines, -6 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 4 chunks +0 lines, -13 lines 0 comments Download
M Source/core/inspector/InspectorApplicationCacheAgent.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorApplicationCacheAgent.cpp View 2 chunks +8 lines, -7 lines 0 comments Download
M Source/core/inspector/InspectorCanvasAgent.cpp View 6 chunks +8 lines, -8 lines 0 comments Download
M Source/core/inspector/InspectorController.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/inspector/InspectorController.cpp View 8 chunks +16 lines, -15 lines 0 comments Download
M Source/core/inspector/InspectorDOMAgent.cpp View 6 chunks +17 lines, -10 lines 0 comments Download
M Source/core/inspector/InspectorDOMStorageAgent.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorDOMStorageAgent.cpp View 3 chunks +5 lines, -4 lines 0 comments Download
M Source/core/inspector/InspectorInputAgent.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/core/inspector/InspectorInputAgent.cpp View 4 chunks +10 lines, -11 lines 0 comments Download
M Source/core/inspector/InspectorInspectorAgent.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/core/inspector/InspectorInspectorAgent.cpp View 3 chunks +6 lines, -6 lines 0 comments Download
M Source/core/inspector/InspectorInstrumentation.h View 5 chunks +14 lines, -4 lines 0 comments Download
M Source/core/inspector/InspectorInstrumentation.cpp View 3 chunks +16 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorInstrumentation.idl View 5 chunks +6 lines, -6 lines 0 comments Download
M Source/core/inspector/InspectorInstrumentationCustomInl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/inspector/InspectorLayerTreeAgent.h View 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/inspector/InspectorLayerTreeAgent.cpp View 5 chunks +8 lines, -8 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.h View 3 chunks +3 lines, -4 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.cpp View 20 chunks +35 lines, -41 lines 0 comments Download
M Source/core/inspector/InspectorResourceAgent.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorResourceContentLoader.h View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorResourceContentLoader.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/inspector/InspectorTimelineAgent.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorTimelineAgent.cpp View 7 chunks +9 lines, -9 lines 0 comments Download
M Source/core/inspector/InspectorTraceEvents.h View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorTraceEvents.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorTracingAgent.h View 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/inspector/InspectorTracingAgent.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/inspector/PageConsoleAgent.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/core/inspector/PageConsoleAgent.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M Source/core/inspector/PageDebuggerAgent.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M Source/core/inspector/PageRuntimeAgent.h View 3 chunks +5 lines, -3 lines 0 comments Download
M Source/core/inspector/PageRuntimeAgent.cpp View 4 chunks +5 lines, -3 lines 0 comments Download
M Source/core/page/Chrome.cpp View 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/page/Page.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/storage/StorageArea.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M Source/web/WebDevToolsAgentImpl.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
dcheng
Created Revert of DevTools: use per-LocalFrame instrumenting agents instead of per-Page ones.
5 years, 10 months ago (2015-02-05 00:11:41 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/892693006/1
5 years, 10 months ago (2015-02-05 00:12:37 UTC) #2
commit-bot: I haz the power
5 years, 10 months ago (2015-02-05 00:13:02 UTC) #4
Failed to apply patch for Source/core/inspector/InspectorController.cpp:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file Source/core/inspector/InspectorController.cpp
  Hunk #2 FAILED at 83.
  Hunk #3 succeeded at 88 (offset -3 lines).
  Hunk #4 succeeded at 98 (offset -3 lines).
  Hunk #5 succeeded at 109 (offset -3 lines).
  Hunk #6 succeeded at 145 (offset -3 lines).
  Hunk #7 succeeded at 211 with fuzz 1 (offset -3 lines).
  Hunk #8 FAILED at 249.
  2 out of 8 hunks FAILED -- saving rejects to file
Source/core/inspector/InspectorController.cpp.rej

Patch:       Source/core/inspector/InspectorController.cpp
Index: Source/core/inspector/InspectorController.cpp
diff --git a/Source/core/inspector/InspectorController.cpp
b/Source/core/inspector/InspectorController.cpp
index
9e609e8258a8f8406fb2758e09faec3d74c7479c..283e859218414d567668f5031b952bfd22182e0e
100644
--- a/Source/core/inspector/InspectorController.cpp
+++ b/Source/core/inspector/InspectorController.cpp
@@ -34,7 +34,6 @@
 #include "bindings/core/v8/DOMWrapperWorld.h"
 #include "core/InspectorBackendDispatcher.h"
 #include "core/InspectorFrontend.h"
-#include "core/frame/FrameHost.h"
 #include "core/inspector/AsyncCallTracker.h"
 #include "core/inspector/IdentifiersFactory.h"
 #include "core/inspector/InjectedScriptHost.h"
@@ -84,6 +83,7 @@
     , m_layerTreeAgent(nullptr)
     , m_animationAgent(nullptr)
     , m_inspectorFrontendClient(nullptr)
+    , m_page(page)
     , m_inspectorClient(inspectorClient)
     , m_agents(m_instrumentingAgents.get(), m_state.get())
     , m_isUnderTest(false)
@@ -92,9 +92,9 @@
     InjectedScriptManager* injectedScriptManager =
m_injectedScriptManager.get();
     InspectorOverlay* overlay = m_overlay.get();
 
-    m_agents.append(InspectorInspectorAgent::create(this,
injectedScriptManager));
-
-    OwnPtrWillBeRawPtr<InspectorPageAgent>
pageAgentPtr(InspectorPageAgent::create(page, injectedScriptManager,
inspectorClient, overlay));
+    m_agents.append(InspectorInspectorAgent::create(m_page,
injectedScriptManager));
+
+    OwnPtrWillBeRawPtr<InspectorPageAgent>
pageAgentPtr(InspectorPageAgent::create(m_page, injectedScriptManager,
inspectorClient, overlay));
     m_pageAgent = pageAgentPtr.get();
     m_agents.append(pageAgentPtr.release());
 
@@ -102,7 +102,7 @@
     m_domAgent = domAgentPtr.get();
     m_agents.append(domAgentPtr.release());
 
-    OwnPtrWillBeRawPtr<InspectorLayerTreeAgent>
layerTreeAgentPtr(InspectorLayerTreeAgent::create(m_pageAgent));
+    OwnPtrWillBeRawPtr<InspectorLayerTreeAgent>
layerTreeAgentPtr(InspectorLayerTreeAgent::create(m_page));
     m_layerTreeAgent = layerTreeAgentPtr.get();
     m_agents.append(layerTreeAgentPtr.release());
 
@@ -113,12 +113,12 @@
 
     PageScriptDebugServer* pageScriptDebugServer =
&PageScriptDebugServer::shared();
 
-    m_agents.append(PageRuntimeAgent::create(injectedScriptManager,
inspectorClient, pageScriptDebugServer, m_pageAgent));
-
-    OwnPtrWillBeRawPtr<PageConsoleAgent> pageConsoleAgentPtr =
PageConsoleAgent::create(injectedScriptManager, m_domAgent, m_pageAgent);
+    m_agents.append(PageRuntimeAgent::create(injectedScriptManager,
inspectorClient, pageScriptDebugServer, m_page, m_pageAgent));
+
+    OwnPtrWillBeRawPtr<PageConsoleAgent> pageConsoleAgentPtr =
PageConsoleAgent::create(injectedScriptManager, m_domAgent, m_page);
     OwnPtrWillBeRawPtr<InspectorWorkerAgent> workerAgentPtr =
InspectorWorkerAgent::create(pageConsoleAgentPtr.get());
 
-    OwnPtrWillBeRawPtr<InspectorTracingAgent> tracingAgentPtr =
InspectorTracingAgent::create(inspectorClient, workerAgentPtr.get(),
m_pageAgent);
+    OwnPtrWillBeRawPtr<InspectorTracingAgent> tracingAgentPtr =
InspectorTracingAgent::create(inspectorClient, workerAgentPtr.get(), page);
     m_tracingAgent = tracingAgentPtr.get();
     m_agents.append(tracingAgentPtr.release());
 
@@ -149,6 +149,7 @@
     visitor->trace(m_layerTreeAgent);
     visitor->trace(m_tracingAgent);
     visitor->trace(m_inspectorBackendDispatcher);
+    visitor->trace(m_page);
     visitor->trace(m_agents);
 }
 
@@ -214,21 +215,21 @@
 
     m_agents.append(InspectorCanvasAgent::create(m_pageAgent,
injectedScriptManager));
 
-    m_agents.append(InspectorInputAgent::create(m_pageAgent,
m_inspectorClient));
+    m_agents.append(InspectorInputAgent::create(m_page, m_inspectorClient));
 }
 
 void InspectorController::willBeDestroyed()
 {
 #if ENABLE(ASSERT)
-    Frame* frame = m_pageAgent->frameHost()->page().mainFrame();
-    ASSERT(frame);
-    if (frame->isLocalFrame())
-        ASSERT(m_pageAgent->inspectedFrame()->view());
+    ASSERT(m_page->mainFrame());
+    if (m_page->mainFrame()->isLocalFrame())
+        ASSERT(m_page->deprecatedLocalMainFrame()->view());
 #endif
 
     disconnectFrontend();
     m_injectedScriptManager->disconnect();
     m_inspectorClient = 0;
+    m_page = nullptr;
     m_instrumentingAgents->reset();
     m_agents.discardAgents();
     if (m_inspectorFrontendClient)
@@ -249,7 +250,7 @@
 {
     // If the page is supposed to serve as InspectorFrontend notify inspector
frontend
     // client that it's cleared so that the client can expose inspector
bindings.
-    if (m_inspectorFrontendClient && frame == m_pageAgent->inspectedFrame())
+    if (m_inspectorFrontendClient && frame == m_page->mainFrame())
         m_inspectorFrontendClient->windowObjectCleared();
 }

Powered by Google App Engine
This is Rietveld 408576698