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

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

Issue 1828063002: Add support for origin trials in workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@trial-token-in-header-blink-document
Patch Set: fix test flakyness Created 4 years, 7 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) 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 404
405 KURL scriptURL = m_mainScriptLoader->url(); 405 KURL scriptURL = m_mainScriptLoader->url();
406 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument); 406 WorkerThreadStartMode startMode = m_workerInspectorProxy->workerStartMode(do cument);
407 407
408 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e( 408 OwnPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::creat e(
409 scriptURL, 409 scriptURL,
410 m_workerStartData.userAgent, 410 m_workerStartData.userAgent,
411 m_mainScriptLoader->script(), 411 m_mainScriptLoader->script(),
412 m_mainScriptLoader->releaseCachedMetadata(), 412 m_mainScriptLoader->releaseCachedMetadata(),
413 startMode, 413 startMode,
414 document->contentSecurityPolicy()->headers(), 414 document->contentSecurityPolicy()->headers().get(),
415 starterOrigin, 415 starterOrigin,
416 workerClients, 416 workerClients,
417 m_mainScriptLoader->responseAddressSpace(), 417 m_mainScriptLoader->responseAddressSpace(),
418 m_mainScriptLoader->originTrialTokens(),
418 static_cast<V8CacheOptions>(m_workerStartData.v8CacheOptions)); 419 static_cast<V8CacheOptions>(m_workerStartData.v8CacheOptions));
419 420
420 m_mainScriptLoader.clear(); 421 m_mainScriptLoader.clear();
421 422
422 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 423 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
423 m_loaderProxy = WorkerLoaderProxy::create(this); 424 m_loaderProxy = WorkerLoaderProxy::create(this);
424 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 425 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
425 m_workerThread->start(startupData.release()); 426 m_workerThread->start(startupData.release());
426 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 427 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
427 } 428 }
428 429
429 } // namespace blink 430 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698