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

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

Issue 1141553006: Update Blink to use the tree scope info on WebFrame for scoping checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 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 | Annotate | Revision Log
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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 WebSettings* settings = m_webView->settings(); 293 WebSettings* settings = m_webView->settings();
294 // FIXME: http://crbug.com/363843. This needs to find a better way to 294 // FIXME: http://crbug.com/363843. This needs to find a better way to
295 // not create graphics layers. 295 // not create graphics layers.
296 settings->setAcceleratedCompositingEnabled(false); 296 settings->setAcceleratedCompositingEnabled(false);
297 // Currently we block all mixed-content requests from a ServiceWorker. 297 // Currently we block all mixed-content requests from a ServiceWorker.
298 // FIXME: When we support FetchEvent.default(), we should relax this 298 // FIXME: When we support FetchEvent.default(), we should relax this
299 // restriction. 299 // restriction.
300 settings->setStrictMixedContentChecking(true); 300 settings->setStrictMixedContentChecking(true);
301 settings->setAllowDisplayOfInsecureContent(false); 301 settings->setAllowDisplayOfInsecureContent(false);
302 settings->setAllowRunningOfInsecureContent(false); 302 settings->setAllowRunningOfInsecureContent(false);
303 m_mainFrame = toWebLocalFrameImpl(WebLocalFrame::create(this)); 303 m_mainFrame = toWebLocalFrameImpl(WebLocalFrame::create(WebTreeScopeType::Do cument, this));
304 m_webView->setMainFrame(m_mainFrame); 304 m_webView->setMainFrame(m_mainFrame);
305 m_mainFrame->setDevToolsAgentClient(this); 305 m_mainFrame->setDevToolsAgentClient(this);
306 306
307 // If we were asked to wait for debugger then it is the good time to do that . 307 // If we were asked to wait for debugger then it is the good time to do that .
308 // However if we are updating service worker version (m_pauseAfterDownloadSt ate is set) 308 // However if we are updating service worker version (m_pauseAfterDownloadSt ate is set)
309 // Then we need to load the worker script to check the version, so in this c ase we wait for debugger 309 // Then we need to load the worker script to check the version, so in this c ase we wait for debugger
310 // later in ::resumeAfterDownload(). 310 // later in ::resumeAfterDownload().
311 if (m_pauseAfterDownloadState != DoPauseAfterDownload) { 311 if (m_pauseAfterDownloadState != DoPauseAfterDownload) {
312 m_workerContextClient->workerReadyForInspection(); 312 m_workerContextClient->workerReadyForInspection();
313 if (m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData: :WaitForDebugger) { 313 if (m_workerStartData.waitForDebuggerMode == WebEmbeddedWorkerStartData: :WaitForDebugger) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 m_mainScriptLoader.clear(); 431 m_mainScriptLoader.clear();
432 432
433 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 433 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
434 m_loaderProxy = WorkerLoaderProxy::create(this); 434 m_loaderProxy = WorkerLoaderProxy::create(this);
435 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 435 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
436 m_workerThread->start(startupData.release()); 436 m_workerThread->start(startupData.release());
437 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 437 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
438 } 438 }
439 439
440 } // namespace blink 440 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698