| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google, Inc. All Rights Reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) | 35 DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) |
| 36 : m_frame(frame) | 36 : m_frame(frame) |
| 37 #if !ENABLE(OILPAN) | 37 #if !ENABLE(OILPAN) |
| 38 , m_associatedDOMWindow(nullptr) | 38 , m_associatedDOMWindow(nullptr) |
| 39 #endif | 39 #endif |
| 40 { | 40 { |
| 41 // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created w
ith a null frame. | 41 // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created w
ith a null frame. |
| 42 // See fast/dom/navigator-detached-no-crash.html for the recipe. | 42 // See fast/dom/navigator-detached-no-crash.html for the recipe. |
| 43 // We should fix that. <rdar://problem/11567132> | 43 // We should fix that. <rdar://problem/11567132> |
| 44 if (m_frame) { | 44 if (m_frame) { |
| 45 // FIXME: Need to figure out what to do with DOMWindowProperties on |
| 46 // remote DOM windows. |
| 45 #if ENABLE(OILPAN) | 47 #if ENABLE(OILPAN) |
| 46 m_frame->domWindow()->registerProperty(this); | 48 m_frame->localDOMWindow()->registerProperty(this); |
| 47 #else | 49 #else |
| 48 m_associatedDOMWindow = m_frame->domWindow(); | 50 m_associatedDOMWindow = m_frame->localDOMWindow(); |
| 49 m_associatedDOMWindow->registerProperty(this); | 51 m_associatedDOMWindow->registerProperty(this); |
| 50 #endif | 52 #endif |
| 51 } | 53 } |
| 52 } | 54 } |
| 53 | 55 |
| 54 #if !ENABLE(OILPAN) | 56 #if !ENABLE(OILPAN) |
| 55 DOMWindowProperty::~DOMWindowProperty() | 57 DOMWindowProperty::~DOMWindowProperty() |
| 56 { | 58 { |
| 57 if (m_associatedDOMWindow) | 59 if (m_associatedDOMWindow) |
| 58 m_associatedDOMWindow->unregisterProperty(this); | 60 m_associatedDOMWindow->unregisterProperty(this); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 86 ASSERT(m_associatedDOMWindow); | 88 ASSERT(m_associatedDOMWindow); |
| 87 #endif | 89 #endif |
| 88 } | 90 } |
| 89 | 91 |
| 90 void DOMWindowProperty::trace(Visitor* visitor) | 92 void DOMWindowProperty::trace(Visitor* visitor) |
| 91 { | 93 { |
| 92 visitor->trace(m_frame); | 94 visitor->trace(m_frame); |
| 93 } | 95 } |
| 94 | 96 |
| 95 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |