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

Issue 9139018: Provide a way for iterating through all external strings referenced from the JS heap (Closed)

Created:
8 years, 11 months ago by yurys
Modified:
8 years, 11 months ago
CC:
v8-dev
Visibility:
Public.

Description

Provide a way for iterating through all external strings referenced from the JS heap Committed: http://code.google.com/p/v8/source/detail?r=10400

Patch Set 1 #

Total comments: 16

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -0 lines) Patch
M include/v8.h View 1 2 3 4 2 chunks +18 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M src/heap.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 1 chunk +53 lines, -0 lines 2 comments Download

Messages

Total messages: 12 (0 generated)
yurys
8 years, 11 months ago (2012-01-11 18:23:05 UTC) #1
mnaganov (inactive)
http://codereview.chromium.org/9139018/diff/1/include/v8-profiler.h File include/v8-profiler.h (right): http://codereview.chromium.org/9139018/diff/1/include/v8-profiler.h#newcode442 include/v8-profiler.h:442: class ExternalResourceVisitor { You need to put V8EXPORT before ...
8 years, 11 months ago (2012-01-11 18:50:22 UTC) #2
yurys
http://codereview.chromium.org/9139018/diff/1/include/v8-profiler.h File include/v8-profiler.h (right): http://codereview.chromium.org/9139018/diff/1/include/v8-profiler.h#newcode442 include/v8-profiler.h:442: class ExternalResourceVisitor { On 2012/01/11 18:50:23, Mikhail Naganov (Chromium) ...
8 years, 11 months ago (2012-01-11 19:50:13 UTC) #3
mnaganov (inactive)
Looks good to me, but since it changes the V8 API, I would like to ...
8 years, 11 months ago (2012-01-12 10:37:27 UTC) #4
yurys
Daniel, could you take a look? http://codereview.chromium.org/9139018/diff/4001/src/api.cc File src/api.cc (left): http://codereview.chromium.org/9139018/diff/4001/src/api.cc#oldcode6032 src/api.cc:6032: On 2012/01/12 10:37:27, ...
8 years, 11 months ago (2012-01-12 12:00:06 UTC) #5
Yang
On 2012/01/12 12:00:06, Yury Semikhatsky wrote: > Daniel, could you take a look? > > ...
8 years, 11 months ago (2012-01-13 07:55:34 UTC) #6
yurys
On 2012/01/13 07:55:34, Yang wrote: > On 2012/01/12 12:00:06, Yury Semikhatsky wrote: > Drive-by: > ...
8 years, 11 months ago (2012-01-13 12:31:52 UTC) #7
danno
LGTM with comments. Please make it clear from the documentation that this API cannot be ...
8 years, 11 months ago (2012-01-13 15:00:04 UTC) #8
yurys
On 2012/01/13 15:00:04, danno wrote: > LGTM with comments. Please make it clear from the ...
8 years, 11 months ago (2012-01-13 15:14:27 UTC) #9
Tobias Burnus
Unfortunately, the test included in patch breaks with GCC 4.7 with a "set but not ...
8 years, 11 months ago (2012-01-13 20:57:01 UTC) #10
yurys
http://codereview.chromium.org/9139018/diff/14001/test/cctest/test-api.cc File test/cctest/test-api.cc (right): http://codereview.chromium.org/9139018/diff/14001/test/cctest/test-api.cc#newcode13723 test/cctest/test-api.cc:13723: v8::Local<v8::String> string2 = v8::String::NewExternal(resource2); On 2012/01/13 20:57:01, Tobias Burnus ...
8 years, 11 months ago (2012-01-14 13:52:44 UTC) #11
Tobias Burnus
8 years, 11 months ago (2012-01-14 14:27:40 UTC) #12
On 2012/01/14 13:52:44, Yury Semikhatsky wrote:
> I can add an artificial usages of string1 and string2 but the failure sounds
> wrong since v8::Local protects the strings from being GC'ed. I don't see why I
> cannot have assigned but never used scoped_ptr as a method local variable.

Well, language wise is allowed - thus the compiler only warns. The warning is
GCC new since 4.7.

However, as v8 is compiled with -Wall (which implies in GCC 4.7
-Werror=unused-but-set-variable) and with -Werror (treat warnings as error),
this will lead to build failures with GCC 4.7.

The warning makes sense as unused variables usually indicate dead code (and
sometimes even algorithmic bugs).


> What is recommended way of dealing with such warnings in v8?

For real code: - usually - to remove those variables. For test code: No idea.
Removing the variables? Adding an artificial use? Changing the compiler options?


> Btw, is there a build bot using GCC4.7 where I could see the failure?

I don't think that there is already a GCC 4.7 bot available. Nevertheless, I
would appreciate if one could build v8 with GCC 4.7.

Regarding the failure, the message is a simple:
test-api.cc:13721:25: error: variable 'string1' set but not used


Tobias,
who is a mere user of v8 and cannot provide any official guidance

Powered by Google App Engine
This is Rietveld 408576698