Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: src/api.cc

Issue 11597007: Rename LookupSymbol calls to use Utf8 or OneByte in names. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 return scope.Close(Utils::StackTraceToLocal(stackTrace)); 1946 return scope.Close(Utils::StackTraceToLocal(stackTrace));
1947 } 1947 }
1948 1948
1949 1949
1950 static i::Handle<i::Object> CallV8HeapFunction(const char* name, 1950 static i::Handle<i::Object> CallV8HeapFunction(const char* name,
1951 i::Handle<i::Object> recv, 1951 i::Handle<i::Object> recv,
1952 int argc, 1952 int argc,
1953 i::Handle<i::Object> argv[], 1953 i::Handle<i::Object> argv[],
1954 bool* has_pending_exception) { 1954 bool* has_pending_exception) {
1955 i::Isolate* isolate = i::Isolate::Current(); 1955 i::Isolate* isolate = i::Isolate::Current();
1956 i::Handle<i::String> fmt_str = isolate->factory()->LookupAsciiSymbol(name); 1956 i::Handle<i::String> fmt_str = isolate->factory()->LookupUtf8Symbol(name);
1957 i::Object* object_fun = 1957 i::Object* object_fun =
1958 isolate->js_builtins_object()->GetPropertyNoExceptionThrown(*fmt_str); 1958 isolate->js_builtins_object()->GetPropertyNoExceptionThrown(*fmt_str);
1959 i::Handle<i::JSFunction> fun = 1959 i::Handle<i::JSFunction> fun =
1960 i::Handle<i::JSFunction>(i::JSFunction::cast(object_fun)); 1960 i::Handle<i::JSFunction>(i::JSFunction::cast(object_fun));
1961 i::Handle<i::Object> value = 1961 i::Handle<i::Object> value =
1962 i::Execution::Call(fun, recv, argc, argv, has_pending_exception); 1962 i::Execution::Call(fun, recv, argc, argv, has_pending_exception);
1963 return value; 1963 return value;
1964 } 1964 }
1965 1965
1966 1966
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 i::Isolate* isolate = i::Isolate::Current(); 2362 i::Isolate* isolate = i::Isolate::Current();
2363 if (IsDeadCheck(isolate, "v8::Value::IsNumberObject()")) return false; 2363 if (IsDeadCheck(isolate, "v8::Value::IsNumberObject()")) return false;
2364 i::Handle<i::Object> obj = Utils::OpenHandle(this); 2364 i::Handle<i::Object> obj = Utils::OpenHandle(this);
2365 return obj->HasSpecificClassOf(isolate->heap()->Number_symbol()); 2365 return obj->HasSpecificClassOf(isolate->heap()->Number_symbol());
2366 } 2366 }
2367 2367
2368 2368
2369 static i::Object* LookupBuiltin(i::Isolate* isolate, 2369 static i::Object* LookupBuiltin(i::Isolate* isolate,
2370 const char* builtin_name) { 2370 const char* builtin_name) {
2371 i::Handle<i::String> symbol = 2371 i::Handle<i::String> symbol =
2372 isolate->factory()->LookupAsciiSymbol(builtin_name); 2372 isolate->factory()->LookupUtf8Symbol(builtin_name);
2373 i::Handle<i::JSBuiltinsObject> builtins = isolate->js_builtins_object(); 2373 i::Handle<i::JSBuiltinsObject> builtins = isolate->js_builtins_object();
2374 return builtins->GetPropertyNoExceptionThrown(*symbol); 2374 return builtins->GetPropertyNoExceptionThrown(*symbol);
2375 } 2375 }
2376 2376
2377 2377
2378 static bool CheckConstructor(i::Isolate* isolate, 2378 static bool CheckConstructor(i::Isolate* isolate,
2379 i::Handle<i::JSObject> obj, 2379 i::Handle<i::JSObject> obj,
2380 const char* class_name) { 2380 const char* class_name) {
2381 i::Object* constr = obj->map()->constructor(); 2381 i::Object* constr = obj->map()->constructor();
2382 if (!constr->IsJSFunction()) return false; 2382 if (!constr->IsJSFunction()) return false;
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after
5122 i::Isolate* isolate = i::Isolate::Current(); 5122 i::Isolate* isolate = i::Isolate::Current();
5123 ON_BAILOUT(isolate, "v8::Date::DateTimeConfigurationChangeNotification()", 5123 ON_BAILOUT(isolate, "v8::Date::DateTimeConfigurationChangeNotification()",
5124 return); 5124 return);
5125 LOG_API(isolate, "Date::DateTimeConfigurationChangeNotification"); 5125 LOG_API(isolate, "Date::DateTimeConfigurationChangeNotification");
5126 ENTER_V8(isolate); 5126 ENTER_V8(isolate);
5127 5127
5128 isolate->date_cache()->ResetDateCache(); 5128 isolate->date_cache()->ResetDateCache();
5129 5129
5130 i::HandleScope scope(isolate); 5130 i::HandleScope scope(isolate);
5131 // Get the function ResetDateCache (defined in date.js). 5131 // Get the function ResetDateCache (defined in date.js).
5132 i::Handle<i::String> func_name_str = 5132 i::Handle<i::String> func_name_str = isolate->factory()->LookupOneByteSymbol(
5133 isolate->factory()->LookupAsciiSymbol("ResetDateCache"); 5133 STATIC_ASCII_VECTOR("ResetDateCache"));
5134 i::MaybeObject* result = 5134 i::MaybeObject* result =
5135 isolate->js_builtins_object()->GetProperty(*func_name_str); 5135 isolate->js_builtins_object()->GetProperty(*func_name_str);
5136 i::Object* object_func; 5136 i::Object* object_func;
5137 if (!result->ToObject(&object_func)) { 5137 if (!result->ToObject(&object_func)) {
5138 return; 5138 return;
5139 } 5139 }
5140 5140
5141 if (object_func->IsJSFunction()) { 5141 if (object_func->IsJSFunction()) {
5142 i::Handle<i::JSFunction> func = 5142 i::Handle<i::JSFunction> func =
5143 i::Handle<i::JSFunction>(i::JSFunction::cast(object_func)); 5143 i::Handle<i::JSFunction>(i::JSFunction::cast(object_func));
5144 5144
5145 // Call ResetDateCache(0 but expect no exceptions: 5145 // Call ResetDateCache(0 but expect no exceptions:
5146 bool caught_exception = false; 5146 bool caught_exception = false;
5147 i::Execution::TryCall(func, 5147 i::Execution::TryCall(func,
5148 isolate->js_builtins_object(), 5148 isolate->js_builtins_object(),
5149 0, 5149 0,
5150 NULL, 5150 NULL,
5151 &caught_exception); 5151 &caught_exception);
5152 } 5152 }
5153 } 5153 }
5154 5154
5155 5155
5156 static i::Handle<i::String> RegExpFlagsToString(RegExp::Flags flags) { 5156 static i::Handle<i::String> RegExpFlagsToString(RegExp::Flags flags) {
5157 char flags_buf[3]; 5157 char flags_buf[3];
5158 int num_flags = 0; 5158 int num_flags = 0;
5159 if ((flags & RegExp::kGlobal) != 0) flags_buf[num_flags++] = 'g'; 5159 if ((flags & RegExp::kGlobal) != 0) flags_buf[num_flags++] = 'g';
5160 if ((flags & RegExp::kMultiline) != 0) flags_buf[num_flags++] = 'm'; 5160 if ((flags & RegExp::kMultiline) != 0) flags_buf[num_flags++] = 'm';
5161 if ((flags & RegExp::kIgnoreCase) != 0) flags_buf[num_flags++] = 'i'; 5161 if ((flags & RegExp::kIgnoreCase) != 0) flags_buf[num_flags++] = 'i';
5162 ASSERT(num_flags <= static_cast<int>(ARRAY_SIZE(flags_buf))); 5162 ASSERT(num_flags <= static_cast<int>(ARRAY_SIZE(flags_buf)));
5163 return FACTORY->LookupSymbol( 5163 return FACTORY->LookupOneByteSymbol(
5164 i::Vector<const char>(flags_buf, num_flags)); 5164 i::Vector<const char>(flags_buf, num_flags));
5165 } 5165 }
5166 5166
5167 5167
5168 Local<v8::RegExp> v8::RegExp::New(Handle<String> pattern, 5168 Local<v8::RegExp> v8::RegExp::New(Handle<String> pattern,
5169 Flags flags) { 5169 Flags flags) {
5170 i::Isolate* isolate = Utils::OpenHandle(*pattern)->GetIsolate(); 5170 i::Isolate* isolate = Utils::OpenHandle(*pattern)->GetIsolate();
5171 EnsureInitializedForIsolate(isolate, "v8::RegExp::New()"); 5171 EnsureInitializedForIsolate(isolate, "v8::RegExp::New()");
5172 LOG_API(isolate, "RegExp::New"); 5172 LOG_API(isolate, "RegExp::New");
5173 ENTER_V8(isolate); 5173 ENTER_V8(isolate);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
5258 return Utils::ToLocal(result); 5258 return Utils::ToLocal(result);
5259 } 5259 }
5260 5260
5261 5261
5262 Local<String> v8::String::NewSymbol(const char* data, int length) { 5262 Local<String> v8::String::NewSymbol(const char* data, int length) {
5263 i::Isolate* isolate = i::Isolate::Current(); 5263 i::Isolate* isolate = i::Isolate::Current();
5264 EnsureInitializedForIsolate(isolate, "v8::String::NewSymbol()"); 5264 EnsureInitializedForIsolate(isolate, "v8::String::NewSymbol()");
5265 LOG_API(isolate, "String::NewSymbol(char)"); 5265 LOG_API(isolate, "String::NewSymbol(char)");
5266 ENTER_V8(isolate); 5266 ENTER_V8(isolate);
5267 if (length == -1) length = i::StrLength(data); 5267 if (length == -1) length = i::StrLength(data);
5268 i::Handle<i::String> result = 5268 i::Handle<i::String> result = isolate->factory()->LookupUtf8Symbol(
5269 isolate->factory()->LookupSymbol(i::Vector<const char>(data, length)); 5269 i::Vector<const char>(data, length));
5270 return Utils::ToLocal(result); 5270 return Utils::ToLocal(result);
5271 } 5271 }
5272 5272
5273 5273
5274 Local<Number> v8::Number::New(double value) { 5274 Local<Number> v8::Number::New(double value) {
5275 i::Isolate* isolate = i::Isolate::Current(); 5275 i::Isolate* isolate = i::Isolate::Current();
5276 EnsureInitializedForIsolate(isolate, "v8::Number::New()"); 5276 EnsureInitializedForIsolate(isolate, "v8::Number::New()");
5277 if (isnan(value)) { 5277 if (isnan(value)) {
5278 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. 5278 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs.
5279 value = i::OS::nan_value(); 5279 value = i::OS::nan_value();
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
5953 5953
5954 Local<Value> Debug::GetMirror(v8::Handle<v8::Value> obj) { 5954 Local<Value> Debug::GetMirror(v8::Handle<v8::Value> obj) {
5955 i::Isolate* isolate = i::Isolate::Current(); 5955 i::Isolate* isolate = i::Isolate::Current();
5956 if (!isolate->IsInitialized()) return Local<Value>(); 5956 if (!isolate->IsInitialized()) return Local<Value>();
5957 ON_BAILOUT(isolate, "v8::Debug::GetMirror()", return Local<Value>()); 5957 ON_BAILOUT(isolate, "v8::Debug::GetMirror()", return Local<Value>());
5958 ENTER_V8(isolate); 5958 ENTER_V8(isolate);
5959 v8::HandleScope scope; 5959 v8::HandleScope scope;
5960 i::Debug* isolate_debug = isolate->debug(); 5960 i::Debug* isolate_debug = isolate->debug();
5961 isolate_debug->Load(); 5961 isolate_debug->Load();
5962 i::Handle<i::JSObject> debug(isolate_debug->debug_context()->global_object()); 5962 i::Handle<i::JSObject> debug(isolate_debug->debug_context()->global_object());
5963 i::Handle<i::String> name = 5963 i::Handle<i::String> name = isolate->factory()->LookupOneByteSymbol(
5964 isolate->factory()->LookupAsciiSymbol("MakeMirror"); 5964 STATIC_ASCII_VECTOR("MakeMirror"));
5965 i::Handle<i::Object> fun_obj = i::GetProperty(debug, name); 5965 i::Handle<i::Object> fun_obj = i::GetProperty(debug, name);
5966 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(fun_obj); 5966 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(fun_obj);
5967 v8::Handle<v8::Function> v8_fun = Utils::ToLocal(fun); 5967 v8::Handle<v8::Function> v8_fun = Utils::ToLocal(fun);
5968 const int kArgc = 1; 5968 const int kArgc = 1;
5969 v8::Handle<v8::Value> argv[kArgc] = { obj }; 5969 v8::Handle<v8::Value> argv[kArgc] = { obj };
5970 EXCEPTION_PREAMBLE(isolate); 5970 EXCEPTION_PREAMBLE(isolate);
5971 v8::Handle<v8::Value> result = v8_fun->Call(Utils::ToLocal(debug), 5971 v8::Handle<v8::Value> result = v8_fun->Call(Utils::ToLocal(debug),
5972 kArgc, 5972 kArgc,
5973 argv); 5973 argv);
5974 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>()); 5974 EXCEPTION_BAILOUT_CHECK(isolate, Local<Value>());
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
6016 #endif // ENABLE_DEBUGGER_SUPPORT 6016 #endif // ENABLE_DEBUGGER_SUPPORT
6017 6017
6018 6018
6019 Handle<String> CpuProfileNode::GetFunctionName() const { 6019 Handle<String> CpuProfileNode::GetFunctionName() const {
6020 i::Isolate* isolate = i::Isolate::Current(); 6020 i::Isolate* isolate = i::Isolate::Current();
6021 IsDeadCheck(isolate, "v8::CpuProfileNode::GetFunctionName"); 6021 IsDeadCheck(isolate, "v8::CpuProfileNode::GetFunctionName");
6022 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 6022 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
6023 const i::CodeEntry* entry = node->entry(); 6023 const i::CodeEntry* entry = node->entry();
6024 if (!entry->has_name_prefix()) { 6024 if (!entry->has_name_prefix()) {
6025 return Handle<String>(ToApi<String>( 6025 return Handle<String>(ToApi<String>(
6026 isolate->factory()->LookupAsciiSymbol(entry->name()))); 6026 isolate->factory()->LookupUtf8Symbol(entry->name())));
6027 } else { 6027 } else {
6028 return Handle<String>(ToApi<String>(isolate->factory()->NewConsString( 6028 return Handle<String>(ToApi<String>(isolate->factory()->NewConsString(
6029 isolate->factory()->LookupAsciiSymbol(entry->name_prefix()), 6029 isolate->factory()->LookupUtf8Symbol(entry->name_prefix()),
6030 isolate->factory()->LookupAsciiSymbol(entry->name())))); 6030 isolate->factory()->LookupUtf8Symbol(entry->name()))));
6031 } 6031 }
6032 } 6032 }
6033 6033
6034 6034
6035 Handle<String> CpuProfileNode::GetScriptResourceName() const { 6035 Handle<String> CpuProfileNode::GetScriptResourceName() const {
6036 i::Isolate* isolate = i::Isolate::Current(); 6036 i::Isolate* isolate = i::Isolate::Current();
6037 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName"); 6037 IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptResourceName");
6038 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this); 6038 const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
6039 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol( 6039 return Handle<String>(ToApi<String>(isolate->factory()->LookupUtf8Symbol(
6040 node->entry()->resource_name()))); 6040 node->entry()->resource_name())));
6041 } 6041 }
6042 6042
6043 6043
6044 int CpuProfileNode::GetLineNumber() const { 6044 int CpuProfileNode::GetLineNumber() const {
6045 i::Isolate* isolate = i::Isolate::Current(); 6045 i::Isolate* isolate = i::Isolate::Current();
6046 IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber"); 6046 IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber");
6047 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number(); 6047 return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
6048 } 6048 }
6049 6049
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
6115 i::Isolate* isolate = i::Isolate::Current(); 6115 i::Isolate* isolate = i::Isolate::Current();
6116 IsDeadCheck(isolate, "v8::CpuProfile::GetUid"); 6116 IsDeadCheck(isolate, "v8::CpuProfile::GetUid");
6117 return reinterpret_cast<const i::CpuProfile*>(this)->uid(); 6117 return reinterpret_cast<const i::CpuProfile*>(this)->uid();
6118 } 6118 }
6119 6119
6120 6120
6121 Handle<String> CpuProfile::GetTitle() const { 6121 Handle<String> CpuProfile::GetTitle() const {
6122 i::Isolate* isolate = i::Isolate::Current(); 6122 i::Isolate* isolate = i::Isolate::Current();
6123 IsDeadCheck(isolate, "v8::CpuProfile::GetTitle"); 6123 IsDeadCheck(isolate, "v8::CpuProfile::GetTitle");
6124 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); 6124 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
6125 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol( 6125 return Handle<String>(ToApi<String>(isolate->factory()->LookupUtf8Symbol(
6126 profile->title()))); 6126 profile->title())));
6127 } 6127 }
6128 6128
6129 6129
6130 const CpuProfileNode* CpuProfile::GetBottomUpRoot() const { 6130 const CpuProfileNode* CpuProfile::GetBottomUpRoot() const {
6131 i::Isolate* isolate = i::Isolate::Current(); 6131 i::Isolate* isolate = i::Isolate::Current();
6132 IsDeadCheck(isolate, "v8::CpuProfile::GetBottomUpRoot"); 6132 IsDeadCheck(isolate, "v8::CpuProfile::GetBottomUpRoot");
6133 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); 6133 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
6134 return reinterpret_cast<const CpuProfileNode*>(profile->bottom_up()->root()); 6134 return reinterpret_cast<const CpuProfileNode*>(profile->bottom_up()->root());
6135 } 6135 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
6212 6212
6213 Handle<Value> HeapGraphEdge::GetName() const { 6213 Handle<Value> HeapGraphEdge::GetName() const {
6214 i::Isolate* isolate = i::Isolate::Current(); 6214 i::Isolate* isolate = i::Isolate::Current();
6215 IsDeadCheck(isolate, "v8::HeapGraphEdge::GetName"); 6215 IsDeadCheck(isolate, "v8::HeapGraphEdge::GetName");
6216 i::HeapGraphEdge* edge = ToInternal(this); 6216 i::HeapGraphEdge* edge = ToInternal(this);
6217 switch (edge->type()) { 6217 switch (edge->type()) {
6218 case i::HeapGraphEdge::kContextVariable: 6218 case i::HeapGraphEdge::kContextVariable:
6219 case i::HeapGraphEdge::kInternal: 6219 case i::HeapGraphEdge::kInternal:
6220 case i::HeapGraphEdge::kProperty: 6220 case i::HeapGraphEdge::kProperty:
6221 case i::HeapGraphEdge::kShortcut: 6221 case i::HeapGraphEdge::kShortcut:
6222 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol( 6222 return Handle<String>(ToApi<String>(isolate->factory()->LookupUtf8Symbol(
6223 edge->name()))); 6223 edge->name())));
6224 case i::HeapGraphEdge::kElement: 6224 case i::HeapGraphEdge::kElement:
6225 case i::HeapGraphEdge::kHidden: 6225 case i::HeapGraphEdge::kHidden:
6226 return Handle<Number>(ToApi<Number>(isolate->factory()->NewNumberFromInt( 6226 return Handle<Number>(ToApi<Number>(isolate->factory()->NewNumberFromInt(
6227 edge->index()))); 6227 edge->index())));
6228 default: UNREACHABLE(); 6228 default: UNREACHABLE();
6229 } 6229 }
6230 return v8::Undefined(); 6230 return v8::Undefined();
6231 } 6231 }
6232 6232
(...skipping 23 matching lines...) Expand all
6256 HeapGraphNode::Type HeapGraphNode::GetType() const { 6256 HeapGraphNode::Type HeapGraphNode::GetType() const {
6257 i::Isolate* isolate = i::Isolate::Current(); 6257 i::Isolate* isolate = i::Isolate::Current();
6258 IsDeadCheck(isolate, "v8::HeapGraphNode::GetType"); 6258 IsDeadCheck(isolate, "v8::HeapGraphNode::GetType");
6259 return static_cast<HeapGraphNode::Type>(ToInternal(this)->type()); 6259 return static_cast<HeapGraphNode::Type>(ToInternal(this)->type());
6260 } 6260 }
6261 6261
6262 6262
6263 Handle<String> HeapGraphNode::GetName() const { 6263 Handle<String> HeapGraphNode::GetName() const {
6264 i::Isolate* isolate = i::Isolate::Current(); 6264 i::Isolate* isolate = i::Isolate::Current();
6265 IsDeadCheck(isolate, "v8::HeapGraphNode::GetName"); 6265 IsDeadCheck(isolate, "v8::HeapGraphNode::GetName");
6266 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol( 6266 return Handle<String>(ToApi<String>(isolate->factory()->LookupUtf8Symbol(
6267 ToInternal(this)->name()))); 6267 ToInternal(this)->name())));
6268 } 6268 }
6269 6269
6270 6270
6271 SnapshotObjectId HeapGraphNode::GetId() const { 6271 SnapshotObjectId HeapGraphNode::GetId() const {
6272 i::Isolate* isolate = i::Isolate::Current(); 6272 i::Isolate* isolate = i::Isolate::Current();
6273 IsDeadCheck(isolate, "v8::HeapGraphNode::GetId"); 6273 IsDeadCheck(isolate, "v8::HeapGraphNode::GetId");
6274 return ToInternal(this)->id(); 6274 return ToInternal(this)->id();
6275 } 6275 }
6276 6276
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
6335 unsigned HeapSnapshot::GetUid() const { 6335 unsigned HeapSnapshot::GetUid() const {
6336 i::Isolate* isolate = i::Isolate::Current(); 6336 i::Isolate* isolate = i::Isolate::Current();
6337 IsDeadCheck(isolate, "v8::HeapSnapshot::GetUid"); 6337 IsDeadCheck(isolate, "v8::HeapSnapshot::GetUid");
6338 return ToInternal(this)->uid(); 6338 return ToInternal(this)->uid();
6339 } 6339 }
6340 6340
6341 6341
6342 Handle<String> HeapSnapshot::GetTitle() const { 6342 Handle<String> HeapSnapshot::GetTitle() const {
6343 i::Isolate* isolate = i::Isolate::Current(); 6343 i::Isolate* isolate = i::Isolate::Current();
6344 IsDeadCheck(isolate, "v8::HeapSnapshot::GetTitle"); 6344 IsDeadCheck(isolate, "v8::HeapSnapshot::GetTitle");
6345 return Handle<String>(ToApi<String>(isolate->factory()->LookupAsciiSymbol( 6345 return Handle<String>(ToApi<String>(isolate->factory()->LookupUtf8Symbol(
6346 ToInternal(this)->title()))); 6346 ToInternal(this)->title())));
6347 } 6347 }
6348 6348
6349 6349
6350 const HeapGraphNode* HeapSnapshot::GetRoot() const { 6350 const HeapGraphNode* HeapSnapshot::GetRoot() const {
6351 i::Isolate* isolate = i::Isolate::Current(); 6351 i::Isolate* isolate = i::Isolate::Current();
6352 IsDeadCheck(isolate, "v8::HeapSnapshot::GetHead"); 6352 IsDeadCheck(isolate, "v8::HeapSnapshot::GetHead");
6353 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->root()); 6353 return reinterpret_cast<const HeapGraphNode*>(ToInternal(this)->root());
6354 } 6354 }
6355 6355
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
6704 6704
6705 v->VisitPointers(blocks_.first(), first_block_limit_); 6705 v->VisitPointers(blocks_.first(), first_block_limit_);
6706 6706
6707 for (int i = 1; i < blocks_.length(); i++) { 6707 for (int i = 1; i < blocks_.length(); i++) {
6708 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 6708 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
6709 } 6709 }
6710 } 6710 }
6711 6711
6712 6712
6713 } } // namespace v8::internal 6713 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698