Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMWindowProperty.cpp

Issue 2562323002: Devirtualize Frame::domWindow(). (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 31
32 namespace blink { 32 namespace blink {
33 33
34 DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) : m_frame(frame) { 34 DOMWindowProperty::DOMWindowProperty(LocalFrame* frame) : m_frame(frame) {
35 // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created 35 // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created
36 // with a null frame. See fast/dom/navigator-detached-no-crash.html for the 36 // with a null frame. See fast/dom/navigator-detached-no-crash.html for the
37 // recipe. We should fix that. <rdar://problem/11567132> 37 // recipe. We should fix that. <rdar://problem/11567132>
38 if (m_frame) { 38 if (m_frame) {
39 // FIXME: Need to figure out what to do with DOMWindowProperties on 39 // FIXME: Need to figure out what to do with DOMWindowProperties on
40 // remote DOM windows. 40 // remote DOM windows.
41 m_frame->localDOMWindow()->registerProperty(this); 41 m_frame->domWindow()->registerProperty(this);
42 } 42 }
43 } 43 }
44 44
45 void DOMWindowProperty::frameDestroyed() { 45 void DOMWindowProperty::frameDestroyed() {
46 // If the property is getting this callback it must have been 46 // If the property is getting this callback it must have been
47 // created with a LocalFrame and it should still have it. 47 // created with a LocalFrame and it should still have it.
48 ASSERT(m_frame); 48 ASSERT(m_frame);
49 m_frame = nullptr; 49 m_frame = nullptr;
50 } 50 }
51 51
52 DEFINE_TRACE(DOMWindowProperty) { 52 DEFINE_TRACE(DOMWindowProperty) {
53 visitor->trace(m_frame); 53 visitor->trace(m_frame);
54 } 54 }
55 55
56 } // namespace blink 56 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698