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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp

Issue 1679133002: [DevTools] Remove isRunRequired, replace autoConnectToWorkers with setWaitForDebuggerOnStart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined tests Created 4 years, 10 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 m_mainScriptLoader->cancel(); 315 m_mainScriptLoader->cancel();
316 m_client->workerScriptLoadFailed(); 316 m_client->workerScriptLoadFailed();
317 317
318 // The SharedWorker was unable to load the initial script, so 318 // The SharedWorker was unable to load the initial script, so
319 // shut it down right here. 319 // shut it down right here.
320 delete this; 320 delete this;
321 return; 321 return;
322 } 322 }
323 323
324 Document* document = m_mainFrame->frame()->document(); 324 Document* document = m_mainFrame->frame()->document();
325 WorkerThreadStartMode startMode = DontPauseWorkerGlobalScopeOnStart;
326 if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document))
327 startMode = PauseWorkerGlobalScopeOnStart;
328 325
329 // FIXME: this document's origin is pristine and without any extra privilege s. (crbug.com/254993) 326 // FIXME: this document's origin is pristine and without any extra privilege s. (crbug.com/254993)
330 SecurityOrigin* starterOrigin = document->securityOrigin(); 327 SecurityOrigin* starterOrigin = document->securityOrigin();
331 328
332 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); 329 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
333 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate()); 330 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate());
334 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); 331 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
335 provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(m_client- >createWorkerContentSettingsClientProxy(webSecurityOrigin))); 332 provideContentSettingsClientToWorker(workerClients.get(), adoptPtr(m_client- >createWorkerContentSettingsClientProxy(webSecurityOrigin)));
336 RefPtrWillBeRawPtr<ContentSecurityPolicy> contentSecurityPolicy = m_mainScri ptLoader->releaseContentSecurityPolicy(); 333 RefPtrWillBeRawPtr<ContentSecurityPolicy> contentSecurityPolicy = m_mainScri ptLoader->releaseContentSecurityPolicy();
334 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument);
337 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e( 335 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e(
338 m_url, 336 m_url,
339 m_loadingDocument->userAgent(), 337 m_loadingDocument->userAgent(),
340 m_mainScriptLoader->script(), 338 m_mainScriptLoader->script(),
341 nullptr, 339 nullptr,
342 startMode, 340 startMode,
343 contentSecurityPolicy ? contentSecurityPolicy->headers() : nullptr, 341 contentSecurityPolicy ? contentSecurityPolicy->headers() : nullptr,
344 starterOrigin, 342 starterOrigin,
345 workerClients.release()); 343 workerClients.release());
346 m_loaderProxy = WorkerLoaderProxy::create(this); 344 m_loaderProxy = WorkerLoaderProxy::create(this);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (devtoolsAgent) 391 if (devtoolsAgent)
394 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); 392 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message);
395 } 393 }
396 394
397 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 395 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
398 { 396 {
399 return new WebSharedWorkerImpl(client); 397 return new WebSharedWorkerImpl(client);
400 } 398 }
401 399
402 } // namespace blink 400 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698