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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 kUnspecifiedWorldIdStart, | 65 kUnspecifiedWorldIdStart, |
66 }; | 66 }; |
67 | 67 |
68 enum class WorldType { | 68 enum class WorldType { |
69 kMain, | 69 kMain, |
70 kIsolated, | 70 kIsolated, |
71 kInspectorIsolated, | 71 kInspectorIsolated, |
72 kGarbageCollector, | 72 kGarbageCollector, |
73 kRegExp, | 73 kRegExp, |
74 kTesting, | 74 kTesting, |
| 75 kForV8ContextSnapshotNonMain, |
75 kWorker, | 76 kWorker, |
76 }; | 77 }; |
77 | 78 |
78 // Creates a world other than IsolatedWorld. Note this can return nullptr if | 79 // Creates a world other than IsolatedWorld. Note this can return nullptr if |
79 // GenerateWorldIdForType fails to allocate a valid id. | 80 // GenerateWorldIdForType fails to allocate a valid id. |
80 static PassRefPtr<DOMWrapperWorld> Create(v8::Isolate*, WorldType); | 81 static PassRefPtr<DOMWrapperWorld> Create(v8::Isolate*, WorldType); |
81 | 82 |
82 // Ensures an IsolatedWorld for |worldId|. | 83 // Ensures an IsolatedWorld for |worldId|. |
83 static PassRefPtr<DOMWrapperWorld> EnsureIsolatedWorld(v8::Isolate*, | 84 static PassRefPtr<DOMWrapperWorld> EnsureIsolatedWorld(v8::Isolate*, |
84 int world_id); | 85 int world_id); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 223 |
223 const WorldType world_type_; | 224 const WorldType world_type_; |
224 const int world_id_; | 225 const int world_id_; |
225 std::unique_ptr<DOMDataStore> dom_data_store_; | 226 std::unique_ptr<DOMDataStore> dom_data_store_; |
226 HashSet<std::unique_ptr<DOMObjectHolderBase>> dom_object_holders_; | 227 HashSet<std::unique_ptr<DOMObjectHolderBase>> dom_object_holders_; |
227 }; | 228 }; |
228 | 229 |
229 } // namespace blink | 230 } // namespace blink |
230 | 231 |
231 #endif // DOMWrapperWorld_h | 232 #endif // DOMWrapperWorld_h |
OLD | NEW |