Chromium Code Reviews| Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| index d1172c5530a44876553805bf315ae4cd7ec7cedc..0fff6cb0f95eb9df1fac85abdeea42af6c5cbdd0 100644 |
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
| @@ -160,13 +160,8 @@ void ServiceWorkerGlobalScope::setRegistration(std::unique_ptr<WebServiceWorkerR |
| bool ServiceWorkerGlobalScope::addEventListenerInternal(const AtomicString& eventType, EventListener* listener, const AddEventListenerOptionsResolved& options) |
| { |
| if (m_didEvaluateScript) { |
| - if (eventType == EventTypeNames::install) { |
| - ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Event handler of 'install' event must be added on the initial evaluation of worker script."); |
| - addConsoleMessage(consoleMessage); |
| - } else if (eventType == EventTypeNames::activate) { |
| - ConsoleMessage* consoleMessage = ConsoleMessage::create(JSMessageSource, WarningMessageLevel, "Event handler of 'activate' event must be added on the initial evaluation of worker script."); |
| - addConsoleMessage(consoleMessage); |
| - } |
| + String message = String::format("Event handler of '%s' event must be added on the initial evaluation of worker script.", eventType.ascii().data()); |
|
falken
2016/09/20 01:46:41
Maybe I'm paranoid but I'd just utf8() instead of
shimazu
2016/09/20 06:07:52
Done.
|
| + addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); |
| } |
| return WorkerGlobalScope::addEventListenerInternal(eventType, listener, options); |
| } |