| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index e169bd08a0996e6de49e53e50cd17fbcb769e723..0ec8cf123e49acc01b746286c05c0397b16e40fc 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1165,22 +1165,14 @@ void ObjectTemplate::SetInternalFieldCount(int value) {
|
|
|
|
|
| ScriptData* ScriptData::PreCompile(const char* input, int length) {
|
| - i::Utf8ToUC16CharacterStream stream(
|
| - reinterpret_cast<const unsigned char*>(input), length);
|
| - return i::ParserApi::PreParse(&stream, NULL);
|
| + unibrow::Utf8InputBuffer<> buf(input, length);
|
| + return i::ParserApi::PreParse(i::Handle<i::String>(), &buf, NULL);
|
| }
|
|
|
|
|
| ScriptData* ScriptData::PreCompile(v8::Handle<String> source) {
|
| i::Handle<i::String> str = Utils::OpenHandle(*source);
|
| - if (str->IsExternalTwoByteString()) {
|
| - i::ExternalTwoByteStringUC16CharacterStream stream(
|
| - i::Handle<i::ExternalTwoByteString>::cast(str), 0, str->length());
|
| - return i::ParserApi::PreParse(&stream, NULL);
|
| - } else {
|
| - i::GenericStringUC16CharacterStream stream(str, 0, str->length());
|
| - return i::ParserApi::PreParse(&stream, NULL);
|
| - }
|
| + return i::ParserApi::PreParse(str, NULL, NULL);
|
| }
|
|
|
|
|
| @@ -4947,8 +4939,7 @@ const HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) {
|
|
|
|
|
| const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title,
|
| - HeapSnapshot::Type type,
|
| - ActivityControl* control) {
|
| + HeapSnapshot::Type type) {
|
| IsDeadCheck("v8::HeapProfiler::TakeSnapshot");
|
| i::HeapSnapshot::Type internal_type = i::HeapSnapshot::kFull;
|
| switch (type) {
|
| @@ -4962,8 +4953,7 @@ const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title,
|
| UNREACHABLE();
|
| }
|
| return reinterpret_cast<const HeapSnapshot*>(
|
| - i::HeapProfiler::TakeSnapshot(
|
| - *Utils::OpenHandle(*title), internal_type, control));
|
| + i::HeapProfiler::TakeSnapshot(*Utils::OpenHandle(*title), internal_type));
|
| }
|
|
|
| #endif // ENABLE_LOGGING_AND_PROFILING
|
|
|