Minor fixes

- support changes to js2c in Visual Studio build
  - handle empty handles in Utf8Value
  - add /nologo to sample link in SCons build

TBR=plesner
Review URL: http://codereview.chromium.org/7816

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
sgjesse@chromium.org 2008-10-21 15:24:58 +00:00
parent 3c7a8c39b0
commit 711ada81d1
3 changed files with 7 additions and 1 deletions

View File

@ -197,6 +197,7 @@ SAMPLE_FLAGS = {
'msvc': {
'all': {
'CCFLAGS': ['/nologo'],
'LINKFLAGS': ['/nologo'],
},
'library:shared': {
'CPPDEFINES': ['USING_V8_SHARED']

View File

@ -2623,6 +2623,11 @@ void V8::SetGlobalGCEpilogueCallback(GCCallback callback) {
String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) {
EnsureInitialized("v8::String::Utf8Value::Utf8Value()");
if (obj.IsEmpty()) {
str_ = NULL;
length_ = 0;
return;
}
HandleScope scope;
TryCatch try_catch;
Handle<String> str = obj->ToString();

View File

@ -3,4 +3,4 @@ set SOURCE_DIR=%1
set TARGET_DIR=%2
set PYTHON="..\..\..\third_party\python_24\python.exe"
if not exist %PYTHON% set PYTHON=python.exe
%PYTHON% ..\js2c.py %TARGET_DIR%\natives.cc %TARGET_DIR%\natives-empty.cc %SOURCE_DIR%\macros.py %SOURCE_DIR%\runtime.js %SOURCE_DIR%\v8natives.js %SOURCE_DIR%\array.js %SOURCE_DIR%\string.js %SOURCE_DIR%\uri.js %SOURCE_DIR%\math.js %SOURCE_DIR%\messages.js %SOURCE_DIR%\apinatives.js %SOURCE_DIR%\debug-delay.js %SOURCE_DIR%\mirror-delay.js %SOURCE_DIR%\date-delay.js %SOURCE_DIR%\regexp-delay.js
%PYTHON% ..\js2c.py %TARGET_DIR%\natives.cc %TARGET_DIR%\natives-empty.cc CORE %SOURCE_DIR%\macros.py %SOURCE_DIR%\runtime.js %SOURCE_DIR%\v8natives.js %SOURCE_DIR%\array.js %SOURCE_DIR%\string.js %SOURCE_DIR%\uri.js %SOURCE_DIR%\math.js %SOURCE_DIR%\messages.js %SOURCE_DIR%\apinatives.js %SOURCE_DIR%\debug-delay.js %SOURCE_DIR%\mirror-delay.js %SOURCE_DIR%\date-delay.js %SOURCE_DIR%\regexp-delay.js