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

Issue 668246: Check that function being patched has no activations on any thread stack (Closed)

Created:
10 years, 9 months ago by Peter Rybin
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Check that function being patched has no activations on any thread stack Committed: http://code.google.com/p/v8/source/detail?r=4069

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 12

Patch Set 3 : clean-up, fixes #

Patch Set 4 : format #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -75 lines) Patch
M src/debug-delay.js View 1 1 chunk +12 lines, -3 lines 0 comments Download
M src/liveedit.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/liveedit.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/liveedit-delay.js View 1 2 8 chunks +130 lines, -70 lines 0 comments Download
M src/runtime.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
A test/mjsunit/debug-liveedit-check-stack.js View 2 3 1 chunk +84 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Peter Rybin
10 years, 9 months ago (2010-03-08 02:50:20 UTC) #1
Søren Thygesen Gjesse
LGTM, with some comments. Regarding the stacks of other threads, see ThreadManager::Iterate in v8threads.cc and ...
10 years, 9 months ago (2010-03-08 07:59:42 UTC) #2
Peter Rybin
10 years, 9 months ago (2010-03-09 20:10:43 UTC) #3
http://codereview.chromium.org/668246/diff/1001/13
File src/liveedit-delay.js (right):

http://codereview.chromium.org/668246/diff/1001/13#newcode257
src/liveedit-delay.js:257: // TODO: Need to check here that there are no
activations of the function
On 2010/03/08 07:59:42, Søren Gjesse wrote:
> Ins't this comment obsolete?

Thanks
Done

http://codereview.chromium.org/668246/diff/1001/13#newcode330
src/liveedit-delay.js:330: // An object describing function compilation details.
Its index fields
On 2010/03/08 07:59:42, Søren Gjesse wrote:
> Indentation of comment.

Done.

http://codereview.chromium.org/668246/diff/1001/13#newcode343
src/liveedit-delay.js:343: 
On 2010/03/08 07:59:42, Søren Gjesse wrote:
> Indentation of comment.

Done.

http://codereview.chromium.org/668246/diff/1001/13#newcode412
src/liveedit-delay.js:412: 
On 2010/03/08 07:59:42, Søren Gjesse wrote:
> Space after //.

Done.

http://codereview.chromium.org/668246/diff/1001/14
File src/runtime.cc (right):

http://codereview.chromium.org/668246/diff/1001/14#newcode8458
src/runtime.cc:8458: // For array of SharedFunctionInfo's (each wrapped in
JSValue)
On 2010/03/08 07:59:42, Søren Gjesse wrote:
> I find the return stated for this function a bit strange. Both undefined and
'0'
> are considered 'false' values. Also the same code can be on the stack in
> different threads. If you want to have some kind of enumeration use some
> constants.
> 
>   static const int kLiveEditFunctionNotActivated = 0
>   static const int kLiveEditFunctionActivatedOnThisThreadOnly = 1
>   static const int kLiveEditFunctionActivatedOnOtherThreadsOnly = 2
>   static const int ...
> 
> and add these to liveedit-delay.js
> 
> (like the kFrameDetailsXXX constants).

I created explicit enum (in C++) and corresponding object in JS. Is it ok?

http://codereview.chromium.org/668246/diff/1001/16
File test/mjsunit/debug-liveedit-check-stack.js (right):

http://codereview.chromium.org/668246/diff/1001/16#newcode74
test/mjsunit/debug-liveedit-check-stack.js:74: assertEquals(true,
got_exception);
On 2010/03/08 07:59:42, Søren Gjesse wrote:
> How about adding modifying the function when it is not activated any more to
see
> that it can now be changed.

Oh, good idea.
Done.

Powered by Google App Engine
This is Rietveld 408576698