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 26 matching lines...) Expand all Loading... |
37 #include "platform/heap/Handle.h" | 37 #include "platform/heap/Handle.h" |
38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
39 #include "wtf/HashMap.h" | 39 #include "wtf/HashMap.h" |
40 #include "wtf/PassRefPtr.h" | 40 #include "wtf/PassRefPtr.h" |
41 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
42 #include "wtf/text/AtomicString.h" | 42 #include "wtf/text/AtomicString.h" |
43 #include <v8.h> | 43 #include <v8.h> |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
| 47 class Document; |
47 class Frame; | 48 class Frame; |
48 class HTMLDocument; | 49 class HTMLDocument; |
49 class SecurityOrigin; | 50 class SecurityOrigin; |
50 | 51 |
51 // WindowProxy represents all the per-global object state for a Frame that | 52 // WindowProxy represents all the per-global object state for a Frame that |
52 // persist between navigations. | 53 // persist between navigations. |
53 class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> { | 54 class WindowProxy final : public GarbageCollectedFinalized<WindowProxy> { |
54 public: | 55 public: |
55 static WindowProxy* create(v8::Isolate*, Frame*, DOMWrapperWorld&); | 56 static WindowProxy* create(v8::Isolate*, Frame*, DOMWrapperWorld&); |
56 | 57 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Creates a new v8::Context with the window wrapper object as the global | 110 // Creates a new v8::Context with the window wrapper object as the global |
110 // object (aka the inner global). Note that the window wrapper and its | 111 // object (aka the inner global). Note that the window wrapper and its |
111 // prototype chain do not get fully initialized yet, e.g. the window | 112 // prototype chain do not get fully initialized yet, e.g. the window |
112 // wrapper is not yet associated with the native DOMWindow object. | 113 // wrapper is not yet associated with the native DOMWindow object. |
113 void createContext(); | 114 void createContext(); |
114 | 115 |
115 // Associates the window wrapper and its prototype chain with the native | 116 // Associates the window wrapper and its prototype chain with the native |
116 // DOMWindow object. Also does some more Window-specific initialization. | 117 // DOMWindow object. Also does some more Window-specific initialization. |
117 bool setupWindowPrototypeChain(); | 118 bool setupWindowPrototypeChain(); |
118 | 119 |
| 120 void checkDocumentWrapper(v8::Local<v8::Object> wrapper, Document*) const; |
| 121 |
119 Member<Frame> m_frame; | 122 Member<Frame> m_frame; |
120 v8::Isolate* m_isolate; | 123 v8::Isolate* m_isolate; |
121 RefPtr<ScriptState> m_scriptState; | 124 RefPtr<ScriptState> m_scriptState; |
122 RefPtr<DOMWrapperWorld> m_world; | 125 RefPtr<DOMWrapperWorld> m_world; |
123 ScopedPersistent<v8::Object> m_globalProxy; | 126 ScopedPersistent<v8::Object> m_globalProxy; |
124 ScopedPersistent<v8::Object> m_document; | 127 ScopedPersistent<v8::Object> m_document; |
125 }; | 128 }; |
126 | 129 |
127 } // namespace blink | 130 } // namespace blink |
128 | 131 |
129 #endif // WindowProxy_h | 132 #endif // WindowProxy_h |
OLD | NEW |