| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 static const int mainWorldExtensionGroup = 0; | 65 static const int mainWorldExtensionGroup = 0; |
| 66 static const int privateScriptIsolatedWorldExtensionGroup = 1; | 66 static const int privateScriptIsolatedWorldExtensionGroup = 1; |
| 67 static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(v8::Isolate*, int wor
ldId, int extensionGroup); | 67 static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(v8::Isolate*, int wor
ldId, int extensionGroup); |
| 68 ~DOMWrapperWorld(); | 68 ~DOMWrapperWorld(); |
| 69 void dispose(); | 69 void dispose(); |
| 70 | 70 |
| 71 static bool isolatedWorldsExist() { return isolatedWorldCount; } | 71 static bool isolatedWorldsExist() { return isolatedWorldCount; } |
| 72 static void allWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld>>& worlds); | 72 static void allWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld>>& worlds); |
| 73 static void markWrappersInAllWorlds(ScriptWrappable*, v8::Isolate*); | 73 static void markWrappersInAllWorlds(ScriptWrappable*, v8::Isolate*); |
| 74 static void setWrapperReferencesInAllWorlds(const v8::Persistent<v8::Object>
& parent, ScriptWrappable*, v8::Isolate*); |
| 74 | 75 |
| 75 static DOMWrapperWorld& world(v8::Local<v8::Context> context) | 76 static DOMWrapperWorld& world(v8::Local<v8::Context> context) |
| 76 { | 77 { |
| 77 return ScriptState::from(context)->world(); | 78 return ScriptState::from(context)->world(); |
| 78 } | 79 } |
| 79 | 80 |
| 80 static DOMWrapperWorld& current(v8::Isolate* isolate) | 81 static DOMWrapperWorld& current(v8::Isolate* isolate) |
| 81 { | 82 { |
| 82 return world(isolate->GetCurrentContext()); | 83 return world(isolate->GetCurrentContext()); |
| 83 } | 84 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 130 |
| 130 const int m_worldId; | 131 const int m_worldId; |
| 131 const int m_extensionGroup; | 132 const int m_extensionGroup; |
| 132 OwnPtr<DOMDataStore> m_domDataStore; | 133 OwnPtr<DOMDataStore> m_domDataStore; |
| 133 HashSet<OwnPtr<DOMObjectHolderBase>> m_domObjectHolders; | 134 HashSet<OwnPtr<DOMObjectHolderBase>> m_domObjectHolders; |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 } // namespace blink | 137 } // namespace blink |
| 137 | 138 |
| 138 #endif // DOMWrapperWorld_h | 139 #endif // DOMWrapperWorld_h |
| OLD | NEW |