Changeset 69406 in webkit
- Timestamp:
- Oct 8, 2010 9:39:57 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r69404 r69406 1 2010-10-08 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: save InspectorController in instrumentation cookie 6 https://bugs.webkit.org/show_bug.cgi?id=47406 7 8 * bindings/v8/V8Proxy.cpp: 9 (WebCore::V8Proxy::evaluate): 10 (WebCore::V8Proxy::callFunction): 11 * dom/Document.cpp: 12 (WebCore::Document::recalcStyle): 13 * dom/Node.cpp: 14 (WebCore::Node::dispatchGenericEvent): 15 * html/parser/HTMLDocumentParser.cpp: 16 (WebCore::HTMLDocumentParser::pumpTokenizer): 17 * inspector/InspectorInstrumentation.cpp: 18 * inspector/InspectorInstrumentation.h: 19 * loader/ResourceLoader.cpp: 20 (WebCore::ResourceLoader::didReceiveResponse): 21 (WebCore::ResourceLoader::didReceiveData): 22 * page/DOMTimer.cpp: 23 (WebCore::DOMTimer::fired): 24 * page/DOMWindow.cpp: 25 (WebCore::DOMWindow::dispatchEvent): 26 * page/FrameView.cpp: 27 (WebCore::FrameView::layout): 28 (WebCore::FrameView::paintContents): 29 * rendering/RenderLayerBacking.cpp: 30 (WebCore::RenderLayerBacking::paintContents): 31 * xml/XMLHttpRequest.cpp: 32 (WebCore::XMLHttpRequest::callReadyStateChangeListener): 33 1 34 2010-10-08 Adam Roben <aroben@apple.com> 2 35 -
trunk/WebCore/bindings/js/ScriptController.cpp
r69283 r69406 149 149 exec->globalData().timeoutChecker.stop(); 150 150 151 InspectorInstrumentation::didEvaluateScript( m_frame,cookie);151 InspectorInstrumentation::didEvaluateScript(cookie); 152 152 153 153 // Evaluating the JavaScript could cause the frame to be deallocated -
trunk/WebCore/bindings/v8/V8Proxy.cpp
r69283 r69406 412 412 #endif 413 413 414 InspectorInstrumentation::didEvaluateScript( m_frame,cookie);414 InspectorInstrumentation::didEvaluateScript(cookie); 415 415 416 416 return result; … … 500 500 m_frame->keepAlive(); 501 501 502 InspectorInstrumentationCookie cookie = 0;502 InspectorInstrumentationCookie cookie; 503 503 if (InspectorInstrumentation::hasFrontends()) { 504 504 v8::ScriptOrigin origin = function->GetScriptOrigin(); … … 516 516 m_recursion--; 517 517 518 InspectorInstrumentation::didCallFunction( m_frame,cookie);518 InspectorInstrumentation::didCallFunction(cookie); 519 519 } 520 520 -
trunk/WebCore/dom/Document.cpp
r69286 r69406 1516 1516 } 1517 1517 1518 InspectorInstrumentation::didRecalculateStyle( this,cookie);1518 InspectorInstrumentation::didRecalculateStyle(cookie); 1519 1519 } 1520 1520 -
trunk/WebCore/dom/Node.cpp
r69283 r69406 2686 2686 doneWithDefault: 2687 2687 2688 InspectorInstrumentation::didDispatchEvent( document(),cookie);2688 InspectorInstrumentation::didDispatchEvent(cookie); 2689 2689 2690 2690 return !event->defaultPrevented(); -
trunk/WebCore/html/parser/HTMLDocumentParser.cpp
r69283 r69406 257 257 } 258 258 259 InspectorInstrumentation::didWriteHTML( document(), m_tokenizer->lineNumber(), cookie);259 InspectorInstrumentation::didWriteHTML(cookie, m_tokenizer->lineNumber()); 260 260 } 261 261 -
trunk/WebCore/inspector/InspectorInstrumentation.cpp
r69300 r69406 173 173 InspectorInstrumentationCookie InspectorInstrumentation::willCallFunctionImpl(InspectorController* inspectorController, const String& scriptName, int scriptLine) 174 174 { 175 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 175 int timelineAgentId = 0; 176 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 177 if (timelineAgent) { 176 178 timelineAgent->willCallFunction(scriptName, scriptLine); 177 returntimelineAgent->id();178 } 179 return 0;180 } 181 182 void InspectorInstrumentation::didCallFunctionImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)183 { 184 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))179 timelineAgentId = timelineAgent->id(); 180 } 181 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 182 } 183 184 void InspectorInstrumentation::didCallFunctionImpl(const InspectorInstrumentationCookie& cookie) 185 { 186 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 185 187 timelineAgent->didCallFunction(); 186 188 } … … 188 190 InspectorInstrumentationCookie InspectorInstrumentation::willChangeXHRReadyStateImpl(InspectorController* inspectorController, XMLHttpRequest* request) 189 191 { 192 int timelineAgentId = 0; 190 193 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 191 194 if (timelineAgent && request->hasEventListeners(eventNames().readystatechangeEvent)) { 192 195 timelineAgent->willChangeXHRReadyState(request->url().string(), request->readyState()); 193 returntimelineAgent->id();194 } 195 return 0;196 } 197 198 void InspectorInstrumentation::didChangeXHRReadyStateImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)199 { 200 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))196 timelineAgentId = timelineAgent->id(); 197 } 198 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 199 } 200 201 void InspectorInstrumentation::didChangeXHRReadyStateImpl(const InspectorInstrumentationCookie& cookie) 202 { 203 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 201 204 timelineAgent->didChangeXHRReadyState(); 202 205 } … … 217 220 #endif 218 221 222 int timelineAgentId = 0; 219 223 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 220 224 if (timelineAgent && eventHasListeners(event.type(), window, node, ancestors)) { 221 225 timelineAgent->willDispatchEvent(event); 222 returntimelineAgent->id();223 } 224 return 0;225 } 226 227 void InspectorInstrumentation::didDispatchEventImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)228 { 229 #if ENABLE(JAVASCRIPT_DEBUGGER) 230 if (InspectorDebuggerAgent* debuggerAgent = inspectorController->m_debuggerAgent.get())226 timelineAgentId = timelineAgent->id(); 227 } 228 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 229 } 230 231 void InspectorInstrumentation::didDispatchEventImpl(const InspectorInstrumentationCookie& cookie) 232 { 233 #if ENABLE(JAVASCRIPT_DEBUGGER) 234 if (InspectorDebuggerAgent* debuggerAgent = cookie.first->m_debuggerAgent.get()) 231 235 debuggerAgent->cancelPauseOnNextStatement(); 232 236 #endif 233 237 234 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))238 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 235 239 timelineAgent->didDispatchEvent(); 236 240 } … … 238 242 InspectorInstrumentationCookie InspectorInstrumentation::willDispatchEventOnWindowImpl(InspectorController* inspectorController, const Event& event, DOMWindow* window) 239 243 { 244 int timelineAgentId = 0; 240 245 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 241 246 if (timelineAgent && window->hasEventListeners(event.type())) { 242 247 timelineAgent->willDispatchEvent(event); 243 returntimelineAgent->id();244 } 245 return 0;246 } 247 248 void InspectorInstrumentation::didDispatchEventOnWindowImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)249 { 250 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))248 timelineAgentId = timelineAgent->id(); 249 } 250 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 251 } 252 253 void InspectorInstrumentation::didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie& cookie) 254 { 255 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 251 256 timelineAgent->didDispatchEvent(); 252 257 } … … 254 259 InspectorInstrumentationCookie InspectorInstrumentation::willEvaluateScriptImpl(InspectorController* inspectorController, const String& url, int lineNumber) 255 260 { 256 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 261 int timelineAgentId = 0; 262 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 263 if (timelineAgent) { 257 264 timelineAgent->willEvaluateScript(url, lineNumber); 258 returntimelineAgent->id();259 } 260 return 0;261 } 262 263 void InspectorInstrumentation::didEvaluateScriptImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)264 { 265 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))265 timelineAgentId = timelineAgent->id(); 266 } 267 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 268 } 269 270 void InspectorInstrumentation::didEvaluateScriptImpl(const InspectorInstrumentationCookie& cookie) 271 { 272 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 266 273 timelineAgent->didEvaluateScript(); 267 274 } … … 269 276 InspectorInstrumentationCookie InspectorInstrumentation::willFireTimerImpl(InspectorController* inspectorController, int timerId) 270 277 { 271 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 278 int timelineAgentId = 0; 279 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 280 if (timelineAgent) { 272 281 timelineAgent->willFireTimer(timerId); 273 returntimelineAgent->id();274 } 275 return 0;276 } 277 278 void InspectorInstrumentation::didFireTimerImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)279 { 280 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))282 timelineAgentId = timelineAgent->id(); 283 } 284 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 285 } 286 287 void InspectorInstrumentation::didFireTimerImpl(const InspectorInstrumentationCookie& cookie) 288 { 289 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 281 290 timelineAgent->didFireTimer(); 282 291 } … … 284 293 InspectorInstrumentationCookie InspectorInstrumentation::willLayoutImpl(InspectorController* inspectorController) 285 294 { 286 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 295 int timelineAgentId = 0; 296 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 297 if (timelineAgent) { 287 298 timelineAgent->willLayout(); 288 returntimelineAgent->id();289 } 290 return 0;291 } 292 293 void InspectorInstrumentation::didLayoutImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)294 { 295 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))299 timelineAgentId = timelineAgent->id(); 300 } 301 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 302 } 303 304 void InspectorInstrumentation::didLayoutImpl(const InspectorInstrumentationCookie& cookie) 305 { 306 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 296 307 timelineAgent->didLayout(); 297 308 } … … 299 310 InspectorInstrumentationCookie InspectorInstrumentation::willLoadXHRImpl(InspectorController* inspectorController, XMLHttpRequest* request) 300 311 { 312 int timelineAgentId = 0; 301 313 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 302 314 if (timelineAgent && request->hasEventListeners(eventNames().loadEvent)) { 303 timelineAgent->willLoadXHR(request->url() .string());304 returntimelineAgent->id();305 } 306 return 0;307 } 308 309 void InspectorInstrumentation::didLoadXHRImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)310 { 311 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))315 timelineAgent->willLoadXHR(request->url()); 316 timelineAgentId = timelineAgent->id(); 317 } 318 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 319 } 320 321 void InspectorInstrumentation::didLoadXHRImpl(const InspectorInstrumentationCookie& cookie) 322 { 323 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 312 324 timelineAgent->didLoadXHR(); 313 325 } … … 315 327 InspectorInstrumentationCookie InspectorInstrumentation::willPaintImpl(InspectorController* inspectorController, const IntRect& rect) 316 328 { 317 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 329 int timelineAgentId = 0; 330 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 331 if (timelineAgent) { 318 332 timelineAgent->willPaint(rect); 319 returntimelineAgent->id();320 } 321 return 0;322 } 323 324 void InspectorInstrumentation::didPaintImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)325 { 326 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))333 timelineAgentId = timelineAgent->id(); 334 } 335 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 336 } 337 338 void InspectorInstrumentation::didPaintImpl(const InspectorInstrumentationCookie& cookie) 339 { 340 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 327 341 timelineAgent->didPaint(); 328 342 } … … 330 344 InspectorInstrumentationCookie InspectorInstrumentation::willRecalculateStyleImpl(InspectorController* inspectorController) 331 345 { 332 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 346 int timelineAgentId = 0; 347 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 348 if (timelineAgent) { 333 349 timelineAgent->willRecalculateStyle(); 334 returntimelineAgent->id();335 } 336 return 0;337 } 338 339 void InspectorInstrumentation::didRecalculateStyleImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)340 { 341 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))350 timelineAgentId = timelineAgent->id(); 351 } 352 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 353 } 354 355 void InspectorInstrumentation::didRecalculateStyleImpl(const InspectorInstrumentationCookie& cookie) 356 { 357 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 342 358 timelineAgent->didRecalculateStyle(); 343 359 } … … 345 361 InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceDataImpl(InspectorController* inspectorController, unsigned long identifier) 346 362 { 347 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 363 int timelineAgentId = 0; 364 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 365 if (timelineAgent) { 348 366 timelineAgent->willReceiveResourceData(identifier); 349 returntimelineAgent->id();350 } 351 return 0;352 } 353 354 void InspectorInstrumentation::didReceiveResourceDataImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)355 { 356 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))367 timelineAgentId = timelineAgent->id(); 368 } 369 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 370 } 371 372 void InspectorInstrumentation::didReceiveResourceDataImpl(const InspectorInstrumentationCookie& cookie) 373 { 374 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 357 375 timelineAgent->didReceiveResourceData(); 358 376 } … … 360 378 InspectorInstrumentationCookie InspectorInstrumentation::willReceiveResourceResponseImpl(InspectorController* inspectorController, unsigned long identifier, const ResourceResponse& response) 361 379 { 362 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 380 int timelineAgentId = 0; 381 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 382 if (timelineAgent) { 363 383 timelineAgent->willReceiveResourceResponse(identifier, response); 364 returntimelineAgent->id();365 } 366 return 0;367 } 368 369 void InspectorInstrumentation::didReceiveResourceResponseImpl( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)370 { 371 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))384 timelineAgentId = timelineAgent->id(); 385 } 386 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 387 } 388 389 void InspectorInstrumentation::didReceiveResourceResponseImpl(const InspectorInstrumentationCookie& cookie) 390 { 391 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 372 392 timelineAgent->didReceiveResourceResponse(); 373 393 } … … 375 395 InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InspectorController* inspectorController, unsigned int length, unsigned int startLine) 376 396 { 377 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController)) { 397 int timelineAgentId = 0; 398 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(inspectorController); 399 if (timelineAgent) { 378 400 timelineAgent->willWriteHTML(length, startLine); 379 returntimelineAgent->id();380 } 381 return 0;382 } 383 384 void InspectorInstrumentation::didWriteHTMLImpl( InspectorController* inspectorController, unsigned int endLine, InspectorInstrumentationCookie cookie)385 { 386 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController,cookie))401 timelineAgentId = timelineAgent->id(); 402 } 403 return InspectorInstrumentationCookie(inspectorController, timelineAgentId); 404 } 405 406 void InspectorInstrumentation::didWriteHTMLImpl(const InspectorInstrumentationCookie& cookie, unsigned int endLine) 407 { 408 if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie)) 387 409 timelineAgent->didWriteHTML(endLine); 388 410 } 389 411 390 391 412 bool InspectorInstrumentation::hasFrontend(InspectorController* inspectorController) 392 413 { … … 399 420 } 400 421 401 InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent( InspectorController* inspectorController, InspectorInstrumentationCookiecookie)402 { 403 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent( inspectorController);404 if (timelineAgent && timelineAgent->id() == cookie )422 InspectorTimelineAgent* InspectorInstrumentation::retrieveTimelineAgent(const InspectorInstrumentationCookie& cookie) 423 { 424 InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie.first); 425 if (timelineAgent && timelineAgent->id() == cookie.second) 405 426 return timelineAgent; 406 427 return 0; -
trunk/WebCore/inspector/InspectorInstrumentation.h
r69283 r69406 48 48 class XMLHttpRequest; 49 49 50 typedef intInspectorInstrumentationCookie;50 typedef pair<InspectorController*, int> InspectorInstrumentationCookie; 51 51 52 52 class InspectorInstrumentation { … … 65 65 66 66 static InspectorInstrumentationCookie willCallFunction(Frame*, const String& scriptName, int scriptLine); 67 static void didCallFunction( Frame*, InspectorInstrumentationCookie cookie);67 static void didCallFunction(const InspectorInstrumentationCookie&); 68 68 static InspectorInstrumentationCookie willChangeXHRReadyState(ScriptExecutionContext*, XMLHttpRequest* request); 69 static void didChangeXHRReadyState( ScriptExecutionContext*, InspectorInstrumentationCookie cookie);69 static void didChangeXHRReadyState(const InspectorInstrumentationCookie&); 70 70 static InspectorInstrumentationCookie willDispatchEvent(Document*, const Event& event, DOMWindow* window, Node* node, const Vector<RefPtr<ContainerNode> >& ancestors); 71 static void didDispatchEvent( Document*, InspectorInstrumentationCookie cookie);71 static void didDispatchEvent(const InspectorInstrumentationCookie&); 72 72 static InspectorInstrumentationCookie willDispatchEventOnWindow(Frame*, const Event& event, DOMWindow* window); 73 static void didDispatchEventOnWindow( Frame*, InspectorInstrumentationCookie cookie);73 static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&); 74 74 static InspectorInstrumentationCookie willEvaluateScript(Frame*, const String& url, int lineNumber); 75 static void didEvaluateScript( Frame*, InspectorInstrumentationCookie cookie);75 static void didEvaluateScript(const InspectorInstrumentationCookie&); 76 76 static InspectorInstrumentationCookie willFireTimer(ScriptExecutionContext*, int timerId); 77 static void didFireTimer( ScriptExecutionContext*, InspectorInstrumentationCookie cookie);77 static void didFireTimer(const InspectorInstrumentationCookie&); 78 78 static InspectorInstrumentationCookie willLayout(Frame*); 79 static void didLayout( Frame*, InspectorInstrumentationCookie cookie);80 static InspectorInstrumentationCookie willLoadXHR(ScriptExecutionContext*, XMLHttpRequest* request);81 static void didLoadXHR( ScriptExecutionContext*, InspectorInstrumentationCookie cookie);79 static void didLayout(const InspectorInstrumentationCookie&); 80 static InspectorInstrumentationCookie willLoadXHR(ScriptExecutionContext*, XMLHttpRequest*); 81 static void didLoadXHR(const InspectorInstrumentationCookie&); 82 82 static InspectorInstrumentationCookie willPaint(Frame*, const IntRect& rect); 83 static void didPaint( Frame*, InspectorInstrumentationCookie cookie);83 static void didPaint(const InspectorInstrumentationCookie&); 84 84 static InspectorInstrumentationCookie willRecalculateStyle(Document*); 85 static void didRecalculateStyle( Document*, InspectorInstrumentationCookie cookie);85 static void didRecalculateStyle(const InspectorInstrumentationCookie&); 86 86 static InspectorInstrumentationCookie willReceiveResourceData(Frame*, unsigned long identifier); 87 static void didReceiveResourceData( Frame*, InspectorInstrumentationCookie cookie);87 static void didReceiveResourceData(const InspectorInstrumentationCookie&); 88 88 static InspectorInstrumentationCookie willReceiveResourceResponse(Frame*, unsigned long identifier, const ResourceResponse& response); 89 static void didReceiveResourceResponse( Frame*, InspectorInstrumentationCookie cookie);89 static void didReceiveResourceResponse(const InspectorInstrumentationCookie&); 90 90 static InspectorInstrumentationCookie willWriteHTML(Document*, unsigned int length, unsigned int startLine); 91 static void didWriteHTML( Document*, unsigned int endLine, InspectorInstrumentationCookie cookie);91 static void didWriteHTML(const InspectorInstrumentationCookie&, unsigned int endLine); 92 92 93 93 #if ENABLE(INSPECTOR) … … 115 115 116 116 static InspectorInstrumentationCookie willCallFunctionImpl(InspectorController*, const String& scriptName, int scriptLine); 117 static void didCallFunctionImpl( InspectorController*, InspectorInstrumentationCookie);117 static void didCallFunctionImpl(const InspectorInstrumentationCookie&); 118 118 static InspectorInstrumentationCookie willChangeXHRReadyStateImpl(InspectorController*, XMLHttpRequest* request); 119 static void didChangeXHRReadyStateImpl( InspectorController*, InspectorInstrumentationCookie);119 static void didChangeXHRReadyStateImpl(const InspectorInstrumentationCookie&); 120 120 static InspectorInstrumentationCookie willDispatchEventImpl(InspectorController*, const Event& event, DOMWindow* window, Node* node, const Vector<RefPtr<ContainerNode> >& ancestors); 121 static void didDispatchEventImpl( InspectorController*, InspectorInstrumentationCookie);121 static void didDispatchEventImpl(const InspectorInstrumentationCookie&); 122 122 static InspectorInstrumentationCookie willDispatchEventOnWindowImpl(InspectorController*, const Event& event, DOMWindow* window); 123 static void didDispatchEventOnWindowImpl( InspectorController*, InspectorInstrumentationCookie);123 static void didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie&); 124 124 static InspectorInstrumentationCookie willEvaluateScriptImpl(InspectorController*, const String& url, int lineNumber); 125 static void didEvaluateScriptImpl( InspectorController*, InspectorInstrumentationCookie);125 static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&); 126 126 static InspectorInstrumentationCookie willFireTimerImpl(InspectorController*, int timerId); 127 static void didFireTimerImpl( InspectorController*, InspectorInstrumentationCookie);127 static void didFireTimerImpl(const InspectorInstrumentationCookie&); 128 128 static InspectorInstrumentationCookie willLayoutImpl(InspectorController*); 129 static void didLayoutImpl( InspectorController*, InspectorInstrumentationCookie);129 static void didLayoutImpl(const InspectorInstrumentationCookie&); 130 130 static InspectorInstrumentationCookie willLoadXHRImpl(InspectorController*, XMLHttpRequest* request); 131 static void didLoadXHRImpl( InspectorController*, InspectorInstrumentationCookie);131 static void didLoadXHRImpl(const InspectorInstrumentationCookie&); 132 132 static InspectorInstrumentationCookie willPaintImpl(InspectorController*, const IntRect& rect); 133 static void didPaintImpl( InspectorController*, InspectorInstrumentationCookie);133 static void didPaintImpl(const InspectorInstrumentationCookie&); 134 134 static InspectorInstrumentationCookie willRecalculateStyleImpl(InspectorController*); 135 static void didRecalculateStyleImpl( InspectorController*, InspectorInstrumentationCookie);135 static void didRecalculateStyleImpl(const InspectorInstrumentationCookie&); 136 136 static InspectorInstrumentationCookie willReceiveResourceDataImpl(InspectorController*, unsigned long identifier); 137 static void didReceiveResourceDataImpl( InspectorController*, InspectorInstrumentationCookie);137 static void didReceiveResourceDataImpl(const InspectorInstrumentationCookie&); 138 138 static InspectorInstrumentationCookie willReceiveResourceResponseImpl(InspectorController*, unsigned long identifier, const ResourceResponse& response); 139 static void didReceiveResourceResponseImpl( InspectorController*, InspectorInstrumentationCookie);139 static void didReceiveResourceResponseImpl(const InspectorInstrumentationCookie&); 140 140 static InspectorInstrumentationCookie willWriteHTMLImpl(InspectorController*, unsigned int length, unsigned int startLine); 141 static void didWriteHTMLImpl( InspectorController*, unsigned int endLine, InspectorInstrumentationCookie);141 static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned int endLine); 142 142 143 143 static InspectorController* inspectorControllerForContext(ScriptExecutionContext*); … … 148 148 static bool hasFrontend(InspectorController*); 149 149 static InspectorTimelineAgent* retrieveTimelineAgent(InspectorController*); 150 static InspectorTimelineAgent* retrieveTimelineAgent( InspectorController*, InspectorInstrumentationCookie);150 static InspectorTimelineAgent* retrieveTimelineAgent(const InspectorInstrumentationCookie&); 151 151 152 152 static int s_frontendCounter; … … 244 244 return willCallFunctionImpl(inspectorController, scriptName, scriptLine); 245 245 #endif 246 return 0;247 } 248 249 inline void InspectorInstrumentation::didCallFunction( Frame* frame, InspectorInstrumentationCookiecookie)250 { 251 #if ENABLE(INSPECTOR) 252 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))253 didCallFunctionImpl( inspectorController,cookie);246 return InspectorInstrumentationCookie(); 247 } 248 249 inline void InspectorInstrumentation::didCallFunction(const InspectorInstrumentationCookie& cookie) 250 { 251 #if ENABLE(INSPECTOR) 252 if (hasFrontends() && cookie.first) 253 didCallFunctionImpl(cookie); 254 254 #endif 255 255 } … … 261 261 return willChangeXHRReadyStateImpl(inspectorController, request); 262 262 #endif 263 return 0;264 } 265 266 inline void InspectorInstrumentation::didChangeXHRReadyState( ScriptExecutionContext* context, InspectorInstrumentationCookiecookie)267 { 268 #if ENABLE(INSPECTOR) 269 if ( InspectorController* inspectorController = inspectorControllerForContext(context))270 didChangeXHRReadyStateImpl( inspectorController,cookie);263 return InspectorInstrumentationCookie(); 264 } 265 266 inline void InspectorInstrumentation::didChangeXHRReadyState(const InspectorInstrumentationCookie& cookie) 267 { 268 #if ENABLE(INSPECTOR) 269 if (hasFrontends() && cookie.first) 270 didChangeXHRReadyStateImpl(cookie); 271 271 #endif 272 272 } … … 278 278 return willDispatchEventImpl(inspectorController, event, window, node, ancestors); 279 279 #endif 280 return 0;281 } 282 283 inline void InspectorInstrumentation::didDispatchEvent( Document* document, InspectorInstrumentationCookiecookie)284 { 285 #if ENABLE(INSPECTOR) 286 if ( InspectorController* inspectorController = inspectorControllerForDocument(document))287 didDispatchEventImpl( inspectorController,cookie);280 return InspectorInstrumentationCookie(); 281 } 282 283 inline void InspectorInstrumentation::didDispatchEvent(const InspectorInstrumentationCookie& cookie) 284 { 285 #if ENABLE(INSPECTOR) 286 if (hasFrontends() && cookie.first) 287 didDispatchEventImpl(cookie); 288 288 #endif 289 289 } … … 295 295 return willDispatchEventOnWindowImpl(inspectorController, event, window); 296 296 #endif 297 return 0;298 } 299 300 inline void InspectorInstrumentation::didDispatchEventOnWindow( Frame* frame, InspectorInstrumentationCookiecookie)301 { 302 #if ENABLE(INSPECTOR) 303 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))304 didDispatchEventOnWindowImpl( inspectorController,cookie);297 return InspectorInstrumentationCookie(); 298 } 299 300 inline void InspectorInstrumentation::didDispatchEventOnWindow(const InspectorInstrumentationCookie& cookie) 301 { 302 #if ENABLE(INSPECTOR) 303 if (hasFrontends() && cookie.first) 304 didDispatchEventOnWindowImpl(cookie); 305 305 #endif 306 306 } … … 312 312 return willEvaluateScriptImpl(inspectorController, url, lineNumber); 313 313 #endif 314 return 0;315 } 316 317 inline void InspectorInstrumentation::didEvaluateScript( Frame* frame, InspectorInstrumentationCookiecookie)318 { 319 #if ENABLE(INSPECTOR) 320 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))321 didEvaluateScriptImpl( inspectorController,cookie);314 return InspectorInstrumentationCookie(); 315 } 316 317 inline void InspectorInstrumentation::didEvaluateScript(const InspectorInstrumentationCookie& cookie) 318 { 319 #if ENABLE(INSPECTOR) 320 if (hasFrontends() && cookie.first) 321 didEvaluateScriptImpl(cookie); 322 322 #endif 323 323 } … … 329 329 return willFireTimerImpl(inspectorController, timerId); 330 330 #endif 331 return 0;332 } 333 334 inline void InspectorInstrumentation::didFireTimer( ScriptExecutionContext* context, InspectorInstrumentationCookiecookie)335 { 336 #if ENABLE(INSPECTOR) 337 if ( InspectorController* inspectorController = inspectorControllerForContext(context))338 didFireTimerImpl( inspectorController,cookie);331 return InspectorInstrumentationCookie(); 332 } 333 334 inline void InspectorInstrumentation::didFireTimer(const InspectorInstrumentationCookie& cookie) 335 { 336 #if ENABLE(INSPECTOR) 337 if (hasFrontends() && cookie.first) 338 didFireTimerImpl(cookie); 339 339 #endif 340 340 } … … 346 346 return willLayoutImpl(inspectorController); 347 347 #endif 348 return 0;349 } 350 351 inline void InspectorInstrumentation::didLayout( Frame* frame, InspectorInstrumentationCookiecookie)352 { 353 #if ENABLE(INSPECTOR) 354 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))355 didLayoutImpl( inspectorController,cookie);348 return InspectorInstrumentationCookie(); 349 } 350 351 inline void InspectorInstrumentation::didLayout(const InspectorInstrumentationCookie& cookie) 352 { 353 #if ENABLE(INSPECTOR) 354 if (hasFrontends() && cookie.first) 355 didLayoutImpl(cookie); 356 356 #endif 357 357 } … … 363 363 return willLoadXHRImpl(inspectorController, request); 364 364 #endif 365 return 0;366 } 367 368 inline void InspectorInstrumentation::didLoadXHR( ScriptExecutionContext* context, InspectorInstrumentationCookiecookie)369 { 370 #if ENABLE(INSPECTOR) 371 if ( InspectorController* inspectorController = inspectorControllerForContext(context))372 didLoadXHRImpl( inspectorController,cookie);365 return InspectorInstrumentationCookie(); 366 } 367 368 inline void InspectorInstrumentation::didLoadXHR(const InspectorInstrumentationCookie& cookie) 369 { 370 #if ENABLE(INSPECTOR) 371 if (hasFrontends() && cookie.first) 372 didLoadXHRImpl(cookie); 373 373 #endif 374 374 } … … 380 380 return willPaintImpl(inspectorController, rect); 381 381 #endif 382 return 0;383 } 384 385 inline void InspectorInstrumentation::didPaint( Frame* frame, InspectorInstrumentationCookiecookie)386 { 387 #if ENABLE(INSPECTOR) 388 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))389 didPaintImpl( inspectorController,cookie);382 return InspectorInstrumentationCookie(); 383 } 384 385 inline void InspectorInstrumentation::didPaint(const InspectorInstrumentationCookie& cookie) 386 { 387 #if ENABLE(INSPECTOR) 388 if (hasFrontends() && cookie.first) 389 didPaintImpl(cookie); 390 390 #endif 391 391 } … … 397 397 return willRecalculateStyleImpl(inspectorController); 398 398 #endif 399 return 0;400 } 401 402 inline void InspectorInstrumentation::didRecalculateStyle( Document* document, InspectorInstrumentationCookiecookie)403 { 404 #if ENABLE(INSPECTOR) 405 if ( InspectorController* inspectorController = inspectorControllerForDocument(document))406 didRecalculateStyleImpl( inspectorController,cookie);399 return InspectorInstrumentationCookie(); 400 } 401 402 inline void InspectorInstrumentation::didRecalculateStyle(const InspectorInstrumentationCookie& cookie) 403 { 404 #if ENABLE(INSPECTOR) 405 if (hasFrontends() && cookie.first) 406 didRecalculateStyleImpl(cookie); 407 407 #endif 408 408 } … … 414 414 return willReceiveResourceDataImpl(inspectorController, identifier); 415 415 #endif 416 return 0;417 } 418 419 inline void InspectorInstrumentation::didReceiveResourceData( Frame* frame, InspectorInstrumentationCookiecookie)420 { 421 #if ENABLE(INSPECTOR) 422 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))423 didReceiveResourceDataImpl( inspectorController,cookie);416 return InspectorInstrumentationCookie(); 417 } 418 419 inline void InspectorInstrumentation::didReceiveResourceData(const InspectorInstrumentationCookie& cookie) 420 { 421 #if ENABLE(INSPECTOR) 422 if (hasFrontends() && cookie.first) 423 didReceiveResourceDataImpl(cookie); 424 424 #endif 425 425 } … … 431 431 return willReceiveResourceResponseImpl(inspectorController, identifier, response); 432 432 #endif 433 return 0;434 } 435 436 inline void InspectorInstrumentation::didReceiveResourceResponse( Frame* frame, InspectorInstrumentationCookiecookie)437 { 438 #if ENABLE(INSPECTOR) 439 if ( InspectorController* inspectorController = inspectorControllerForFrame(frame))440 didReceiveResourceResponseImpl( inspectorController,cookie);433 return InspectorInstrumentationCookie(); 434 } 435 436 inline void InspectorInstrumentation::didReceiveResourceResponse(const InspectorInstrumentationCookie& cookie) 437 { 438 #if ENABLE(INSPECTOR) 439 if (hasFrontends() && cookie.first) 440 didReceiveResourceResponseImpl(cookie); 441 441 #endif 442 442 } … … 448 448 return willWriteHTMLImpl(inspectorController, length, startLine); 449 449 #endif 450 return 0;451 } 452 453 inline void InspectorInstrumentation::didWriteHTML( Document* document, unsigned int endLine, InspectorInstrumentationCookie cookie)454 { 455 #if ENABLE(INSPECTOR) 456 if ( InspectorController* inspectorController = inspectorControllerForDocument(document))457 didWriteHTMLImpl( inspectorController, endLine, cookie);450 return InspectorInstrumentationCookie(); 451 } 452 453 inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentationCookie& cookie, unsigned int endLine) 454 { 455 #if ENABLE(INSPECTOR) 456 if (hasFrontends() && cookie.first) 457 didWriteHTMLImpl(cookie, endLine); 458 458 #endif 459 459 } -
trunk/WebCore/loader/ResourceLoader.cpp
r69283 r69406 401 401 void ResourceLoader::didReceiveResponse(ResourceHandle*, const ResourceResponse& response) 402 402 { 403 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame.get(), identifier(), response);404 403 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 405 404 if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(this, response)) 406 405 return; 407 406 #endif 407 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame.get(), identifier(), response); 408 408 didReceiveResponse(response); 409 InspectorInstrumentation::didReceiveResourceResponse( m_frame.get(),cookie);409 InspectorInstrumentation::didReceiveResourceResponse(cookie); 410 410 } 411 411 … … 414 414 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceData(m_frame.get(), identifier()); 415 415 didReceiveData(data, length, lengthReceived, false); 416 InspectorInstrumentation::didReceiveResourceData( m_frame.get(),cookie);416 InspectorInstrumentation::didReceiveResourceData(cookie); 417 417 } 418 418 -
trunk/WebCore/page/DOMTimer.cpp
r69283 r69406 118 118 m_action->execute(context); 119 119 120 InspectorInstrumentation::didFireTimer(co ntext, cookie);120 InspectorInstrumentation::didFireTimer(cookie); 121 121 122 122 return; … … 131 131 action->execute(context); 132 132 133 InspectorInstrumentation::didFireTimer(co ntext, cookie);133 InspectorInstrumentation::didFireTimer(cookie); 134 134 135 135 timerNestingLevel = 0; -
trunk/WebCore/page/DOMWindow.cpp
r69283 r69406 1536 1536 bool result = fireEventListeners(event.get()); 1537 1537 1538 InspectorInstrumentation::didDispatchEventOnWindow( frame(),cookie);1538 InspectorInstrumentation::didDispatchEventOnWindow(cookie); 1539 1539 1540 1540 return result; -
trunk/WebCore/page/FrameView.cpp
r69283 r69406 838 838 } 839 839 840 InspectorInstrumentation::didLayout( m_frame.get(),cookie);840 InspectorInstrumentation::didLayout(cookie); 841 841 842 842 m_nestedLayoutCount--; … … 2001 2001 sCurrentPaintTimeStamp = 0; 2002 2002 2003 InspectorInstrumentation::didPaint( m_frame.get(),cookie);2003 InspectorInstrumentation::didPaint(cookie); 2004 2004 } 2005 2005 -
trunk/WebCore/rendering/RenderLayerBacking.cpp
r69283 r69406 1083 1083 paintIntoLayer(m_owningLayer, &context, dirtyRect, PaintBehaviorNormal, paintingPhase, renderer()); 1084 1084 1085 InspectorInstrumentation::didPaint( m_owningLayer->renderer()->frame(),cookie);1085 InspectorInstrumentation::didPaint(cookie); 1086 1086 } 1087 1087 -
trunk/WebCore/xml/XMLHttpRequest.cpp
r69283 r69406 309 309 m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().readystatechangeEvent), m_state == DONE ? FlushProgressEvent : DoNotFlushProgressEvent); 310 310 311 InspectorInstrumentation::didChangeXHRReadyState( scriptExecutionContext(),cookie);311 InspectorInstrumentation::didChangeXHRReadyState(cookie); 312 312 313 313 if (m_state == DONE && !m_error) { 314 314 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willLoadXHR(scriptExecutionContext(), this); 315 315 m_progressEventThrottle.dispatchEvent(XMLHttpRequestProgressEvent::create(eventNames().loadEvent)); 316 InspectorInstrumentation::didLoadXHR( scriptExecutionContext(),cookie);316 InspectorInstrumentation::didLoadXHR(cookie); 317 317 } 318 318 }
Note: See TracChangeset
for help on using the changeset viewer.