OLD | NEW |
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 16 matching lines...) Expand all Loading... |
27 #include "core/storage/StorageEvent.h" | 27 #include "core/storage/StorageEvent.h" |
28 | 28 |
29 #include "core/storage/Storage.h" | 29 #include "core/storage/Storage.h" |
30 | 30 |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 StorageEventInit::StorageEventInit() | 33 StorageEventInit::StorageEventInit() |
34 { | 34 { |
35 } | 35 } |
36 | 36 |
37 PassRefPtr<StorageEvent> StorageEvent::create() | 37 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create() |
38 { | 38 { |
39 return adoptRef(new StorageEvent); | 39 return adoptRefWillBeRefCountedGarbageCollected(new StorageEvent); |
40 } | 40 } |
41 | 41 |
42 StorageEvent::StorageEvent() | 42 StorageEvent::StorageEvent() |
43 { | 43 { |
44 ScriptWrappable::init(this); | 44 ScriptWrappable::init(this); |
45 } | 45 } |
46 | 46 |
47 StorageEvent::~StorageEvent() | 47 StorageEvent::~StorageEvent() |
48 { | 48 { |
49 } | 49 } |
50 | 50 |
51 PassRefPtr<StorageEvent> StorageEvent::create(const AtomicString& type, const St
ring& key, const String& oldValue, const String& newValue, const String& url, St
orage* storageArea) | 51 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create(const AtomicString& ty
pe, const String& key, const String& oldValue, const String& newValue, const Str
ing& url, Storage* storageArea) |
52 { | 52 { |
53 return adoptRef(new StorageEvent(type, key, oldValue, newValue, url, storage
Area)); | 53 return adoptRefWillBeRefCountedGarbageCollected(new StorageEvent(type, key,
oldValue, newValue, url, storageArea)); |
54 } | 54 } |
55 | 55 |
56 PassRefPtr<StorageEvent> StorageEvent::create(const AtomicString& type, const St
orageEventInit& initializer) | 56 PassRefPtrWillBeRawPtr<StorageEvent> StorageEvent::create(const AtomicString& ty
pe, const StorageEventInit& initializer) |
57 { | 57 { |
58 return adoptRef(new StorageEvent(type, initializer)); | 58 return adoptRefWillBeRefCountedGarbageCollected(new StorageEvent(type, initi
alizer)); |
59 } | 59 } |
60 | 60 |
61 StorageEvent::StorageEvent(const AtomicString& type, const String& key, const St
ring& oldValue, const String& newValue, const String& url, Storage* storageArea) | 61 StorageEvent::StorageEvent(const AtomicString& type, const String& key, const St
ring& oldValue, const String& newValue, const String& url, Storage* storageArea) |
62 : Event(type, false, false) | 62 : Event(type, false, false) |
63 , m_key(key) | 63 , m_key(key) |
64 , m_oldValue(oldValue) | 64 , m_oldValue(oldValue) |
65 , m_newValue(newValue) | 65 , m_newValue(newValue) |
66 , m_url(url) | 66 , m_url(url) |
67 , m_storageArea(storageArea) | 67 , m_storageArea(storageArea) |
68 { | 68 { |
(...skipping 30 matching lines...) Expand all Loading... |
99 return EventNames::StorageEvent; | 99 return EventNames::StorageEvent; |
100 } | 100 } |
101 | 101 |
102 void StorageEvent::trace(Visitor* visitor) | 102 void StorageEvent::trace(Visitor* visitor) |
103 { | 103 { |
104 visitor->trace(m_storageArea); | 104 visitor->trace(m_storageArea); |
105 Event::trace(visitor); | 105 Event::trace(visitor); |
106 } | 106 } |
107 | 107 |
108 } // namespace WebCore | 108 } // namespace WebCore |
OLD | NEW |