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

Side by Side Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 years, 10 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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 int actualLineNumber; 561 int actualLineNumber;
562 int actualColumnNumber; 562 int actualColumnNumber;
563 String debugServerBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &actualLineNumber, &actualColumnNumber, false); 563 String debugServerBreakpointId = scriptDebugServer().setBreakpoint(scriptId, breakpoint, &actualLineNumber, &actualColumnNumber, false);
564 if (debugServerBreakpointId.isEmpty()) 564 if (debugServerBreakpointId.isEmpty())
565 return 0; 565 return 0;
566 566
567 m_serverBreakpoints.set(debugServerBreakpointId, std::make_pair(breakpointId , source)); 567 m_serverBreakpoints.set(debugServerBreakpointId, std::make_pair(breakpointId , source));
568 568
569 BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIds Iterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId); 569 BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIds Iterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId);
570 if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpoin tIds.end()) 570 if (debugServerBreakpointIdsIterator == m_breakpointIdToDebugServerBreakpoin tIds.end())
571 debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpoint Ids.set(breakpointId, Vector<String>()).iterator; 571 m_breakpointIdToDebugServerBreakpointIds.set(breakpointId, Vector<String >()).storedValue->value.append(debugServerBreakpointId);
572 debugServerBreakpointIdsIterator->value.append(debugServerBreakpointId); 572 else
573 debugServerBreakpointIdsIterator->value.append(debugServerBreakpointId);
573 574
574 RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Lo cation::create() 575 RefPtr<TypeBuilder::Debugger::Location> location = TypeBuilder::Debugger::Lo cation::create()
575 .setScriptId(scriptId) 576 .setScriptId(scriptId)
576 .setLineNumber(actualLineNumber); 577 .setLineNumber(actualLineNumber);
577 location->setColumnNumber(actualColumnNumber); 578 location->setColumnNumber(actualColumnNumber);
578 return location; 579 return location;
579 } 580 }
580 581
581 static PassRefPtr<JSONObject> scriptToInspectorObject(ScriptObject scriptObject) 582 static PassRefPtr<JSONObject> scriptToInspectorObject(ScriptObject scriptObject)
582 { 583 {
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 { 1262 {
1262 m_scripts.clear(); 1263 m_scripts.clear();
1263 m_breakpointIdToDebugServerBreakpointIds.clear(); 1264 m_breakpointIdToDebugServerBreakpointIds.clear();
1264 m_asyncCallStackTracker.clear(); 1265 m_asyncCallStackTracker.clear();
1265 if (m_frontend) 1266 if (m_frontend)
1266 m_frontend->globalObjectCleared(); 1267 m_frontend->globalObjectCleared();
1267 } 1268 }
1268 1269
1269 } // namespace WebCore 1270 } // namespace WebCore
1270 1271
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorTimelineAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698