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

Unified Diff: Source/core/inspector/InspectorInstrumentation.cpp

Issue 1004113004: [DevTools] Do not instrument with InspectorInspectorAgent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ASSERT(isMainThread) Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorInstrumentation.cpp
diff --git a/Source/core/inspector/InspectorInstrumentation.cpp b/Source/core/inspector/InspectorInstrumentation.cpp
index db213f555098aabba10a2990c5e5faed37fd9795..735af2ccf397ec6fd76699bf982a2bcd0bd81dd0 100644
--- a/Source/core/inspector/InspectorInstrumentation.cpp
+++ b/Source/core/inspector/InspectorInstrumentation.cpp
@@ -37,7 +37,6 @@
#include "core/inspector/InspectorCSSAgent.h"
#include "core/inspector/InspectorConsoleAgent.h"
#include "core/inspector/InspectorDebuggerAgent.h"
-#include "core/inspector/InspectorInspectorAgent.h"
#include "core/inspector/InspectorProfilerAgent.h"
#include "core/inspector/InspectorResourceAgent.h"
#include "core/inspector/InstrumentingAgents.h"
@@ -109,6 +108,7 @@ void continueWithPolicyIgnoreImpl(LocalFrame* frame, DocumentLoader* loader, uns
void willDestroyResourceImpl(Resource* cachedResource)
{
+ ASSERT(isMainThread());
if (!instrumentingAgentsSet)
return;
for (InstrumentingAgents* instrumentingAgents: *instrumentingAgentsSet) {
@@ -119,9 +119,10 @@ void willDestroyResourceImpl(Resource* cachedResource)
bool collectingHTMLParseErrorsImpl(InstrumentingAgents* instrumentingAgents)
{
- if (InspectorInspectorAgent* inspectorAgent = instrumentingAgents->inspectorInspectorAgent())
- return inspectorAgent->hasFrontend();
- return false;
+ ASSERT(isMainThread());
+ if (!instrumentingAgentsSet)
+ return false;
+ return instrumentingAgentsSet->contains(instrumentingAgents);
}
void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* callStack)
@@ -148,6 +149,7 @@ bool consoleAgentEnabled(ExecutionContext* executionContext)
void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
{
+ ASSERT(isMainThread());
if (!instrumentingAgentsSet)
instrumentingAgentsSet = new HashSet<InstrumentingAgents*>();
instrumentingAgentsSet->add(instrumentingAgents);
@@ -155,6 +157,7 @@ void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
void unregisterInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
{
+ ASSERT(isMainThread());
if (!instrumentingAgentsSet)
return;
instrumentingAgentsSet->remove(instrumentingAgents);
« no previous file with comments | « Source/core/inspector/InspectorInspectorAgent.cpp ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698