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

Issue 7828072: Create v8::HandleScope outside the while loop of RunShell(). (Closed)

Created:
9 years, 3 months ago by tfarina
Modified:
9 years, 3 months ago
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Create v8::HandleScope outside the while loop of RunShell(). We don't need to create it every single time we pass through the loop. R=mnaganov@chromium.org Signed-off-by: Thiago Farina <tfarina@chromium.org>;

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -3 lines) Patch
M samples/shell.cc View 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
tfarina
9 years, 3 months ago (2011-09-03 19:08:38 UTC) #1
Vitaly Repeshko
This way all the handles created in the loop will stay alive forever. This is ...
9 years, 3 months ago (2011-09-03 20:00:47 UTC) #2
tfarina
On 2011/09/03 20:00:47, Vitaly Repeshko wrote: > This way all the handles created in the ...
9 years, 3 months ago (2011-09-04 01:58:03 UTC) #3
William Hesse
On 2011/09/04 01:58:03, tfarina wrote: > On 2011/09/03 20:00:47, Vitaly Repeshko wrote: > > This ...
9 years, 3 months ago (2011-09-05 07:36:42 UTC) #4
tfarina
On 2011/09/05 07:36:42, William Hesse wrote: > On 2011/09/04 01:58:03, tfarina wrote: > > On ...
9 years, 3 months ago (2011-09-05 13:28:36 UTC) #5
William Hesse
Yes, the inner handlescope is for better GC. Not just the input string, but any ...
9 years, 3 months ago (2011-09-06 09:08:55 UTC) #6
tfarina
9 years, 3 months ago (2011-09-06 13:57:33 UTC) #7
On 2011/09/06 09:08:55, William Hesse wrote:
> Yes, the inner handlescope is for better GC.  Not just the input string, but
any
> other handles created while running that string, that aren't in a nested scope
> of their own, will be kept around indefinitely if the scope isn't destroyed at
> each iteration.  HandleScopes are cheap to create and destroy.

It seems Yangguo stolen my patch, http://codereview.chromium.org/7779032 :(

Since I end up spotting the problem in d8 I was going to fix it.

Powered by Google App Engine
This is Rietveld 408576698