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

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

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the CustomFilterValidatedProgram.cpp from the patch(File is deleted in r164847) Created 6 years, 11 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
« no previous file with comments | « Source/modules/filesystem/DOMFilePath.cpp ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | 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) 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 unsigned lineNumber = 0; 58 unsigned lineNumber = 0;
59 RefPtr<ScriptCallStack> callStack = createScriptCallStack(1, true); 59 RefPtr<ScriptCallStack> callStack = createScriptCallStack(1, true);
60 if (callStack && callStack->size()) { 60 if (callStack && callStack->size()) {
61 sourceURL = callStack->at(0).sourceURL(); 61 sourceURL = callStack->at(0).sourceURL();
62 lineNumber = callStack->at(0).lineNumber(); 62 lineNumber = callStack->at(0).lineNumber();
63 } 63 }
64 64
65 if (context->isWorkerGlobalScope()) { 65 if (context->isWorkerGlobalScope()) {
66 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); 66 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context);
67 WorkerRunLoop& runLoop = workerGlobalScope->thread()->runLoop(); 67 WorkerRunLoop& runLoop = workerGlobalScope->thread()->runLoop();
68 String mode = webSocketChannelMode; 68 String mode = webSocketChannelMode + String::number(runLoop.createUnique Id());
69 mode.append(String::number(runLoop.createUniqueId()));
70 return WorkerThreadableWebSocketChannel::create(workerGlobalScope, clien t, mode, sourceURL, lineNumber); 69 return WorkerThreadableWebSocketChannel::create(workerGlobalScope, clien t, mode, sourceURL, lineNumber);
71 } 70 }
72 71
73 Document* document = toDocument(context); 72 Document* document = toDocument(context);
74 Settings* settings = document->settings(); 73 Settings* settings = document->settings();
75 if (settings && settings->experimentalWebSocketEnabled()) { 74 if (settings && settings->experimentalWebSocketEnabled()) {
76 // FIXME: Create and return an "experimental" WebSocketChannel instead o f a MainThreadWebSocketChannel. 75 // FIXME: Create and return an "experimental" WebSocketChannel instead o f a MainThreadWebSocketChannel.
77 return MainThreadWebSocketChannel::create(document, client, sourceURL, l ineNumber); 76 return MainThreadWebSocketChannel::create(document, client, sourceURL, l ineNumber);
78 } 77 }
79 return MainThreadWebSocketChannel::create(document, client, sourceURL, lineN umber); 78 return MainThreadWebSocketChannel::create(document, client, sourceURL, lineN umber);
80 } 79 }
81 80
82 } // namespace WebCore 81 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/DOMFilePath.cpp ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698