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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp

Issue 2318853002: [DevTools] Handle navigation in console.log (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 void V8RuntimeAgentImpl::enable(ErrorString* errorString) 610 void V8RuntimeAgentImpl::enable(ErrorString* errorString)
611 { 611 {
612 if (m_enabled) 612 if (m_enabled)
613 return; 613 return;
614 m_inspector->client()->beginEnsureAllContextsInGroup(m_session->contextGroup Id()); 614 m_inspector->client()->beginEnsureAllContextsInGroup(m_session->contextGroup Id());
615 m_enabled = true; 615 m_enabled = true;
616 m_state->setBoolean(V8RuntimeAgentImplState::runtimeEnabled, true); 616 m_state->setBoolean(V8RuntimeAgentImplState::runtimeEnabled, true);
617 m_inspector->enableStackCapturingIfNeeded(); 617 m_inspector->enableStackCapturingIfNeeded();
618 m_session->reportAllContexts(this); 618 m_session->reportAllContexts(this);
619 V8ConsoleMessageStorage* storage = m_inspector->ensureConsoleMessageStorage( m_session->contextGroupId()); 619 V8ConsoleMessageStorage* storage = m_inspector->ensureConsoleMessageStorage( m_session->contextGroupId());
620 for (const auto& message : storage->messages()) 620 for (const auto& message : storage->messages()) {
621 reportMessage(message.get(), false); 621 reportMessage(message.get(), false);
dgozman 2016/09/07 00:21:03 if (!reportMessage(...)) return;
kozy 2016/09/07 00:50:16 Done.
622 if (!m_inspector->hasConsoleMessageStorage(m_session->contextGroupId()))
623 return;
624 }
622 } 625 }
623 626
624 void V8RuntimeAgentImpl::disable(ErrorString* errorString) 627 void V8RuntimeAgentImpl::disable(ErrorString* errorString)
625 { 628 {
626 if (!m_enabled) 629 if (!m_enabled)
627 return; 630 return;
628 m_enabled = false; 631 m_enabled = false;
629 m_state->setBoolean(V8RuntimeAgentImplState::runtimeEnabled, false); 632 m_state->setBoolean(V8RuntimeAgentImplState::runtimeEnabled, false);
630 m_inspector->disableStackCapturingIfNeeded(); 633 m_inspector->disableStackCapturingIfNeeded();
631 m_session->discardInjectedScripts(); 634 m_session->discardInjectedScripts();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 reportMessage(message, true); 682 reportMessage(message, true);
680 } 683 }
681 684
682 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review) 685 void V8RuntimeAgentImpl::reportMessage(V8ConsoleMessage* message, bool generateP review)
683 { 686 {
684 message->reportToFrontend(&m_frontend, m_session, generatePreview); 687 message->reportToFrontend(&m_frontend, m_session, generatePreview);
685 m_frontend.flush(); 688 m_frontend.flush();
686 } 689 }
687 690
688 } // namespace v8_inspector 691 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698