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

Unified Diff: src/liveedit.cc

Issue 6731054: Fix a number of GC-unsafe evaluation order dependent places.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
===================================================================
--- src/liveedit.cc (revision 7417)
+++ src/liveedit.cc (working copy)
@@ -1013,8 +1013,8 @@
Handle<SharedFunctionInfo> shared_info = shared_info_wrapper.GetInfo();
if (IsJSFunctionCode(shared_info->code())) {
- ReplaceCodeObject(shared_info->code(),
- *(compile_info_wrapper.GetFunctionCode()));
+ Handle<Code> code = compile_info_wrapper.GetFunctionCode();
+ ReplaceCodeObject(shared_info->code(), *code);
Handle<Object> code_scope_info = compile_info_wrapper.GetCodeScopeInfo();
if (code_scope_info->IsFixedArray()) {
shared_info->set_scope_info(SerializedScopeInfo::cast(*code_scope_info));
@@ -1028,8 +1028,10 @@
debug_info->set_original_code(*new_original_code);
}
- shared_info->set_start_position(compile_info_wrapper.GetStartPosition());
- shared_info->set_end_position(compile_info_wrapper.GetEndPosition());
+ int start_position = compile_info_wrapper.GetStartPosition();
+ int end_position = compile_info_wrapper.GetEndPosition();
+ shared_info->set_start_position(start_position);
+ shared_info->set_end_position(end_position);
shared_info->set_construct_stub(
Isolate::Current()->builtins()->builtin(
@@ -1233,14 +1235,15 @@
int old_function_start = info->start_position();
int new_function_start = TranslatePosition(old_function_start,
position_change_array);
+ int new_function_end = TranslatePosition(info->end_position(),
+ position_change_array);
+ int new_function_token_pos =
+ TranslatePosition(info->function_token_position(), position_change_array);
+
info->set_start_position(new_function_start);
- info->set_end_position(TranslatePosition(info->end_position(),
- position_change_array));
+ info->set_end_position(new_function_end);
+ info->set_function_token_position(new_function_token_pos);
- info->set_function_token_position(
- TranslatePosition(info->function_token_position(),
- position_change_array));
-
if (IsJSFunctionCode(info->code())) {
// Patch relocation info section of the code.
Handle<Code> patched_code = PatchPositionsInCode(Handle<Code>(info->code()),
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698