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

Side by Side Diff: Source/web/WebDevToolsFrontendImpl.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/ValidationMessageClientImpl.cpp ('k') | Source/web/WebFrameImpl.cpp » ('j') | 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 { 108 {
109 m_messages.append(message); 109 m_messages.append(message);
110 maybeDispatch(0); 110 maybeDispatch(0);
111 } 111 }
112 112
113 void WebDevToolsFrontendImpl::resume() 113 void WebDevToolsFrontendImpl::resume()
114 { 114 {
115 // We should call maybeDispatch asynchronously here because we are not allow ed to update activeDOMObjects list in 115 // We should call maybeDispatch asynchronously here because we are not allow ed to update activeDOMObjects list in
116 // resume (See ExecutionContext::resumeActiveDOMObjects). 116 // resume (See ExecutionContext::resumeActiveDOMObjects).
117 if (!m_inspectorFrontendDispatchTimer.isActive()) 117 if (!m_inspectorFrontendDispatchTimer.isActive())
118 m_inspectorFrontendDispatchTimer.startOneShot(0); 118 m_inspectorFrontendDispatchTimer.startOneShot(0, FROM_HERE);
119 } 119 }
120 120
121 void WebDevToolsFrontendImpl::maybeDispatch(WebCore::Timer<WebDevToolsFrontendIm pl>*) 121 void WebDevToolsFrontendImpl::maybeDispatch(WebCore::Timer<WebDevToolsFrontendIm pl>*)
122 { 122 {
123 while (!m_messages.isEmpty()) { 123 while (!m_messages.isEmpty()) {
124 Document* document = m_webViewImpl->page()->mainFrame()->document(); 124 Document* document = m_webViewImpl->page()->mainFrame()->document();
125 if (document->activeDOMObjectsAreSuspended()) { 125 if (document->activeDOMObjectsAreSuspended()) {
126 m_inspectorFrontendResumeObserver = adoptPtr(new InspectorFrontendRe sumeObserver(this, document)); 126 m_inspectorFrontendResumeObserver = adoptPtr(new InspectorFrontendRe sumeObserver(this, document));
127 return; 127 return;
128 } 128 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF unction); 162 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchF unction);
163 Vector< v8::Handle<v8::Value> > args; 163 Vector< v8::Handle<v8::Value> > args;
164 args.append(v8String(isolate, message)); 164 args.append(v8String(isolate, message));
165 v8::TryCatch tryCatch; 165 v8::TryCatch tryCatch;
166 tryCatch.SetVerbose(true); 166 tryCatch.SetVerbose(true);
167 ScriptController::callFunction(frame->frame()->document(), function, dispatc herObject, args.size(), args.data(), isolate); 167 ScriptController::callFunction(frame->frame()->document(), function, dispatc herObject, args.size(), args.data(), isolate);
168 } 168 }
169 169
170 } // namespace blink 170 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ValidationMessageClientImpl.cpp ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698