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

Issue 10199019: Make String::Empty inlineable. (Closed)

Created:
8 years, 8 months ago by Michael Starzinger
Modified:
8 years, 8 months ago
Reviewers:
Sven Panne
CC:
v8-dev
Visibility:
Public.

Description

Make String::Empty inlineable. R=svenpanne@chromium.org TEST=cctest/test-api/StringEmpty Committed: https://code.google.com/p/v8/source/detail?r=11429

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -15 lines) Patch
M include/v8.h View 3 chunks +11 lines, -0 lines 0 comments Download
M src/api.cc View 1 chunk +3 lines, -1 line 2 comments Download
M src/heap.h View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api.cc View 3 chunks +32 lines, -14 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
8 years, 8 months ago (2012-04-24 16:30:21 UTC) #1
Sven Panne
LGTM. Just a little general remark: With every single change like this we say a ...
8 years, 8 months ago (2012-04-25 06:56:21 UTC) #2
Michael Starzinger
8 years, 8 months ago (2012-04-25 08:18:31 UTC) #3
About dynamic linking: You are right, I can imagine that shipping V8 as a shared
library is a "hard job" for distributions at the moment.

The first thing we would need to make this easier, is to introduce an API
version number scheme. Whenever we land a change in v8.h, those version number
need/might to be bumped accordingly.

But my change doesn't make the situation worse, it just introduces more reasons
why the aforementioned version numbers would need to be bumped. And we have
plenty of reasons in v8.h already.

https://chromiumcodereview.appspot.com/10199019/diff/1/src/api.cc
File src/api.cc (right):

https://chromiumcodereview.appspot.com/10199019/diff/1/src/api.cc#newcode4633
src/api.cc:4633: if (!EnsureInitializedForIsolate(isolate,
"v8::String::Empty()")) {
On 2012/04/25 06:56:22, Sven Panne wrote:
> Just out of curiosity: Why do we need this change? Or asked another way: Why
do
> we *not* need it in tons of other places? Or should we test the result of
> EnusreInitializedForIsolate everywhere? api.cc is extremely inconsistent...

Yes, IMHO we need this change in tons of other places. Because
EnsureInitializedForIsolate() can return even though the Isolate is not
initialized or is already dead, in cases where the embedder installed a fatal
error handler with SetFatalErrorHandler() that doesn't terminate the
application.

This just wasn't tested for String::Empty() before. I'll try to fix this
incrementally with my changes. We could also fix this for all functions in one
sweep, I you think that's worth the trouble.

Powered by Google App Engine
This is Rietveld 408576698