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

Side by Side Diff: Source/core/inspector/InspectorInstrumentation.h

Issue 1301323008: Fix data race in InspectorInstrumentation::hasFrontends (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 STATIC_ONLY(FrontendCounter); 84 STATIC_ONLY(FrontendCounter);
85 private: 85 private:
86 friend void frontendCreated(); 86 friend void frontendCreated();
87 friend void frontendDeleted(); 87 friend void frontendDeleted();
88 friend bool hasFrontends(); 88 friend bool hasFrontends();
89 static int s_frontendCounter; 89 static int s_frontendCounter;
90 }; 90 };
91 91
92 inline void frontendCreated() { atomicIncrement(&FrontendCounter::s_frontendCoun ter); } 92 inline void frontendCreated() { atomicIncrement(&FrontendCounter::s_frontendCoun ter); }
93 inline void frontendDeleted() { atomicDecrement(&FrontendCounter::s_frontendCoun ter); } 93 inline void frontendDeleted() { atomicDecrement(&FrontendCounter::s_frontendCoun ter); }
94 inline bool hasFrontends() { return FrontendCounter::s_frontendCounter; } 94 inline bool hasFrontends() { return acquireLoad(&FrontendCounter::s_frontendCoun ter); }
95 95
96 CORE_EXPORT void registerInstrumentingAgents(InstrumentingAgents*); 96 CORE_EXPORT void registerInstrumentingAgents(InstrumentingAgents*);
97 CORE_EXPORT void unregisterInstrumentingAgents(InstrumentingAgents*); 97 CORE_EXPORT void unregisterInstrumentingAgents(InstrumentingAgents*);
98 98
99 // Called from generated instrumentation code. 99 // Called from generated instrumentation code.
100 CORE_EXPORT InstrumentingAgents* instrumentingAgentsFor(LocalFrame*); 100 CORE_EXPORT InstrumentingAgents* instrumentingAgentsFor(LocalFrame*);
101 InstrumentingAgents* instrumentingAgentsFor(EventTarget*); 101 InstrumentingAgents* instrumentingAgentsFor(EventTarget*);
102 InstrumentingAgents* instrumentingAgentsFor(ExecutionContext*); 102 InstrumentingAgents* instrumentingAgentsFor(ExecutionContext*);
103 InstrumentingAgents* instrumentingAgentsFor(Document&); 103 InstrumentingAgents* instrumentingAgentsFor(Document&);
104 InstrumentingAgents* instrumentingAgentsFor(Document*); 104 InstrumentingAgents* instrumentingAgentsFor(Document*);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 } // namespace blink 174 } // namespace blink
175 175
176 #include "core/InspectorInstrumentationInl.h" 176 #include "core/InspectorInstrumentationInl.h"
177 177
178 #include "core/inspector/InspectorInstrumentationCustomInl.h" 178 #include "core/inspector/InspectorInstrumentationCustomInl.h"
179 179
180 #include "core/InspectorOverridesInl.h" 180 #include "core/InspectorOverridesInl.h"
181 181
182 #endif // !defined(InspectorInstrumentation_h) 182 #endif // !defined(InspectorInstrumentation_h)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698