Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Issue 2368: LiveEdit crashes when new object/array literal is added (issue 11191039)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
yang...@chromium.org  
View profile  
 More options Oct 23 2012, 12:10 pm
From: yang...@chromium.org
Date: Tue, 23 Oct 2012 16:10:31 +0000
Local: Tues, Oct 23 2012 12:10 pm
Subject: Re: Issue 2368: LiveEdit crashes when new object/array literal is added (issue 11191039)
LGTM if comments are addressed.

http://codereview.chromium.org/11191039/diff/6001/src/liveedit.cc
File src/liveedit.cc (right):

http://codereview.chromium.org/11191039/diff/6001/src/liveedit.cc#new...
src/liveedit.cc:1056: FindJSFunctions(shared_info, result);
Running twice over the heap seems really inefficient.

http://codereview.chromium.org/11191039/diff/6001/src/liveedit.cc#new...
src/liveedit.cc:1166: // adjust array size.
Wouldn't adjusting array size imply cleaning cached values as well?
Please add that to the comment.

http://codereview.chromium.org/11191039/diff/6001/src/liveedit.cc#new...
src/liveedit.cc:1176: for (int i = 0; i < function_instances->length();
i++) {
Instead of looping over function instances that you have to tediously
gather, couldn't you iterate over the heap here and skip every object
that is not a function instance of shared_info? That way you wouldn't
need to allocate a new FixedArray and wouldn't need to iterate the heap
twice to find out that FixedArray's size.

http://codereview.chromium.org/11191039/diff/6001/src/liveedit.cc#new...
src/liveedit.cc:1182: old_literals->set(j,
isolate->heap()->undefined_value());
I guess you could use FixedArray->set_undefined here.

http://codereview.chromium.org/11191039/diff/6001/src/liveedit.cc#new...
src/liveedit.cc:1200: }
I assume that we are not dealing with optimized code here, right? In
that case only, clearing the literals array is safe (according to
mstarzinger@).

http://codereview.chromium.org/11191039/diff/6001/test/mjsunit/debug-...
File test/mjsunit/debug-liveedit-literals.js (right):

http://codereview.chromium.org/11191039/diff/6001/test/mjsunit/debug-...
test/mjsunit/debug-liveedit-literals.js:48:
Debug.LiveEdit.TestApi.ApplySingleChunkPatch(script, patch_pos,
old_expression.length, new_expression, change_log);
Please keep the 80-char limit.

http://codereview.chromium.org/11191039/diff/6001/test/mjsunit/debug-...
test/mjsunit/debug-liveedit-literals.js:75:
Test("(/.A./i).exec('Cat')[0]", "{c:'Capybara'}.c");
the test for regexp -> no literals seems to be missing.

http://codereview.chromium.org/11191039/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »