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

Side by Side Diff: third_party/WebKit/Source/modules/netinfo/WorkerNavigatorNetworkInformation.cpp

Issue 2862963003: Replace ASSERT with DCHECK in modules/ (Closed)
Patch Set: NOTREACHED instead of DCHECK(false) Created 3 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
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 "modules/netinfo/WorkerNavigatorNetworkInformation.h" 5 #include "modules/netinfo/WorkerNavigatorNetworkInformation.h"
6 6
7 #include "core/dom/ExecutionContext.h" 7 #include "core/dom/ExecutionContext.h"
8 #include "core/workers/WorkerNavigator.h" 8 #include "core/workers/WorkerNavigator.h"
9 #include "modules/netinfo/NetworkInformation.h" 9 #include "modules/netinfo/NetworkInformation.h"
10 #include "platform/bindings/ScriptState.h" 10 #include "platform/bindings/ScriptState.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 .connection(context); 48 .connection(context);
49 } 49 }
50 50
51 DEFINE_TRACE(WorkerNavigatorNetworkInformation) { 51 DEFINE_TRACE(WorkerNavigatorNetworkInformation) {
52 visitor->Trace(connection_); 52 visitor->Trace(connection_);
53 Supplement<WorkerNavigator>::Trace(visitor); 53 Supplement<WorkerNavigator>::Trace(visitor);
54 } 54 }
55 55
56 NetworkInformation* WorkerNavigatorNetworkInformation::connection( 56 NetworkInformation* WorkerNavigatorNetworkInformation::connection(
57 ExecutionContext* context) { 57 ExecutionContext* context) {
58 ASSERT(context); 58 DCHECK(context);
59 if (!connection_) 59 if (!connection_)
60 connection_ = NetworkInformation::Create(context); 60 connection_ = NetworkInformation::Create(context);
61 return connection_.Get(); 61 return connection_.Get();
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698