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

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

Issue 1334243004: Post DOMTimers on the corresponding LocalFrame's timer queue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed layout test failures. Created 5 years, 3 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
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/platform/Timer.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 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "core/workers/WorkerConsole.h" 57 #include "core/workers/WorkerConsole.h"
58 #include "core/workers/WorkerLoaderProxy.h" 58 #include "core/workers/WorkerLoaderProxy.h"
59 #include "core/workers/WorkerLocation.h" 59 #include "core/workers/WorkerLocation.h"
60 #include "core/workers/WorkerNavigator.h" 60 #include "core/workers/WorkerNavigator.h"
61 #include "core/workers/WorkerReportingProxy.h" 61 #include "core/workers/WorkerReportingProxy.h"
62 #include "core/workers/WorkerScriptLoader.h" 62 #include "core/workers/WorkerScriptLoader.h"
63 #include "core/workers/WorkerThread.h" 63 #include "core/workers/WorkerThread.h"
64 #include "platform/network/ContentSecurityPolicyParsers.h" 64 #include "platform/network/ContentSecurityPolicyParsers.h"
65 #include "platform/weborigin/KURL.h" 65 #include "platform/weborigin/KURL.h"
66 #include "platform/weborigin/SecurityOrigin.h" 66 #include "platform/weborigin/SecurityOrigin.h"
67 #include "public/platform/Platform.h"
68 #include "public/platform/WebScheduler.h"
67 #include "public/platform/WebURLRequest.h" 69 #include "public/platform/WebURLRequest.h"
68 70
69 namespace blink { 71 namespace blink {
70 72
71 WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W orkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, Pas sOwnPtrWillBeRawPtr<WorkerClients> workerClients) 73 WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W orkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, Pas sOwnPtrWillBeRawPtr<WorkerClients> workerClients)
72 : m_url(url) 74 : m_url(url)
73 , m_userAgent(userAgent) 75 , m_userAgent(userAgent)
74 , m_v8CacheOptions(V8CacheOptionsDefault) 76 , m_v8CacheOptions(V8CacheOptionsDefault)
75 , m_script(WorkerScriptController::create(this, thread->isolate())) 77 , m_script(WorkerScriptController::create(this, thread->isolate()))
76 , m_thread(thread) 78 , m_thread(thread)
77 , m_workerInspectorController(adoptRefWillBeNoop(new WorkerInspectorControll er(this))) 79 , m_workerInspectorController(adoptRefWillBeNoop(new WorkerInspectorControll er(this)))
78 , m_closing(false) 80 , m_closing(false)
79 , m_eventQueue(WorkerEventQueue::create(this)) 81 , m_eventQueue(WorkerEventQueue::create(this))
80 , m_workerClients(workerClients) 82 , m_workerClients(workerClients)
83 , m_timers(Platform::current()->currentThread()->scheduler()->timerTaskRunne r())
81 , m_timeOrigin(timeOrigin) 84 , m_timeOrigin(timeOrigin)
82 , m_messageStorage(ConsoleMessageStorage::create()) 85 , m_messageStorage(ConsoleMessageStorage::create())
83 , m_workerExceptionUniqueIdentifier(0) 86 , m_workerExceptionUniqueIdentifier(0)
84 { 87 {
85 setSecurityOrigin(SecurityOrigin::create(url)); 88 setSecurityOrigin(SecurityOrigin::create(url));
86 if (starterOrigin) 89 if (starterOrigin)
87 securityOrigin()->transferPrivilegesFrom(*starterOrigin); 90 securityOrigin()->transferPrivilegesFrom(*starterOrigin);
88 91
89 if (m_workerClients) 92 if (m_workerClients)
90 m_workerClients->reattachThread(); 93 m_workerClients->reattachThread();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 visitor->trace(m_messageStorage); 408 visitor->trace(m_messageStorage);
406 visitor->trace(m_pendingMessages); 409 visitor->trace(m_pendingMessages);
407 HeapSupplementable<WorkerGlobalScope>::trace(visitor); 410 HeapSupplementable<WorkerGlobalScope>::trace(visitor);
408 #endif 411 #endif
409 ExecutionContext::trace(visitor); 412 ExecutionContext::trace(visitor);
410 EventTargetWithInlineData::trace(visitor); 413 EventTargetWithInlineData::trace(visitor);
411 SecurityContext::trace(visitor); 414 SecurityContext::trace(visitor);
412 } 415 }
413 416
414 } // namespace blink 417 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/platform/Timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698