Add non-ASCII support to d8's read() function
Review URL: https://codereview.chromium.org/11778099 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
c5cff2c75a
commit
0ac84d782f
@ -1489,7 +1489,7 @@ Handle<String> Shell::ReadFile(Isolate* isolate, const char* name) {
|
||||
int size = 0;
|
||||
char* chars = ReadChars(isolate, name, &size);
|
||||
if (chars == NULL) return Handle<String>();
|
||||
Handle<String> result = String::New(chars);
|
||||
Handle<String> result = String::New(chars, size);
|
||||
delete[] chars;
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user