| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 bool isContextInitialized() { return m_perContextData; } | 72 bool isContextInitialized() { return m_perContextData; } |
| 73 bool isGlobalInitialized() { return !m_global.isEmpty(); } | 73 bool isGlobalInitialized() { return !m_global.isEmpty(); } |
| 74 | 74 |
| 75 bool initializeIfNeeded(); | 75 bool initializeIfNeeded(); |
| 76 void updateDocumentWrapper(v8::Handle<v8::Object> wrapper); | 76 void updateDocumentWrapper(v8::Handle<v8::Object> wrapper); |
| 77 | 77 |
| 78 void clearForNavigation(); | 78 void clearForNavigation(); |
| 79 void clearForClose(bool destroyGlobal); | 79 void clearForClose(bool destroyGlobal); |
| 80 | 80 |
| 81 DOMWrapperWorld* world() { return m_world.get(); } | 81 DOMWrapperWorld* world() { return m_world.get(); } |
| 82 static bool contextHasCorrectPrototype(v8::Handle<v8::Context>); | |
| 83 | 82 |
| 84 private: | 83 private: |
| 85 V8WindowShell(LocalFrame*, PassRefPtr<DOMWrapperWorld>, v8::Isolate*); | 84 V8WindowShell(LocalFrame*, PassRefPtr<DOMWrapperWorld>, v8::Isolate*); |
| 86 bool initialize(); | 85 bool initialize(); |
| 87 | 86 |
| 88 enum GlobalDetachmentBehavior { | 87 enum GlobalDetachmentBehavior { |
| 89 DoNotDetachGlobal, | 88 DoNotDetachGlobal, |
| 90 DetachGlobal | 89 DetachGlobal |
| 91 }; | 90 }; |
| 92 void disposeContext(GlobalDetachmentBehavior); | 91 void disposeContext(GlobalDetachmentBehavior); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 109 RefPtr<DOMWrapperWorld> m_world; | 108 RefPtr<DOMWrapperWorld> m_world; |
| 110 v8::Isolate* m_isolate; | 109 v8::Isolate* m_isolate; |
| 111 OwnPtr<V8PerContextData> m_perContextData; | 110 OwnPtr<V8PerContextData> m_perContextData; |
| 112 ScopedPersistent<v8::Object> m_global; | 111 ScopedPersistent<v8::Object> m_global; |
| 113 ScopedPersistent<v8::Object> m_document; | 112 ScopedPersistent<v8::Object> m_document; |
| 114 }; | 113 }; |
| 115 | 114 |
| 116 } // namespace WebCore | 115 } // namespace WebCore |
| 117 | 116 |
| 118 #endif // V8WindowShell_h | 117 #endif // V8WindowShell_h |
| OLD | NEW |