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

Side by Side Diff: Source/core/workers/WorkerThread.cpp

Issue 657213004: ServiceWorker: Issue a warning after initial execution of worker script (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporate reviews and rebase Created 6 years, 1 month 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 blink::Platform::current()->didStartWorkerRunLoop(blink::WebWorkerRunLoop(th is)); 314 blink::Platform::current()->didStartWorkerRunLoop(blink::WebWorkerRunLoop(th is));
315 315
316 // Notify proxy that a new WorkerGlobalScope has been created and started. 316 // Notify proxy that a new WorkerGlobalScope has been created and started.
317 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); 317 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get());
318 318
319 WorkerScriptController* script = m_workerGlobalScope->script(); 319 WorkerScriptController* script = m_workerGlobalScope->script();
320 if (!script->isExecutionForbidden()) 320 if (!script->isExecutionForbidden())
321 script->initializeContextIfNeeded(); 321 script->initializeContextIfNeeded();
322 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star tMode); 322 InspectorInstrumentation::willEvaluateWorkerScript(workerGlobalScope(), star tMode);
323 script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); 323 script->evaluate(ScriptSourceCode(sourceCode, scriptURL));
324 m_workerGlobalScope->didEvaluateWorkerScript();
324 325
325 postInitialize(); 326 postInitialize();
326 327
327 postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kSho rtIdleHandlerDelayMs); 328 postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kSho rtIdleHandlerDelayMs);
328 } 329 }
329 330
330 void WorkerThread::cleanup() 331 void WorkerThread::cleanup()
331 { 332 {
332 333
333 // This should be called before we start the shutdown procedure. 334 // This should be called before we start the shutdown procedure.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); 526 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get());
526 } 527 }
527 528
528 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) 529 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController)
529 { 530 {
530 MutexLocker locker(m_workerInspectorControllerMutex); 531 MutexLocker locker(m_workerInspectorControllerMutex);
531 m_workerInspectorController = workerInspectorController; 532 m_workerInspectorController = workerInspectorController;
532 } 533 }
533 534
534 } // namespace blink 535 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698