| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 return result; | 211 return result; |
| 212 } | 212 } |
| 213 | 213 |
| 214 bool ScriptController::initializeMainWorld() | 214 bool ScriptController::initializeMainWorld() |
| 215 { | 215 { |
| 216 if (m_windowProxy->isContextInitialized()) | 216 if (m_windowProxy->isContextInitialized()) |
| 217 return false; | 217 return false; |
| 218 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); | 218 return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 bool ScriptController::isMainWorldInitialized() |
| 222 { |
| 223 return m_windowProxy->isContextInitialized(); |
| 224 } |
| 225 |
| 221 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) | 226 WindowProxy* ScriptController::existingWindowProxy(DOMWrapperWorld& world) |
| 222 { | 227 { |
| 223 if (world.isMainWorld()) | 228 if (world.isMainWorld()) |
| 224 return m_windowProxy->isContextInitialized() ? m_windowProxy.get() : 0; | 229 return m_windowProxy->isContextInitialized() ? m_windowProxy.get() : 0; |
| 225 | 230 |
| 226 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId()); | 231 IsolatedWorldMap::iterator iter = m_isolatedWorlds.find(world.worldId()); |
| 227 if (iter == m_isolatedWorlds.end()) | 232 if (iter == m_isolatedWorlds.end()) |
| 228 return 0; | 233 return 0; |
| 229 return iter->value->isContextInitialized() ? iter->value.get() : 0; | 234 return iter->value->isContextInitialized() ? iter->value.get() : 0; |
| 230 } | 235 } |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 resultArray->Set(i, evaluationResult); | 652 resultArray->Set(i, evaluationResult); |
| 648 } | 653 } |
| 649 | 654 |
| 650 if (results) { | 655 if (results) { |
| 651 for (size_t i = 0; i < resultArray->Length(); ++i) | 656 for (size_t i = 0; i < resultArray->Length(); ++i) |
| 652 results->append(resultArray->Get(i)); | 657 results->append(resultArray->Get(i)); |
| 653 } | 658 } |
| 654 } | 659 } |
| 655 | 660 |
| 656 } // namespace blink | 661 } // namespace blink |
| OLD | NEW |