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

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

Issue 743153002: [DevTools] Show stack trace for exceptions in dedicated workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@worker-capture-stack
Patch Set: Rebased Created 6 years 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
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | Source/web/WebSharedWorkerImpl.h » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 { 165 {
166 ASSERT(m_workerGlobalScope); 166 ASSERT(m_workerGlobalScope);
167 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray (m_workerGlobalScope, webChannels); 167 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray (m_workerGlobalScope, webChannels);
168 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag e); 168 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag e);
169 // FIXME: Have proper source for this MessageEvent. 169 // FIXME: Have proper source for this MessageEvent.
170 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(ports.release( ), value, webClient.origin.string()); 170 RefPtrWillBeRawPtr<MessageEvent> event = MessageEvent::create(ports.release( ), value, webClient.origin.string());
171 event->setType(EventTypeNames::crossoriginmessage); 171 event->setType(EventTypeNames::crossoriginmessage);
172 m_workerGlobalScope->dispatchEvent(event); 172 m_workerGlobalScope->dispatchEvent(event);
173 } 173 }
174 174
175 void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) 175 void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL, int)
176 { 176 {
177 m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL); 177 m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL);
178 } 178 }
179 179
180 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr< ConsoleMessage> consoleMessage) 180 void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(PassRefPtrWillBeRawPtr< ConsoleMessage> consoleMessage)
181 { 181 {
182 m_client.reportConsoleMessage(consoleMessage->source(), consoleMessage->leve l(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage->ur l()); 182 m_client.reportConsoleMessage(consoleMessage->source(), consoleMessage->leve l(), consoleMessage->message(), consoleMessage->lineNumber(), consoleMessage->ur l());
183 } 183 }
184 184
185 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes sage) 185 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes sage)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) 218 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client)
219 : m_embeddedWorker(embeddedWorker) 219 : m_embeddedWorker(embeddedWorker)
220 , m_document(document) 220 , m_document(document)
221 , m_client(client) 221 , m_client(client)
222 , m_workerGlobalScope(0) 222 , m_workerGlobalScope(0)
223 { 223 {
224 } 224 }
225 225
226 } // namespace blink 226 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeProxy.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698