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

Side by Side Diff: Source/modules/websockets/DocumentWebSocketChannel.cpp

Issue 806423002: [WebSocket] Remove unnecessary harmful check on the Page instance associated with the Document (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 : ContextLifecycleObserver(context) 114 : ContextLifecycleObserver(context)
115 , m_handle(adoptPtr(handle ? handle : Platform::current()->createWebSocketHa ndle())) 115 , m_handle(adoptPtr(handle ? handle : Platform::current()->createWebSocketHa ndle()))
116 , m_client(client) 116 , m_client(client)
117 , m_identifier(0) 117 , m_identifier(0)
118 , m_sendingQuota(0) 118 , m_sendingQuota(0)
119 , m_receivedDataSizeForFlowControl(receivedDataSizeForFlowControlHighWaterMa rk * 2) // initial quota 119 , m_receivedDataSizeForFlowControl(receivedDataSizeForFlowControlHighWaterMa rk * 2) // initial quota
120 , m_sentSizeOfTopMessage(0) 120 , m_sentSizeOfTopMessage(0)
121 , m_sourceURLAtConstruction(sourceURL) 121 , m_sourceURLAtConstruction(sourceURL)
122 , m_lineNumberAtConstruction(lineNumber) 122 , m_lineNumberAtConstruction(lineNumber)
123 { 123 {
124 if (context->isDocument() && toDocument(context)->page()) 124 if (context->isDocument())
125 m_identifier = createUniqueIdentifier(); 125 m_identifier = createUniqueIdentifier();
126 } 126 }
127 127
128 DocumentWebSocketChannel::~DocumentWebSocketChannel() 128 DocumentWebSocketChannel::~DocumentWebSocketChannel()
129 { 129 {
130 ASSERT(!m_blobLoader); 130 ASSERT(!m_blobLoader);
131 } 131 }
132 132
133 bool DocumentWebSocketChannel::connect(const KURL& url, const String& protocol) 133 bool DocumentWebSocketChannel::connect(const KURL& url, const String& protocol)
134 { 134 {
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 } 588 }
589 589
590 void DocumentWebSocketChannel::trace(Visitor* visitor) 590 void DocumentWebSocketChannel::trace(Visitor* visitor)
591 { 591 {
592 visitor->trace(m_blobLoader); 592 visitor->trace(m_blobLoader);
593 visitor->trace(m_client); 593 visitor->trace(m_client);
594 WebSocketChannel::trace(visitor); 594 WebSocketChannel::trace(visitor);
595 } 595 }
596 596
597 } // namespace blink 597 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698