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.

https://chromiumcodereview.appspot.com/10199019/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to