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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/WebSocketChannel.cpp

Issue 2325983002: Replace ASSERT*() with DCHECK*() in modules/websockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ALLOW_UNUSED_LOCAL() Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 26 matching lines...) Expand all
37 #include "core/workers/WorkerThread.h" 37 #include "core/workers/WorkerThread.h"
38 #include "modules/websockets/DocumentWebSocketChannel.h" 38 #include "modules/websockets/DocumentWebSocketChannel.h"
39 #include "modules/websockets/WebSocketChannelClient.h" 39 #include "modules/websockets/WebSocketChannelClient.h"
40 #include "modules/websockets/WorkerWebSocketChannel.h" 40 #include "modules/websockets/WorkerWebSocketChannel.h"
41 #include <memory> 41 #include <memory>
42 42
43 namespace blink { 43 namespace blink {
44 44
45 WebSocketChannel* WebSocketChannel::create(ExecutionContext* context, WebSocketC hannelClient* client) 45 WebSocketChannel* WebSocketChannel::create(ExecutionContext* context, WebSocketC hannelClient* client)
46 { 46 {
47 ASSERT(context); 47 DCHECK(context);
48 ASSERT(client); 48 DCHECK(client);
49 49
50 std::unique_ptr<SourceLocation> location = SourceLocation::capture(context); 50 std::unique_ptr<SourceLocation> location = SourceLocation::capture(context);
51 51
52 if (context->isWorkerGlobalScope()) { 52 if (context->isWorkerGlobalScope()) {
53 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); 53 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context);
54 return WorkerWebSocketChannel::create(*workerGlobalScope, client, std::m ove(location)); 54 return WorkerWebSocketChannel::create(*workerGlobalScope, client, std::m ove(location));
55 } 55 }
56 56
57 Document* document = toDocument(context); 57 Document* document = toDocument(context);
58 return DocumentWebSocketChannel::create(document, client, std::move(location )); 58 return DocumentWebSocketChannel::create(document, client, std::move(location ));
59 } 59 }
60 60
61 } // namespace blink 61 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698