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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | 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 "modules/serviceworkers/WaitUntilObserver.h" 6 #include "modules/serviceworkers/WaitUntilObserver.h"
7 7
8 #include "bindings/v8/ScriptFunction.h" 8 #include "bindings/v8/ScriptFunction.h"
9 #include "bindings/v8/ScriptPromise.h" 9 #include "bindings/v8/ScriptPromise.h"
10 #include "bindings/v8/ScriptValue.h" 10 #include "bindings/v8/ScriptValue.h"
(...skipping 26 matching lines...) Expand all
37 { 37 {
38 } 38 }
39 39
40 virtual ScriptValue call(ScriptValue value) OVERRIDE 40 virtual ScriptValue call(ScriptValue value) OVERRIDE
41 { 41 {
42 ASSERT(m_observer); 42 ASSERT(m_observer);
43 ASSERT(m_resolveType == Fulfilled || m_resolveType == Rejected); 43 ASSERT(m_resolveType == Fulfilled || m_resolveType == Rejected);
44 if (m_resolveType == Rejected) 44 if (m_resolveType == Rejected)
45 m_observer->reportError(value); 45 m_observer->reportError(value);
46 m_observer->decrementPendingActivity(); 46 m_observer->decrementPendingActivity();
47 m_observer = 0; 47 m_observer = nullptr;
48 return value; 48 return value;
49 } 49 }
50 50
51 RefPtr<WaitUntilObserver> m_observer; 51 RefPtr<WaitUntilObserver> m_observer;
52 ResolveType m_resolveType; 52 ResolveType m_resolveType;
53 }; 53 };
54 54
55 PassRefPtr<WaitUntilObserver> WaitUntilObserver::create(ExecutionContext* contex t, int eventID) 55 PassRefPtr<WaitUntilObserver> WaitUntilObserver::create(ExecutionContext* contex t, int eventID)
56 { 56 {
57 return adoptRef(new WaitUntilObserver(context, eventID)); 57 return adoptRef(new WaitUntilObserver(context, eventID));
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 102 {
103 ASSERT(m_pendingActivity > 0); 103 ASSERT(m_pendingActivity > 0);
104 if (--m_pendingActivity || !executionContext()) 104 if (--m_pendingActivity || !executionContext())
105 return; 105 return;
106 106
107 ServiceWorkerGlobalScopeClient::from(executionContext())->didHandleInstallEv ent(m_eventID); 107 ServiceWorkerGlobalScopeClient::from(executionContext())->didHandleInstallEv ent(m_eventID);
108 observeContext(0); 108 observeContext(0);
109 } 109 }
110 110
111 } // namespace WebCore 111 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/notifications/NotificationCenter.h ('k') | Source/modules/speech/SpeechRecognitionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698