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

Side by Side Diff: chrome/browser/debugger/debugger_remote_service.cc

Issue 6674006: Coverity Fixlets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CID=6283,3909 Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file contains implementations of the DebuggerRemoteService methods, 5 // This file contains implementations of the DebuggerRemoteService methods,
6 // defines DebuggerRemoteService and DebuggerRemoteServiceCommand constants. 6 // defines DebuggerRemoteService and DebuggerRemoteServiceCommand constants.
7 7
8 #include "chrome/browser/debugger/debugger_remote_service.h" 8 #include "chrome/browser/debugger/debugger_remote_service.h"
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 DevToolsClientHost* client_host = 289 DevToolsClientHost* client_host =
290 manager->GetDevToolsClientHostFor(tab_contents->render_view_host()); 290 manager->GetDevToolsClientHostFor(tab_contents->render_view_host());
291 if (client_host == NULL) { 291 if (client_host == NULL) {
292 // tab_uid is not being debugged (Attach has not been invoked) 292 // tab_uid is not being debugged (Attach has not been invoked)
293 response->SetInteger(kResultKey, RESULT_ILLEGAL_TAB_STATE); 293 response->SetInteger(kResultKey, RESULT_ILLEGAL_TAB_STATE);
294 return true; 294 return true;
295 } 295 }
296 std::string v8_command; 296 std::string v8_command;
297 DictionaryValue* v8_command_value; 297 DictionaryValue* v8_command_value;
298 content->GetDictionary(kDataKey, &v8_command_value); 298 if (!content->GetDictionary(kDataKey, &v8_command_value))
299 return true;
Lei Zhang 2011/03/11 01:09:35 I have no idea if this is right. I would leave thi
Sheridan Rawlins 2011/03/11 01:39:49 reverted
299 base::JSONWriter::Write(v8_command_value, false, &v8_command); 300 base::JSONWriter::Write(v8_command_value, false, &v8_command);
300 manager->ForwardToDevToolsAgent( 301 manager->ForwardToDevToolsAgent(
301 client_host, DevToolsAgentMsg_DebuggerCommand(v8_command)); 302 client_host, DevToolsAgentMsg_DebuggerCommand(v8_command));
302 // Do not send the response right now, as the JSON will be received from 303 // Do not send the response right now, as the JSON will be received from
303 // the V8 debugger asynchronously. 304 // the V8 debugger asynchronously.
304 return false; 305 return false;
305 } 306 }
306 307
307 // Sends the immediate "evaluate Javascript" command to the V8 debugger. 308 // Sends the immediate "evaluate Javascript" command to the V8 debugger.
308 // The evaluation result is not sent back to the client as this command 309 // The evaluation result is not sent back to the client as this command
(...skipping 18 matching lines...) Expand all
327 // No RenderViewHost 328 // No RenderViewHost
328 response->SetInteger(kResultKey, RESULT_UNKNOWN_TAB); 329 response->SetInteger(kResultKey, RESULT_UNKNOWN_TAB);
329 return true; 330 return true;
330 } 331 }
331 std::string javascript; 332 std::string javascript;
332 content->GetString(kDataKey, &javascript); 333 content->GetString(kDataKey, &javascript);
333 render_view_host->ExecuteJavascriptInWebFrame(string16(), 334 render_view_host->ExecuteJavascriptInWebFrame(string16(),
334 UTF8ToUTF16(javascript)); 335 UTF8ToUTF16(javascript));
335 return false; 336 return false;
336 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698