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

Side by Side Diff: Source/core/frame/LocalDOMWindow.h

Issue 1186093003: Reland: Window.postMessage() to self can cause document leaks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 Element* frameElement() const; 161 Element* frameElement() const;
162 162
163 PassRefPtrWillBeRawPtr<DOMWindow> open(const String& urlString, const Atomic String& frameName, const String& windowFeaturesString, 163 PassRefPtrWillBeRawPtr<DOMWindow> open(const String& urlString, const Atomic String& frameName, const String& windowFeaturesString,
164 LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow); 164 LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow);
165 165
166 FrameConsole* frameConsole() const; 166 FrameConsole* frameConsole() const;
167 167
168 void printErrorMessage(const String&); 168 void printErrorMessage(const String&);
169 169
170 void postMessageTimerFired(PostMessageTimer*); 170 void postMessageTimerFired(PostMessageTimer*);
171 void removePostMessageTimer(PostMessageTimer*);
171 void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigi n, PassRefPtrWillBeRawPtr<Event>, PassRefPtrWillBeRawPtr<ScriptCallStack>); 172 void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigi n, PassRefPtrWillBeRawPtr<Event>, PassRefPtrWillBeRawPtr<ScriptCallStack>);
172 173
173 // Events 174 // Events
174 // EventTarget API 175 // EventTarget API
175 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override; 176 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<Even tListener>, bool useCapture = false) override;
176 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E ventListener>, bool useCapture = false) override; 177 virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<E ventListener>, bool useCapture = false) override;
177 virtual void removeAllEventListeners() override; 178 virtual void removeAllEventListeners() override;
178 179
179 using EventTarget::dispatchEvent; 180 using EventTarget::dispatchEvent;
180 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassRefPtrWillBeR awPtr<EventTarget> prpTarget); 181 bool dispatchEvent(PassRefPtrWillBeRawPtr<Event> prpEvent, PassRefPtrWillBeR awPtr<EventTarget> prpTarget);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } 285 }
285 286
286 inline String LocalDOMWindow::defaultStatus() const 287 inline String LocalDOMWindow::defaultStatus() const
287 { 288 {
288 return m_defaultStatus; 289 return m_defaultStatus;
289 } 290 }
290 291
291 } // namespace blink 292 } // namespace blink
292 293
293 #endif // LocalDOMWindow_h 294 #endif // LocalDOMWindow_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Window/post-message-to-self-expected.txt ('k') | Source/core/frame/LocalDOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698