| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 { | 185 { |
| 186 if (m_bridge) | 186 if (m_bridge) |
| 187 m_bridge->close(code, reason); | 187 m_bridge->close(code, reason); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void WorkerThreadableWebSocketChannel::fail(const String& reason, MessageLevel l
evel, const String& sourceURL, unsigned lineNumber) | 190 void WorkerThreadableWebSocketChannel::fail(const String& reason, MessageLevel l
evel, const String& sourceURL, unsigned lineNumber) |
| 191 { | 191 { |
| 192 if (!m_bridge) | 192 if (!m_bridge) |
| 193 return; | 193 return; |
| 194 | 194 |
| 195 RefPtr<ScriptCallStack> callStack = createScriptCallStack(1, true); | 195 RefPtrWillBeRawPtr<ScriptCallStack> callStack = createScriptCallStack(1, tru
e); |
| 196 if (callStack && callStack->size()) { | 196 if (callStack && callStack->size()) { |
| 197 // In order to emulate the ConsoleMessage behavior, | 197 // In order to emulate the ConsoleMessage behavior, |
| 198 // we should ignore the specified url and line number if | 198 // we should ignore the specified url and line number if |
| 199 // we can get the JavaScript context. | 199 // we can get the JavaScript context. |
| 200 m_bridge->fail(reason, level, callStack->at(0).sourceURL(), callStack->a
t(0).lineNumber()); | 200 m_bridge->fail(reason, level, callStack->at(0).sourceURL(), callStack->a
t(0).lineNumber()); |
| 201 } else if (sourceURL.isEmpty() && !lineNumber) { | 201 } else if (sourceURL.isEmpty() && !lineNumber) { |
| 202 // No information is specified by the caller - use the url | 202 // No information is specified by the caller - use the url |
| 203 // and the line number at the connection. | 203 // and the line number at the connection. |
| 204 m_bridge->fail(reason, level, m_sourceURLAtConnection, m_lineNumberAtCon
nection); | 204 m_bridge->fail(reason, level, m_sourceURLAtConnection, m_lineNumberAtCon
nection); |
| 205 } else { | 205 } else { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 m_loaderProxy.postTaskToLoader(CallClosureTask::create(bind(&Peer::destroy,
m_peer))); | 623 m_loaderProxy.postTaskToLoader(CallClosureTask::create(bind(&Peer::destroy,
m_peer))); |
| 624 // Peer::destroy() deletes m_peer and then m_syncHelper will be released. | 624 // Peer::destroy() deletes m_peer and then m_syncHelper will be released. |
| 625 // We must not touch m_syncHelper any more. | 625 // We must not touch m_syncHelper any more. |
| 626 m_syncHelper = 0; | 626 m_syncHelper = 0; |
| 627 | 627 |
| 628 // We won't use this any more. | 628 // We won't use this any more. |
| 629 m_workerGlobalScope = nullptr; | 629 m_workerGlobalScope = nullptr; |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace WebCore | 632 } // namespace WebCore |
| OLD | NEW |