OLD | NEW |
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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "modules/indexeddb/IDBVersionChangeEvent.h" | 27 #include "modules/indexeddb/IDBVersionChangeEvent.h" |
28 | 28 |
29 #include "bindings/v8/IDBBindingUtilities.h" | 29 #include "bindings/v8/IDBBindingUtilities.h" |
30 #include "core/events/ThreadLocalEventNames.h" | 30 #include "core/events/ThreadLocalEventNames.h" |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 PassRefPtr<IDBVersionChangeEvent> IDBVersionChangeEvent::create(PassRefPtr<IDBAn
y> oldVersion, PassRefPtr<IDBAny> newVersion, const AtomicString& eventType, bli
nk::WebIDBDataLoss dataLoss, const String& dataLossMessage) | 34 PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> IDBVersionChangeEvent::create(Pass
RefPtr<IDBAny> oldVersion, PassRefPtr<IDBAny> newVersion, const AtomicString& ev
entType, blink::WebIDBDataLoss dataLoss, const String& dataLossMessage) |
35 { | 35 { |
36 return adoptRef(new IDBVersionChangeEvent(oldVersion, newVersion, eventType,
dataLoss, dataLossMessage)); | 36 return adoptRefCountedWillBeRefCountedGarbageCollected(new IDBVersionChangeE
vent(oldVersion, newVersion, eventType, dataLoss, dataLossMessage)); |
37 } | 37 } |
38 | 38 |
39 IDBVersionChangeEvent::IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, Pass
RefPtr<IDBAny> newVersion, const AtomicString& eventType, blink::WebIDBDataLoss
dataLoss, const String& dataLossMessage) | 39 IDBVersionChangeEvent::IDBVersionChangeEvent(PassRefPtr<IDBAny> oldVersion, Pass
RefPtr<IDBAny> newVersion, const AtomicString& eventType, blink::WebIDBDataLoss
dataLoss, const String& dataLossMessage) |
40 : Event(eventType, false /*canBubble*/, false /*cancelable*/) | 40 : Event(eventType, false /*canBubble*/, false /*cancelable*/) |
41 , m_oldVersion(oldVersion) | 41 , m_oldVersion(oldVersion) |
42 , m_newVersion(newVersion) | 42 , m_newVersion(newVersion) |
43 , m_dataLoss(dataLoss) | 43 , m_dataLoss(dataLoss) |
44 , m_dataLossMessage(dataLossMessage) | 44 , m_dataLossMessage(dataLossMessage) |
45 { | 45 { |
46 ScriptWrappable::init(this); | 46 ScriptWrappable::init(this); |
(...skipping 28 matching lines...) Expand all Loading... |
75 { | 75 { |
76 return EventNames::IDBVersionChangeEvent; | 76 return EventNames::IDBVersionChangeEvent; |
77 } | 77 } |
78 | 78 |
79 void IDBVersionChangeEvent::trace(Visitor* visitor) | 79 void IDBVersionChangeEvent::trace(Visitor* visitor) |
80 { | 80 { |
81 Event::trace(visitor); | 81 Event::trace(visitor); |
82 } | 82 } |
83 | 83 |
84 } // namespace WebCore | 84 } // namespace WebCore |
OLD | NEW |