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

Side by Side Diff: src/objects.cc

Issue 6347067: Fix potential overwriting of debug jumps of following code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build-x64
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/safepoint-table.h » ('j') | src/safepoint-table.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 5898 matching lines...) Expand 10 before | Expand all | Expand 10 after
5909 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | 5909 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) |
5910 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) | 5910 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) |
5911 RelocInfo::kApplyMask; 5911 RelocInfo::kApplyMask;
5912 Assembler* origin = desc.origin; // Needed to find target_object on X64. 5912 Assembler* origin = desc.origin; // Needed to find target_object on X64.
5913 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { 5913 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) {
5914 RelocInfo::Mode mode = it.rinfo()->rmode(); 5914 RelocInfo::Mode mode = it.rinfo()->rmode();
5915 if (mode == RelocInfo::EMBEDDED_OBJECT) { 5915 if (mode == RelocInfo::EMBEDDED_OBJECT) {
5916 Handle<Object> p = it.rinfo()->target_object_handle(origin); 5916 Handle<Object> p = it.rinfo()->target_object_handle(origin);
5917 it.rinfo()->set_target_object(*p); 5917 it.rinfo()->set_target_object(*p);
5918 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { 5918 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
5919 Handle<JSGlobalPropertyCell> cell = it.rinfo()->target_cell_handle(); 5919 Handle<JSGlobalPropertyCell> cell = it.rinfo()->target_cell_handle();
5920 it.rinfo()->set_target_cell(*cell); 5920 it.rinfo()->set_target_cell(*cell);
5921 } else if (RelocInfo::IsCodeTarget(mode)) { 5921 } else if (RelocInfo::IsCodeTarget(mode)) {
5922 // rewrite code handles in inline cache targets to direct 5922 // rewrite code handles in inline cache targets to direct
5923 // pointers to the first instruction in the code object 5923 // pointers to the first instruction in the code object
5924 Handle<Object> p = it.rinfo()->target_object_handle(origin); 5924 Handle<Object> p = it.rinfo()->target_object_handle(origin);
5925 Code* code = Code::cast(*p); 5925 Code* code = Code::cast(*p);
5926 it.rinfo()->set_target_address(code->instruction_start()); 5926 it.rinfo()->set_target_address(code->instruction_start());
5927 } else { 5927 } else {
5928 it.rinfo()->apply(delta); 5928 it.rinfo()->apply(delta);
5929 } 5929 }
(...skipping 3937 matching lines...) Expand 10 before | Expand all | Expand 10 after
9867 if (break_point_objects()->IsUndefined()) return 0; 9867 if (break_point_objects()->IsUndefined()) return 0;
9868 // Single beak point. 9868 // Single beak point.
9869 if (!break_point_objects()->IsFixedArray()) return 1; 9869 if (!break_point_objects()->IsFixedArray()) return 1;
9870 // Multiple break points. 9870 // Multiple break points.
9871 return FixedArray::cast(break_point_objects())->length(); 9871 return FixedArray::cast(break_point_objects())->length();
9872 } 9872 }
9873 #endif 9873 #endif
9874 9874
9875 9875
9876 } } // namespace v8::internal 9876 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/safepoint-table.h » ('j') | src/safepoint-table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698