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

Side by Side Diff: Source/bindings/dart/DartDOMData.cpp

Issue 26490003: Reapply "Move isolate loading to a separate loader isolate." (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Initialize flag properly Created 7 years, 2 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/bindings/dart/DartDOMData.h ('k') | Source/bindings/dart/DartUtilities.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "bindings/dart/DartDOMData.h" 32 #include "bindings/dart/DartDOMData.h"
33 33
34 #include "bindings/dart/DartApplicationLoader.h" 34 #include "bindings/dart/DartApplicationLoader.h"
35 #include "bindings/dart/DartAsyncLoader.h"
35 #include "bindings/dart/ThreadSafeDartIsolateWrapper.h" 36 #include "bindings/dart/ThreadSafeDartIsolateWrapper.h"
36 #include "core/dom/ScriptExecutionContext.h" 37 #include "core/dom/ScriptExecutionContext.h"
37 38
38 namespace WebCore { 39 namespace WebCore {
39 40
40 DartDOMData::DartDOMData(ScriptExecutionContext* context, bool isDOMEnabled) 41 DartDOMData::DartDOMData(ScriptExecutionContext* context, bool isDOMEnabled)
41 : m_scriptExecutionContext(context) 42 : m_scriptExecutionContext(context)
42 , m_isDOMEnabled(isDOMEnabled) 43 , m_isDOMEnabled(isDOMEnabled)
43 , m_recursion(0) 44 , m_recursion(0)
44 , m_stringCache() 45 , m_stringCache()
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ASSERT(!m_applicationLoader || !applicationLoader); 80 ASSERT(!m_applicationLoader || !applicationLoader);
80 m_applicationLoader = applicationLoader; 81 m_applicationLoader = applicationLoader;
81 } 82 }
82 83
83 PassRefPtr<DartApplicationLoader> DartDOMData::applicationLoader() 84 PassRefPtr<DartApplicationLoader> DartDOMData::applicationLoader()
84 { 85 {
85 ASSERT(m_applicationLoader); 86 ASSERT(m_applicationLoader);
86 return m_applicationLoader; 87 return m_applicationLoader;
87 } 88 }
88 89
90 void DartDOMData::setAsyncLoader(PassRefPtr<DartAsyncLoader> asyncLoader)
91 {
92 ASSERT(!m_asyncLoader || !asyncLoader);
93 m_asyncLoader = asyncLoader;
94 }
95
96 PassRefPtr<DartAsyncLoader> DartDOMData::asyncLoader()
97 {
98 ASSERT(m_asyncLoader);
99 return m_asyncLoader;
100 }
101
89 void DartDOMData::setThreadSafeIsolateWrapper(PassRefPtr<ThreadSafeDartIsolateWr apper> threadSafeIsolateWrapper) 102 void DartDOMData::setThreadSafeIsolateWrapper(PassRefPtr<ThreadSafeDartIsolateWr apper> threadSafeIsolateWrapper)
90 { 103 {
91 ASSERT(!m_threadSafeIsolateWrapper); 104 ASSERT(!m_threadSafeIsolateWrapper);
92 MutexLocker locker(m_isolateWrapperMutex); 105 MutexLocker locker(m_isolateWrapperMutex);
93 m_threadSafeIsolateWrapper = threadSafeIsolateWrapper; 106 m_threadSafeIsolateWrapper = threadSafeIsolateWrapper;
94 } 107 }
95 108
96 PassRefPtr<ThreadSafeDartIsolateWrapper> DartDOMData::threadSafeIsolateWrapper() 109 PassRefPtr<ThreadSafeDartIsolateWrapper> DartDOMData::threadSafeIsolateWrapper()
97 { 110 {
98 ASSERT(m_threadSafeIsolateWrapper); 111 ASSERT(m_threadSafeIsolateWrapper);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 148
136 return element; 149 return element;
137 } 150 }
138 151
139 bool DartDOMData::isUpgradingCustomElement(Element* element) 152 bool DartDOMData::isUpgradingCustomElement(Element* element)
140 { 153 {
141 return m_upgradingElements.contains(element); 154 return m_upgradingElements.contains(element);
142 } 155 }
143 156
144 } 157 }
OLDNEW
« no previous file with comments | « Source/bindings/dart/DartDOMData.h ('k') | Source/bindings/dart/DartUtilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698