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

Side by Side Diff: third_party/WebKit/Source/core/events/PopStateEvent.cpp

Issue 2677793003: Don't initialize event when calling create() with no argument (Closed)
Patch Set: Created 3 years, 10 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) 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2009 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #include "core/events/PopStateEvent.h" 27 #include "core/events/PopStateEvent.h"
28 28
29 #include "bindings/core/v8/SerializedScriptValue.h" 29 #include "bindings/core/v8/SerializedScriptValue.h"
30 #include "core/frame/History.h" 30 #include "core/frame/History.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 PopStateEvent::PopStateEvent() 34 PopStateEvent::PopStateEvent()
35 : Event(EventTypeNames::popstate, false, true), 35 : m_serializedState(nullptr), m_history(nullptr) {}
36 m_serializedState(nullptr),
37 m_history(nullptr) {}
38 36
39 PopStateEvent::PopStateEvent(const AtomicString& type, 37 PopStateEvent::PopStateEvent(const AtomicString& type,
40 const PopStateEventInit& initializer) 38 const PopStateEventInit& initializer)
41 : Event(type, initializer), m_history(nullptr) { 39 : Event(type, initializer), m_history(nullptr) {
42 if (initializer.hasState()) 40 if (initializer.hasState())
43 m_state = initializer.state(); 41 m_state = initializer.state();
44 } 42 }
45 43
46 PopStateEvent::PopStateEvent(PassRefPtr<SerializedScriptValue> serializedState, 44 PopStateEvent::PopStateEvent(PassRefPtr<SerializedScriptValue> serializedState,
47 History* history) 45 History* history)
(...skipping 21 matching lines...) Expand all
69 const AtomicString& PopStateEvent::interfaceName() const { 67 const AtomicString& PopStateEvent::interfaceName() const {
70 return EventNames::PopStateEvent; 68 return EventNames::PopStateEvent;
71 } 69 }
72 70
73 DEFINE_TRACE(PopStateEvent) { 71 DEFINE_TRACE(PopStateEvent) {
74 visitor->trace(m_history); 72 visitor->trace(m_history);
75 Event::trace(visitor); 73 Event::trace(visitor);
76 } 74 }
77 75
78 } // namespace blink 76 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/BeforeUnloadEvent.cpp ('k') | third_party/WebKit/Source/modules/websockets/CloseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698