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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/CloseEvent.h

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
« no previous file with comments | « third_party/WebKit/Source/core/events/PopStateEvent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 String reason() const { return m_reason; } 65 String reason() const { return m_reason; }
66 66
67 // Event function. 67 // Event function.
68 const AtomicString& interfaceName() const override { 68 const AtomicString& interfaceName() const override {
69 return EventNames::CloseEvent; 69 return EventNames::CloseEvent;
70 } 70 }
71 71
72 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); } 72 DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); }
73 73
74 private: 74 private:
75 CloseEvent() 75 CloseEvent() : m_wasClean(false), m_code(0) {}
76 : Event(EventTypeNames::close, false, false),
77 m_wasClean(false),
78 m_code(0) {}
79 76
80 CloseEvent(bool wasClean, int code, const String& reason) 77 CloseEvent(bool wasClean, int code, const String& reason)
81 : Event(EventTypeNames::close, false, false), 78 : Event(EventTypeNames::close, false, false),
82 m_wasClean(wasClean), 79 m_wasClean(wasClean),
83 m_code(code), 80 m_code(code),
84 m_reason(reason) {} 81 m_reason(reason) {}
85 82
86 CloseEvent(const AtomicString& type, const CloseEventInit& initializer); 83 CloseEvent(const AtomicString& type, const CloseEventInit& initializer);
87 84
88 bool m_wasClean; 85 bool m_wasClean;
89 unsigned short m_code; 86 unsigned short m_code;
90 String m_reason; 87 String m_reason;
91 }; 88 };
92 89
93 } // namespace blink 90 } // namespace blink
94 91
95 #endif // CloseEvent_h 92 #endif // CloseEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PopStateEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698