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

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

Issue 2151273003: [DevTools] Move browser logging from Console domain to Log domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internals-method
Patch Set: protocol improvements Created 4 years, 5 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 { 388 {
389 DCHECK(m_injectedScript && !m_context.IsEmpty() && !m_commandLineAPIScope.ge t()); 389 DCHECK(m_injectedScript && !m_context.IsEmpty() && !m_commandLineAPIScope.ge t());
390 m_commandLineAPIScope.reset(new V8Console::CommandLineAPIScope(m_context, m_ injectedScript->commandLineAPI(), m_context->Global())); 390 m_commandLineAPIScope.reset(new V8Console::CommandLineAPIScope(m_context, m_ injectedScript->commandLineAPI(), m_context->Global()));
391 return true; 391 return true;
392 } 392 }
393 393
394 void InjectedScript::Scope::ignoreExceptionsAndMuteConsole() 394 void InjectedScript::Scope::ignoreExceptionsAndMuteConsole()
395 { 395 {
396 DCHECK(!m_ignoreExceptionsAndMuteConsole); 396 DCHECK(!m_ignoreExceptionsAndMuteConsole);
397 m_ignoreExceptionsAndMuteConsole = true; 397 m_ignoreExceptionsAndMuteConsole = true;
398 m_debugger->client()->muteWarningsAndDeprecations(); 398 m_debugger->client()->muteWarningsAndDeprecations(m_contextGroupId);
399 m_previousPauseOnExceptionsState = setPauseOnExceptionsState(V8DebuggerImpl: :DontPauseOnExceptions); 399 m_previousPauseOnExceptionsState = setPauseOnExceptionsState(V8DebuggerImpl: :DontPauseOnExceptions);
400 } 400 }
401 401
402 V8DebuggerImpl::PauseOnExceptionsState InjectedScript::Scope::setPauseOnExceptio nsState(V8DebuggerImpl::PauseOnExceptionsState newState) 402 V8DebuggerImpl::PauseOnExceptionsState InjectedScript::Scope::setPauseOnExceptio nsState(V8DebuggerImpl::PauseOnExceptionsState newState)
403 { 403 {
404 if (!m_debugger->enabled()) 404 if (!m_debugger->enabled())
405 return newState; 405 return newState;
406 V8DebuggerImpl::PauseOnExceptionsState presentState = m_debugger->getPauseOn ExceptionsState(); 406 V8DebuggerImpl::PauseOnExceptionsState presentState = m_debugger->getPauseOn ExceptionsState();
407 if (presentState != newState) 407 if (presentState != newState)
408 m_debugger->setPauseOnExceptionsState(newState); 408 m_debugger->setPauseOnExceptionsState(newState);
(...skipping 13 matching lines...) Expand all
422 if (!m_context.IsEmpty()) { 422 if (!m_context.IsEmpty()) {
423 m_context->Exit(); 423 m_context->Exit();
424 m_context.Clear(); 424 m_context.Clear();
425 } 425 }
426 } 426 }
427 427
428 InjectedScript::Scope::~Scope() 428 InjectedScript::Scope::~Scope()
429 { 429 {
430 if (m_ignoreExceptionsAndMuteConsole) { 430 if (m_ignoreExceptionsAndMuteConsole) {
431 setPauseOnExceptionsState(m_previousPauseOnExceptionsState); 431 setPauseOnExceptionsState(m_previousPauseOnExceptionsState);
432 m_debugger->client()->unmuteWarningsAndDeprecations(); 432 m_debugger->client()->unmuteWarningsAndDeprecations(m_contextGroupId);
433 } 433 }
434 if (m_userGesture) 434 if (m_userGesture)
435 m_debugger->client()->endUserGesture(); 435 m_debugger->client()->endUserGesture();
436 cleanup(); 436 cleanup();
437 } 437 }
438 438
439 InjectedScript::ContextScope::ContextScope(ErrorString* errorString, V8DebuggerI mpl* debugger, int contextGroupId, int executionContextId) 439 InjectedScript::ContextScope::ContextScope(ErrorString* errorString, V8DebuggerI mpl* debugger, int contextGroupId, int executionContextId)
440 : InjectedScript::Scope(errorString, debugger, contextGroupId) 440 : InjectedScript::Scope(errorString, debugger, contextGroupId)
441 , m_executionContextId(executionContextId) 441 , m_executionContextId(executionContextId)
442 { 442 {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session) 488 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session)
489 { 489 {
490 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId); 490 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId);
491 if (!remoteId) 491 if (!remoteId)
492 return; 492 return;
493 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); 493 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal());
494 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() ); 494 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() );
495 } 495 }
496 496
497 } // namespace blink 497 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698