Commit f653480a authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix windows compile errors introduced by r12430.

R=ulan@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/10907049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4c7be4f6
......@@ -4943,15 +4943,17 @@ Local<String> v8::String::NewExternal(ExternalLatin1StringResource* resource,
ENTER_V8(isolate);
ASSERT((encoding & kStringEncodingMask) == LATIN1_ENCODING);
CHECK(resource && resource->data());
bool ascii_hint = (encoding & kAsciiHintMask);
int ascii_hint = (encoding & kAsciiHintMask);
i::Handle<i::String> result;
if (ascii_hint == ASCII_HINT ||
(ascii_hint != NOT_ASCII_HINT &&
i::String::IsAscii(resource->data(), resource->length()))) {
i::String::IsAscii(resource->data(),
static_cast<int>(resource->length())))) {
// Assert that the ascii hint is correct.
ASSERT(ascii_hint != ASCII_HINT ||
i::String::IsAscii(resource->data(), resource->length()));
i::String::IsAscii(resource->data(),
static_cast<int>(resource->length())));
result = NewExternalAsciiStringHandle(isolate, resource);
isolate->heap()->external_string_table()->AddString(*result);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment