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

Side by Side Diff: Source/core/frame/Location.cpp

Issue 552733003: Oilpan: make DOMWindowProperty a GC mixin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pacify GC plugin wrt LocalDOMWindow::trace() Created 6 years, 3 months 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) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 28 matching lines...) Expand all
39 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
40 #include "platform/weborigin/SecurityOrigin.h" 40 #include "platform/weborigin/SecurityOrigin.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 Location::Location(LocalFrame* frame) 44 Location::Location(LocalFrame* frame)
45 : DOMWindowProperty(frame) 45 : DOMWindowProperty(frame)
46 { 46 {
47 } 47 }
48 48
49 void Location::trace(Visitor* visitor)
50 {
51 DOMWindowProperty::trace(visitor);
52 }
53
49 inline const KURL& Location::url() const 54 inline const KURL& Location::url() const
50 { 55 {
51 ASSERT(m_frame); 56 ASSERT(m_frame);
52 57
53 const KURL& url = m_frame->document()->url(); 58 const KURL& url = m_frame->document()->url();
54 if (!url.isValid()) 59 if (!url.isValid())
55 return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame). 60 return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
56 61
57 return url; 62 return url;
58 } 63 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc alDOMWindow* enteredWindow) 249 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc alDOMWindow* enteredWindow)
245 { 250 {
246 ASSERT(m_frame); 251 ASSERT(m_frame);
247 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli ngWindow->document()); 252 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli ngWindow->document());
248 if (!frame) 253 if (!frame)
249 return; 254 return;
250 frame->domWindow()->setLocation(url, callingWindow, enteredWindow); 255 frame->domWindow()->setLocation(url, callingWindow, enteredWindow);
251 } 256 }
252 257
253 } // namespace blink 258 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698