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

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

Issue 692003002: ServiceWorker: Registering a malformed script should fail [1/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/workers/WorkerReportingProxy.h ('k') | Source/web/ServiceWorkerGlobalScopeProxy.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) 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // ~WorkerScriptController. 313 // ~WorkerScriptController.
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 bool success = script->evaluate(ScriptSourceCode(sourceCode, scriptURL));
324 m_workerGlobalScope->didEvaluateWorkerScript(); 324 m_workerGlobalScope->didEvaluateWorkerScript();
325 m_workerReportingProxy.didEvaluateWorkerScript(success);
325 326
326 postInitialize(); 327 postInitialize();
327 328
328 postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kSho rtIdleHandlerDelayMs); 329 postDelayedTask(createSameThreadTask(&WorkerThread::idleHandler, this), kSho rtIdleHandlerDelayMs);
329 } 330 }
330 331
331 void WorkerThread::cleanup() 332 void WorkerThread::cleanup()
332 { 333 {
333 334
334 // This should be called before we start the shutdown procedure. 335 // This should be called before we start the shutdown procedure.
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); 527 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get());
527 } 528 }
528 529
529 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) 530 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController)
530 { 531 {
531 MutexLocker locker(m_workerInspectorControllerMutex); 532 MutexLocker locker(m_workerInspectorControllerMutex);
532 m_workerInspectorController = workerInspectorController; 533 m_workerInspectorController = workerInspectorController;
533 } 534 }
534 535
535 } // namespace blink 536 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerReportingProxy.h ('k') | Source/web/ServiceWorkerGlobalScopeProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698