From 1ae2ea08b9f2a125df7e9ec92fe30fecccf4732b Mon Sep 17 00:00:00 2001 From: "vitalyr@chromium.org" Date: Mon, 28 Mar 2011 08:44:30 +0000 Subject: [PATCH] Remove more TLS hurting Dromaeo DOM. Patch by Dmitry Lomov. Review URL: http://codereview.chromium.org/6745029 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/api.cc | 10 ++++++---- src/log.cc | 8 ++++---- src/objects.cc | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/api.cc b/src/api.cc index 716d9b5..594fce7 100644 --- a/src/api.cc +++ b/src/api.cc @@ -3240,14 +3240,16 @@ int Function::GetScriptLineNumber() const { int String::Length() const { - if (IsDeadCheck(i::Isolate::Current(), "v8::String::Length()")) return 0; - return Utils::OpenHandle(this)->length(); + i::Handle str = Utils::OpenHandle(this); + if (IsDeadCheck(str->GetIsolate(), "v8::String::Length()")) return 0; + return str->length(); } int String::Utf8Length() const { - if (IsDeadCheck(i::Isolate::Current(), "v8::String::Utf8Length()")) return 0; - return Utils::OpenHandle(this)->Utf8Length(); + i::Handle str = Utils::OpenHandle(this); + if (IsDeadCheck(str->GetIsolate(), "v8::String::Utf8Length()")) return 0; + return str->Utf8Length(); } diff --git a/src/log.cc b/src/log.cc index 5236251..dc7906c 100644 --- a/src/log.cc +++ b/src/log.cc @@ -619,7 +619,7 @@ void Logger::ApiNamedPropertyAccess(const char* tag, class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); SmartPointer property_name = String::cast(name)->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); - LOGGER->ApiEvent("api,%s,\"%s\",\"%s\"\n", tag, *class_name, *property_name); + ApiEvent("api,%s,\"%s\",\"%s\"\n", tag, *class_name, *property_name); #endif } @@ -631,7 +631,7 @@ void Logger::ApiIndexedPropertyAccess(const char* tag, String* class_name_obj = holder->class_name(); SmartPointer class_name = class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); - LOGGER->ApiEvent("api,%s,\"%s\",%u\n", tag, *class_name, index); + ApiEvent("api,%s,\"%s\",%u\n", tag, *class_name, index); #endif } @@ -641,7 +641,7 @@ void Logger::ApiObjectAccess(const char* tag, JSObject* object) { String* class_name_obj = object->class_name(); SmartPointer class_name = class_name_obj->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); - LOGGER->ApiEvent("api,%s,\"%s\"\n", tag, *class_name); + ApiEvent("api,%s,\"%s\"\n", tag, *class_name); #endif } @@ -649,7 +649,7 @@ void Logger::ApiObjectAccess(const char* tag, JSObject* object) { void Logger::ApiEntryCall(const char* name) { #ifdef ENABLE_LOGGING_AND_PROFILING if (!log_->IsEnabled() || !FLAG_log_api) return; - LOGGER->ApiEvent("api,%s\n", name); + ApiEvent("api,%s\n", name); #endif } diff --git a/src/objects.cc b/src/objects.cc index 7ee8863..a0d1536 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -7585,9 +7585,9 @@ MaybeObject* JSObject::GetElementWithInterceptor(Object* receiver, // callbacks or interceptor calls. AssertNoContextChange ncc; HandleScope scope(isolate); - Handle interceptor(GetIndexedInterceptor()); - Handle this_handle(receiver); - Handle holder_handle(this); + Handle interceptor(GetIndexedInterceptor(), isolate); + Handle this_handle(receiver, isolate); + Handle holder_handle(this, isolate); if (!interceptor->getter()->IsUndefined()) { v8::IndexedPropertyGetter getter = -- 2.7.4