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

Side by Side Diff: src/api.cc

Issue 6626043: Add an interface for an embedder to provide information about native (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix GetCopy Created 9 years, 9 months 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3551 void Context::ReattachGlobal(Handle<Object> global_object) { 3551 void Context::ReattachGlobal(Handle<Object> global_object) {
3552 if (IsDeadCheck("v8::Context::ReattachGlobal()")) return; 3552 if (IsDeadCheck("v8::Context::ReattachGlobal()")) return;
3553 ENTER_V8; 3553 ENTER_V8;
3554 i::Object** ctx = reinterpret_cast<i::Object**>(this); 3554 i::Object** ctx = reinterpret_cast<i::Object**>(this);
3555 i::Handle<i::Context> context = 3555 i::Handle<i::Context> context =
3556 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); 3556 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
3557 i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object)); 3557 i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object));
3558 } 3558 }
3559 3559
3560 3560
3561 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) {
3562 i::GlobalHandles::SetWrapperClassId(global_handle, class_id);
3563 }
3564
3565
3561 Local<v8::Object> ObjectTemplate::NewInstance() { 3566 Local<v8::Object> ObjectTemplate::NewInstance() {
3562 ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>()); 3567 ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>());
3563 LOG_API("ObjectTemplate::NewInstance"); 3568 LOG_API("ObjectTemplate::NewInstance");
3564 ENTER_V8; 3569 ENTER_V8;
3565 EXCEPTION_PREAMBLE(); 3570 EXCEPTION_PREAMBLE();
3566 i::Handle<i::Object> obj = 3571 i::Handle<i::Object> obj =
3567 i::Execution::InstantiateObject(Utils::OpenHandle(this), 3572 i::Execution::InstantiateObject(Utils::OpenHandle(this),
3568 &has_pending_exception); 3573 &has_pending_exception);
3569 EXCEPTION_BAILOUT_CHECK(Local<v8::Object>()); 3574 EXCEPTION_BAILOUT_CHECK(Local<v8::Object>());
3570 return Utils::ToLocal(i::Handle<i::JSObject>::cast(obj)); 3575 return Utils::ToLocal(i::Handle<i::JSObject>::cast(obj));
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
4087 } 4092 }
4088 4093
4089 4094
4090 void V8::SetFailedAccessCheckCallbackFunction( 4095 void V8::SetFailedAccessCheckCallbackFunction(
4091 FailedAccessCheckCallback callback) { 4096 FailedAccessCheckCallback callback) {
4092 if (IsDeadCheck("v8::V8::SetFailedAccessCheckCallbackFunction()")) return; 4097 if (IsDeadCheck("v8::V8::SetFailedAccessCheckCallbackFunction()")) return;
4093 i::Top::SetFailedAccessCheckCallback(callback); 4098 i::Top::SetFailedAccessCheckCallback(callback);
4094 } 4099 }
4095 4100
4096 4101
4097 void V8::AddObjectGroup(Persistent<Value>* objects, size_t length) { 4102 void V8::AddObjectGroup(Persistent<Value>* objects,
4103 size_t length,
4104 RetainedObjectInfo* info) {
4098 if (IsDeadCheck("v8::V8::AddObjectGroup()")) return; 4105 if (IsDeadCheck("v8::V8::AddObjectGroup()")) return;
4099 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**)); 4106 STATIC_ASSERT(sizeof(Persistent<Value>) == sizeof(i::Object**));
4100 i::GlobalHandles::AddGroup(reinterpret_cast<i::Object***>(objects), length); 4107 i::GlobalHandles::AddGroup(
4108 reinterpret_cast<i::Object***>(objects), length, info);
4101 } 4109 }
4102 4110
4103 4111
4104 int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) { 4112 int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
4105 if (IsDeadCheck("v8::V8::AdjustAmountOfExternalAllocatedMemory()")) return 0; 4113 if (IsDeadCheck("v8::V8::AdjustAmountOfExternalAllocatedMemory()")) return 0;
4106 return i::Heap::AdjustAmountOfExternalAllocatedMemory(change_in_bytes); 4114 return i::Heap::AdjustAmountOfExternalAllocatedMemory(change_in_bytes);
4107 } 4115 }
4108 4116
4109 4117
4110 void V8::SetGlobalGCPrologueCallback(GCCallback callback) { 4118 void V8::SetGlobalGCPrologueCallback(GCCallback callback) {
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
5036 internal_type = i::HeapSnapshot::kAggregated; 5044 internal_type = i::HeapSnapshot::kAggregated;
5037 break; 5045 break;
5038 default: 5046 default:
5039 UNREACHABLE(); 5047 UNREACHABLE();
5040 } 5048 }
5041 return reinterpret_cast<const HeapSnapshot*>( 5049 return reinterpret_cast<const HeapSnapshot*>(
5042 i::HeapProfiler::TakeSnapshot( 5050 i::HeapProfiler::TakeSnapshot(
5043 *Utils::OpenHandle(*title), internal_type, control)); 5051 *Utils::OpenHandle(*title), internal_type, control));
5044 } 5052 }
5045 5053
5054
5055 void HeapProfiler::DefineWrapperClass(uint16_t class_id,
5056 WrapperInfoCallback callback) {
5057 i::HeapProfiler::DefineWrapperClass(class_id, callback);
5058 }
5059
5046 #endif // ENABLE_LOGGING_AND_PROFILING 5060 #endif // ENABLE_LOGGING_AND_PROFILING
5047 5061
5048 5062
5049 v8::Testing::StressType internal::Testing::stress_type_ = 5063 v8::Testing::StressType internal::Testing::stress_type_ =
5050 v8::Testing::kStressTypeOpt; 5064 v8::Testing::kStressTypeOpt;
5051 5065
5052 5066
5053 void Testing::SetStressRunType(Testing::StressType type) { 5067 void Testing::SetStressRunType(Testing::StressType type) {
5054 internal::Testing::set_stress_type(type); 5068 internal::Testing::set_stress_type(type);
5055 } 5069 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
5183 5197
5184 5198
5185 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5199 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5186 HandleScopeImplementer* thread_local = 5200 HandleScopeImplementer* thread_local =
5187 reinterpret_cast<HandleScopeImplementer*>(storage); 5201 reinterpret_cast<HandleScopeImplementer*>(storage);
5188 thread_local->IterateThis(v); 5202 thread_local->IterateThis(v);
5189 return storage + ArchiveSpacePerThread(); 5203 return storage + ArchiveSpacePerThread();
5190 } 5204 }
5191 5205
5192 } } // namespace v8::internal 5206 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/global-handles.h » ('j') | src/heap-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698