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

Side by Side Diff: third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp

Issue 2199943004: [DevTools] Rename V8Debugger to V8Inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 int WorkerThreadDebugger::contextGroupId(ExecutionContext* context) 79 int WorkerThreadDebugger::contextGroupId(ExecutionContext* context)
80 { 80 {
81 if (!context) 81 if (!context)
82 return 0; 82 return 0;
83 DCHECK(context == m_workerThread->globalScope()); 83 DCHECK(context == m_workerThread->globalScope());
84 return workerContextGroupId; 84 return workerContextGroupId;
85 } 85 }
86 86
87 void WorkerThreadDebugger::contextCreated(v8::Local<v8::Context> context) 87 void WorkerThreadDebugger::contextCreated(v8::Local<v8::Context> context)
88 { 88 {
89 debugger()->contextCreated(V8ContextInfo(context, workerContextGroupId, true , m_workerThread->globalScope()->url().getString(), "", "", false)); 89 v8Inspector()->contextCreated(V8ContextInfo(context, workerContextGroupId, t rue, m_workerThread->globalScope()->url().getString(), "", "", false));
90 } 90 }
91 91
92 void WorkerThreadDebugger::contextWillBeDestroyed(v8::Local<v8::Context> context ) 92 void WorkerThreadDebugger::contextWillBeDestroyed(v8::Local<v8::Context> context )
93 { 93 {
94 debugger()->contextDestroyed(context); 94 v8Inspector()->contextDestroyed(context);
95 } 95 }
96 96
97 void WorkerThreadDebugger::exceptionThrown(ErrorEvent* event) 97 void WorkerThreadDebugger::exceptionThrown(ErrorEvent* event)
98 { 98 {
99 if (m_workerThread->consoleMessageStorage()->isMuted()) 99 if (m_workerThread->consoleMessageStorage()->isMuted())
100 return; 100 return;
101 101
102 const String16 defaultMessage = "Uncaught"; 102 const String16 defaultMessage = "Uncaught";
103 ScriptState* scriptState = m_workerThread->globalScope()->scriptController() ->getScriptState(); 103 ScriptState* scriptState = m_workerThread->globalScope()->scriptController() ->getScriptState();
104 if (scriptState && scriptState->contextIsValid()) { 104 if (scriptState && scriptState->contextIsValid()) {
105 ScriptState::Scope scope(scriptState); 105 ScriptState::Scope scope(scriptState);
106 v8::Local<v8::Value> exception = V8ErrorHandler::loadExceptionFromErrorE ventWrapper(scriptState, event, scriptState->context()->Global()); 106 v8::Local<v8::Value> exception = V8ErrorHandler::loadExceptionFromErrorE ventWrapper(scriptState, event, scriptState->context()->Global());
107 SourceLocation* location = event->location(); 107 SourceLocation* location = event->location();
108 debugger()->exceptionThrown(scriptState->context(), defaultMessage, exce ption, event->messageForConsole(), location->url(), location->lineNumber(), loca tion->columnNumber(), location->cloneStackTrace(), location->scriptId()); 108 v8Inspector()->exceptionThrown(scriptState->context(), defaultMessage, e xception, event->messageForConsole(), location->url(), location->lineNumber(), l ocation->columnNumber(), location->cloneStackTrace(), location->scriptId());
109 } 109 }
110 110
111 // TODO(dgozman): do not wrap in ConsoleMessage. 111 // TODO(dgozman): do not wrap in ConsoleMessage.
112 m_workerThread->workerReportingProxy().reportConsoleMessage(ConsoleMessage:: create(JSMessageSource, ErrorMessageLevel, event->messageForConsole(), event->lo cation()->clone())); 112 m_workerThread->workerReportingProxy().reportConsoleMessage(ConsoleMessage:: create(JSMessageSource, ErrorMessageLevel, event->messageForConsole(), event->lo cation()->clone()));
113 } 113 }
114 114
115 int WorkerThreadDebugger::contextGroupId() 115 int WorkerThreadDebugger::contextGroupId()
116 { 116 {
117 return workerContextGroupId; 117 return workerContextGroupId;
118 } 118 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 m_workerThread->workerReportingProxy().reportConsoleMessage(consoleMessage); 173 m_workerThread->workerReportingProxy().reportConsoleMessage(consoleMessage);
174 } 174 }
175 175
176 v8::MaybeLocal<v8::Value> WorkerThreadDebugger::memoryInfo(v8::Isolate*, v8::Loc al<v8::Context>) 176 v8::MaybeLocal<v8::Value> WorkerThreadDebugger::memoryInfo(v8::Isolate*, v8::Loc al<v8::Context>)
177 { 177 {
178 ASSERT_NOT_REACHED(); 178 ASSERT_NOT_REACHED();
179 return v8::MaybeLocal<v8::Value>(); 179 return v8::MaybeLocal<v8::Value>();
180 } 180 }
181 181
182 } // namespace blink 182 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698