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

Side by Side Diff: Source/modules/serviceworkers/FetchEvent.cpp

Issue 326853002: Revert of Add an ASSERT about cross-world wrapper leakage into ScriptValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "FetchEvent.h" 6 #include "FetchEvent.h"
7 7
8 #include "modules/serviceworkers/Request.h" 8 #include "modules/serviceworkers/Request.h"
9 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" 9 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
10 #include "wtf/RefPtr.h" 10 #include "wtf/RefPtr.h"
11 11
12 namespace WebCore { 12 namespace WebCore {
13 13
14 PassRefPtrWillBeRawPtr<FetchEvent> FetchEvent::create() 14 PassRefPtrWillBeRawPtr<FetchEvent> FetchEvent::create()
15 { 15 {
16 return adoptRefWillBeNoop(new FetchEvent()); 16 return adoptRefWillBeNoop(new FetchEvent());
17 } 17 }
18 18
19 PassRefPtrWillBeRawPtr<FetchEvent> FetchEvent::create(PassRefPtr<RespondWithObse rver> observer, PassRefPtr<Request> request) 19 PassRefPtrWillBeRawPtr<FetchEvent> FetchEvent::create(PassRefPtr<RespondWithObse rver> observer, PassRefPtr<Request> request)
20 { 20 {
21 return adoptRefWillBeNoop(new FetchEvent(observer, request)); 21 return adoptRefWillBeNoop(new FetchEvent(observer, request));
22 } 22 }
23 23
24 Request* FetchEvent::request() const 24 Request* FetchEvent::request() const
25 { 25 {
26 return m_request.get(); 26 return m_request.get();
27 } 27 }
28 28
29 void FetchEvent::respondWith(ScriptState* scriptState, const ScriptValue& value) 29 void FetchEvent::respondWith(const ScriptValue& value)
30 { 30 {
31 m_observer->respondWith(scriptState, value); 31 m_observer->respondWith(value);
32 } 32 }
33 33
34 const AtomicString& FetchEvent::interfaceName() const 34 const AtomicString& FetchEvent::interfaceName() const
35 { 35 {
36 return EventNames::FetchEvent; 36 return EventNames::FetchEvent;
37 } 37 }
38 38
39 FetchEvent::FetchEvent() 39 FetchEvent::FetchEvent()
40 { 40 {
41 ScriptWrappable::init(this); 41 ScriptWrappable::init(this);
42 } 42 }
43 43
44 FetchEvent::FetchEvent(PassRefPtr<RespondWithObserver> observer, PassRefPtr<Requ est> request) 44 FetchEvent::FetchEvent(PassRefPtr<RespondWithObserver> observer, PassRefPtr<Requ est> request)
45 : Event(EventTypeNames::fetch, /*canBubble=*/false, /*cancelable=*/true) 45 : Event(EventTypeNames::fetch, /*canBubble=*/false, /*cancelable=*/true)
46 , m_observer(observer) 46 , m_observer(observer)
47 , m_request(request) 47 , m_request(request)
48 { 48 {
49 ScriptWrappable::init(this); 49 ScriptWrappable::init(this);
50 } 50 }
51 51
52 void FetchEvent::trace(Visitor* visitor) 52 void FetchEvent::trace(Visitor* visitor)
53 { 53 {
54 Event::trace(visitor); 54 Event::trace(visitor);
55 } 55 }
56 56
57 } // namespace WebCore 57 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/FetchEvent.h ('k') | Source/modules/serviceworkers/FetchEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698