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

Side by Side Diff: src/objects.cc

Issue 3398014: Fix possible evaluation order problems. (Closed)
Patch Set: fixed more places 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
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 8703 matching lines...) Expand 10 before | Expand all | Expand 10 after
8714 for (int i = 0; i < debug_info->break_points()->length(); i++) { 8714 for (int i = 0; i < debug_info->break_points()->length(); i++) {
8715 if (debug_info->break_points()->get(i)->IsUndefined()) { 8715 if (debug_info->break_points()->get(i)->IsUndefined()) {
8716 index = i; 8716 index = i;
8717 break; 8717 break;
8718 } 8718 }
8719 } 8719 }
8720 if (index == kNoBreakPointInfo) { 8720 if (index == kNoBreakPointInfo) {
8721 // No free slot - extend break point info array. 8721 // No free slot - extend break point info array.
8722 Handle<FixedArray> old_break_points = 8722 Handle<FixedArray> old_break_points =
8723 Handle<FixedArray>(FixedArray::cast(debug_info->break_points())); 8723 Handle<FixedArray>(FixedArray::cast(debug_info->break_points()));
8724 debug_info->set_break_points(*Factory::NewFixedArray(
8725 old_break_points->length() +
8726 Debug::kEstimatedNofBreakPointsInFunction));
8727 Handle<FixedArray> new_break_points = 8724 Handle<FixedArray> new_break_points =
8728 Handle<FixedArray>(FixedArray::cast(debug_info->break_points())); 8725 Factory::NewFixedArray(old_break_points->length() +
8726 Debug::kEstimatedNofBreakPointsInFunction);
8727
8728 debug_info->set_break_points(*new_break_points);
8729 for (int i = 0; i < old_break_points->length(); i++) { 8729 for (int i = 0; i < old_break_points->length(); i++) {
8730 new_break_points->set(i, old_break_points->get(i)); 8730 new_break_points->set(i, old_break_points->get(i));
8731 } 8731 }
8732 index = old_break_points->length(); 8732 index = old_break_points->length();
8733 } 8733 }
8734 ASSERT(index != kNoBreakPointInfo); 8734 ASSERT(index != kNoBreakPointInfo);
8735 8735
8736 // Allocate new BreakPointInfo object and set the break point. 8736 // Allocate new BreakPointInfo object and set the break point.
8737 Handle<BreakPointInfo> new_break_point_info = 8737 Handle<BreakPointInfo> new_break_point_info =
8738 Handle<BreakPointInfo>::cast(Factory::NewStruct(BREAK_POINT_INFO_TYPE)); 8738 Handle<BreakPointInfo>::cast(Factory::NewStruct(BREAK_POINT_INFO_TYPE));
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
8900 if (break_point_objects()->IsUndefined()) return 0; 8900 if (break_point_objects()->IsUndefined()) return 0;
8901 // Single beak point. 8901 // Single beak point.
8902 if (!break_point_objects()->IsFixedArray()) return 1; 8902 if (!break_point_objects()->IsFixedArray()) return 1;
8903 // Multiple break points. 8903 // Multiple break points.
8904 return FixedArray::cast(break_point_objects())->length(); 8904 return FixedArray::cast(break_point_objects())->length();
8905 } 8905 }
8906 #endif 8906 #endif
8907 8907
8908 8908
8909 } } // namespace v8::internal 8909 } } // namespace v8::internal
OLDNEW
« src/bootstrapper.cc ('K') | « src/handles.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698