OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
8 * met: | 8 * met: |
9 * | 9 * |
10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 return result; | 210 return result; |
211 } | 211 } |
212 | 212 |
213 bool ScriptController::initializeMainWorld() | 213 bool ScriptController::initializeMainWorld() |
214 { | 214 { |
215 if (m_windowProxy->isContextInitialized()) | 215 if (m_windowProxy->isContextInitialized()) |
216 return false; | 216 return false; |
217 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); | 217 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); |
218 } | 218 } |
219 | 219 |
220 bool ScriptController::isMainWorldInitialized() | |
221 { | |
222 return m_windowProxy->isContextInitialized(); | |
223 } | |
224 | |
225 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) | 220 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) |
226 { | 221 { |
227 if (world.isMainWorld()) | 222 if (world.isMainWorld()) |
228 return m_windowProxy->isContextInitialized() ? m_windowProxy.get() : 0; | 223 return m_windowProxy->isContextInitialized() ? m_windowProxy.get() : 0; |
229 | 224 |
230 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId()); | 225 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId()); |
231 if (iter == m_isolatedWorlds.end()) | 226 if (iter == m_isolatedWorlds.end()) |
232 return 0; | 227 return 0; |
233 return iter->value->isContextInitialized() ? iter->value.get() : 0; | 228 return iter->value->isContextInitialized() ? iter->value.get() : 0; |
234 } | 229 } |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 resultArray->Set(i, evaluationResult); | 644 resultArray->Set(i, evaluationResult); |
650 } | 645 } |
651 | 646 |
652 if (results) { | 647 if (results) { |
653 for (size_t i = 0; i < resultArray->Length(); ++i) | 648 for (size_t i = 0; i < resultArray->Length(); ++i) |
654 results->append(handleScope.Escape(resultArray->Get(i))); | 649 results->append(handleScope.Escape(resultArray->Get(i))); |
655 } | 650 } |
656 } | 651 } |
657 | 652 |
658 } // namespace blink | 653 } // namespace blink |
OLD | NEW |