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

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 return; 824 return;
825 String sourceOrigin = sourceDocument->securityOrigin()->toString(); 825 String sourceOrigin = sourceDocument->securityOrigin()->toString();
826 826
827 // Capture stack trace only when inspector front-end is loaded as it may be time consuming. 827 // Capture stack trace only when inspector front-end is loaded as it may be time consuming.
828 RefPtr<ScriptCallStack> stackTrace; 828 RefPtr<ScriptCallStack> stackTrace;
829 if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument)) 829 if (InspectorInstrumentation::consoleAgentEnabled(sourceDocument))
830 stackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCa pture, true); 830 stackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCa pture, true);
831 831
832 // Schedule the message. 832 // Schedule the message.
833 PostMessageTimer* timer = new PostMessageTimer(*this, message, sourceOrigin, source, channels.release(), target.get(), stackTrace.release()); 833 PostMessageTimer* timer = new PostMessageTimer(*this, message, sourceOrigin, source, channels.release(), target.get(), stackTrace.release());
834 timer->startOneShot(0); 834 timer->startOneShot(0, FROM_HERE);
835 timer->suspendIfNeeded(); 835 timer->suspendIfNeeded();
836 } 836 }
837 837
838 void DOMWindow::postMessageTimerFired(PassOwnPtr<PostMessageTimer> t) 838 void DOMWindow::postMessageTimerFired(PassOwnPtr<PostMessageTimer> t)
839 { 839 {
840 OwnPtr<PostMessageTimer> timer(t); 840 OwnPtr<PostMessageTimer> timer(t);
841 841
842 if (!isCurrentlyDisplayedInFrame()) 842 if (!isCurrentlyDisplayedInFrame())
843 return; 843 return;
844 844
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier()); 1812 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier());
1813 } 1813 }
1814 1814
1815 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() 1815 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
1816 { 1816 {
1817 return DOMWindowLifecycleNotifier::create(this); 1817 return DOMWindowLifecycleNotifier::create(this);
1818 } 1818 }
1819 1819
1820 1820
1821 } // namespace WebCore 1821 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698