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

Side by Side Diff: src/debug.cc

Issue 3274008: Get gcc to check that we don't ignore return values of functions that can... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 3 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
« no previous file with comments | « src/builtins.cc ('k') | src/heap.h » ('j') | src/utils.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 int break_points_hit_count = 0; 1000 int break_points_hit_count = 0;
1001 Handle<JSArray> break_points_hit = Factory::NewJSArray(1); 1001 Handle<JSArray> break_points_hit = Factory::NewJSArray(1);
1002 1002
1003 // If there are multiple break points they are in a FixedArray. 1003 // If there are multiple break points they are in a FixedArray.
1004 ASSERT(!break_point_objects->IsUndefined()); 1004 ASSERT(!break_point_objects->IsUndefined());
1005 if (break_point_objects->IsFixedArray()) { 1005 if (break_point_objects->IsFixedArray()) {
1006 Handle<FixedArray> array(FixedArray::cast(*break_point_objects)); 1006 Handle<FixedArray> array(FixedArray::cast(*break_point_objects));
1007 for (int i = 0; i < array->length(); i++) { 1007 for (int i = 0; i < array->length(); i++) {
1008 Handle<Object> o(array->get(i)); 1008 Handle<Object> o(array->get(i));
1009 if (CheckBreakPoint(o)) { 1009 if (CheckBreakPoint(o)) {
1010 break_points_hit->SetElement(break_points_hit_count++, *o); 1010 SetElement(break_points_hit, break_points_hit_count++, o);
1011 } 1011 }
1012 } 1012 }
1013 } else { 1013 } else {
1014 if (CheckBreakPoint(break_point_objects)) { 1014 if (CheckBreakPoint(break_point_objects)) {
1015 break_points_hit->SetElement(break_points_hit_count++, 1015 SetElement(break_points_hit,
1016 *break_point_objects); 1016 break_points_hit_count++,
1017 break_point_objects);
1017 } 1018 }
1018 } 1019 }
1019 1020
1020 // Return undefined if no break points where triggered. 1021 // Return undefined if no break points were triggered.
1021 if (break_points_hit_count == 0) { 1022 if (break_points_hit_count == 0) {
1022 return Factory::undefined_value(); 1023 return Factory::undefined_value();
1023 } 1024 }
1024 return break_points_hit; 1025 return break_points_hit;
1025 } 1026 }
1026 1027
1027 1028
1028 // Check whether a single break point object is triggered. 1029 // Check whether a single break point object is triggered.
1029 bool Debug::CheckBreakPoint(Handle<Object> break_point_object) { 1030 bool Debug::CheckBreakPoint(Handle<Object> break_point_object) {
1030 HandleScope scope; 1031 HandleScope scope;
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 { 3047 {
3047 Locker locker; 3048 Locker locker;
3048 Debugger::CallMessageDispatchHandler(); 3049 Debugger::CallMessageDispatchHandler();
3049 } 3050 }
3050 } 3051 }
3051 } 3052 }
3052 3053
3053 #endif // ENABLE_DEBUGGER_SUPPORT 3054 #endif // ENABLE_DEBUGGER_SUPPORT
3054 3055
3055 } } // namespace v8::internal 3056 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/heap.h » ('j') | src/utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698