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

Side by Side Diff: third_party/WebKit/Source/modules/storage/StorageEvent.cpp

Issue 1925963002: InitEvent should not do anything if dispatch flag is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per review comments Created 4 years, 7 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/modules/device_orientation/DeviceOrientationEvent.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) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (initializer.hasNewValue()) 74 if (initializer.hasNewValue())
75 m_newValue = initializer.newValue(); 75 m_newValue = initializer.newValue();
76 if (initializer.hasURL()) 76 if (initializer.hasURL())
77 m_url = initializer.url(); 77 m_url = initializer.url();
78 if (initializer.hasStorageArea()) 78 if (initializer.hasStorageArea())
79 m_storageArea = initializer.storageArea(); 79 m_storageArea = initializer.storageArea();
80 } 80 }
81 81
82 void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo ol cancelable, const String& key, const String& oldValue, const String& newValue , const String& url, Storage* storageArea) 82 void StorageEvent::initStorageEvent(const AtomicString& type, bool canBubble, bo ol cancelable, const String& key, const String& oldValue, const String& newValue , const String& url, Storage* storageArea)
83 { 83 {
84 if (dispatched()) 84 if (isBeingDispatched())
85 return; 85 return;
86 86
87 initEvent(type, canBubble, cancelable); 87 initEvent(type, canBubble, cancelable);
88 88
89 m_key = key; 89 m_key = key;
90 m_oldValue = oldValue; 90 m_oldValue = oldValue;
91 m_newValue = newValue; 91 m_newValue = newValue;
92 m_url = url; 92 m_url = url;
93 m_storageArea = storageArea; 93 m_storageArea = storageArea;
94 } 94 }
95 95
96 const AtomicString& StorageEvent::interfaceName() const 96 const AtomicString& StorageEvent::interfaceName() const
97 { 97 {
98 return EventNames::StorageEvent; 98 return EventNames::StorageEvent;
99 } 99 }
100 100
101 DEFINE_TRACE(StorageEvent) 101 DEFINE_TRACE(StorageEvent)
102 { 102 {
103 visitor->trace(m_storageArea); 103 visitor->trace(m_storageArea);
104 Event::trace(visitor); 104 Event::trace(visitor);
105 } 105 }
106 106
107 } // namespace blink 107 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/device_orientation/DeviceOrientationEvent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698