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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 static const int mainWorldExtensionGroup = 0; | 61 static const int mainWorldExtensionGroup = 0; |
62 static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int exte
nsionGroup); | 62 static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int exte
nsionGroup); |
63 ~DOMWrapperWorld(); | 63 ~DOMWrapperWorld(); |
64 | 64 |
65 static bool isolatedWorldsExist() { return isolatedWorldCount; } | 65 static bool isolatedWorldsExist() { return isolatedWorldCount; } |
66 static void getAllWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld> >& world
s); | 66 static void getAllWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld> >& world
s); |
67 | 67 |
68 static DOMWrapperWorld* world(v8::Handle<v8::Context> context) | 68 static DOMWrapperWorld* world(v8::Handle<v8::Context> context) |
69 { | 69 { |
70 ASSERT(contextHasCorrectPrototype(context)); | 70 ASSERT(contextHasCorrectPrototype(context)); |
71 return V8PerContextDataHolder::from(context)->world(); | 71 return V8PerContextData::world(context); |
72 } | 72 } |
73 | 73 |
74 // Will return null if there is no DOMWrapperWorld for the current v8::Conte
xt | 74 // Will return null if there is no DOMWrapperWorld for the current v8::Conte
xt |
75 static DOMWrapperWorld* current(v8::Isolate*); | 75 static DOMWrapperWorld* current(v8::Isolate*); |
76 static DOMWrapperWorld* mainWorld(); | 76 static DOMWrapperWorld* mainWorld(); |
77 | 77 |
78 // Associates an isolated world (see above for description) with a security | 78 // Associates an isolated world (see above for description) with a security |
79 // origin. XMLHttpRequest instances used in that world will be considered | 79 // origin. XMLHttpRequest instances used in that world will be considered |
80 // to come from that origin, not the frame's. | 80 // to come from that origin, not the frame's. |
81 static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityO
rigin>); | 81 static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityO
rigin>); |
(...skipping 27 matching lines...) Expand all Loading... |
109 static bool contextHasCorrectPrototype(v8::Handle<v8::Context>); | 109 static bool contextHasCorrectPrototype(v8::Handle<v8::Context>); |
110 | 110 |
111 const int m_worldId; | 111 const int m_worldId; |
112 const int m_extensionGroup; | 112 const int m_extensionGroup; |
113 OwnPtr<DOMDataStore> m_domDataStore; | 113 OwnPtr<DOMDataStore> m_domDataStore; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace WebCore | 116 } // namespace WebCore |
117 | 117 |
118 #endif // DOMWrapperWorld_h | 118 #endif // DOMWrapperWorld_h |
OLD | NEW |