| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 11eaf924a27c88decff9fb87f820ef846473572b..8a73877eedec4b395078d7c7f2f84b103c5df763 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -574,7 +574,8 @@ bool SetResourceConstraints(ResourceConstraints* constraints) {
|
| int max_executable_size = constraints->max_executable_size();
|
| if (young_space_size != 0 || old_gen_size != 0 || max_executable_size != 0) {
|
| // After initialization it's too late to change Heap constraints.
|
| - ASSERT(!isolate->IsInitialized());
|
| + // TODO(rmcilroy): fix this assert.
|
| + // ASSERT(!isolate->IsInitialized());
|
| bool result = isolate->heap()->ConfigureHeap(young_space_size / 2,
|
| old_gen_size,
|
| max_executable_size);
|
| @@ -3526,9 +3527,8 @@ bool v8::Object::HasRealNamedProperty(Handle<String> key) {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| ON_BAILOUT(isolate, "v8::Object::HasRealNamedProperty()",
|
| return false);
|
| - return Utils::OpenHandle(this)->HasRealNamedProperty(
|
| - isolate,
|
| - *Utils::OpenHandle(*key));
|
| + return i::JSObject::HasRealNamedProperty(Utils::OpenHandle(this),
|
| + Utils::OpenHandle(*key));
|
| }
|
|
|
|
|
| @@ -3536,7 +3536,7 @@ bool v8::Object::HasRealIndexedProperty(uint32_t index) {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| ON_BAILOUT(isolate, "v8::Object::HasRealIndexedProperty()",
|
| return false);
|
| - return Utils::OpenHandle(this)->HasRealElementProperty(isolate, index);
|
| + return i::JSObject::HasRealElementProperty(Utils::OpenHandle(this), index);
|
| }
|
|
|
|
|
| @@ -3546,9 +3546,8 @@ bool v8::Object::HasRealNamedCallbackProperty(Handle<String> key) {
|
| "v8::Object::HasRealNamedCallbackProperty()",
|
| return false);
|
| ENTER_V8(isolate);
|
| - return Utils::OpenHandle(this)->HasRealNamedCallbackProperty(
|
| - isolate,
|
| - *Utils::OpenHandle(*key));
|
| + return i::JSObject::HasRealNamedCallbackProperty(Utils::OpenHandle(this),
|
| + Utils::OpenHandle(*key));
|
| }
|
|
|
|
|
| @@ -4112,6 +4111,29 @@ Handle<Value> Function::GetInferredName() const {
|
| }
|
|
|
|
|
| +Handle<Value> Function::GetDisplayName() const {
|
| + i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::Function::GetDisplayName()",
|
| + return ToApiHandle<Primitive>(
|
| + isolate->factory()->undefined_value()));
|
| + ENTER_V8(isolate);
|
| + i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
|
| + i::Handle<i::String> property_name =
|
| + isolate->factory()->InternalizeOneByteString(
|
| + STATIC_ASCII_VECTOR("displayName"));
|
| + i::LookupResult lookup(isolate);
|
| + func->LookupRealNamedProperty(*property_name, &lookup);
|
| + if (lookup.IsFound()) {
|
| + i::Object* value = lookup.GetLazyValue();
|
| + if (value && value->IsString()) {
|
| + i::String* name = i::String::cast(value);
|
| + if (name->length() > 0) return Utils::ToLocal(i::Handle<i::String>(name));
|
| + }
|
| + }
|
| + return ToApiHandle<Primitive>(isolate->factory()->undefined_value());
|
| +}
|
| +
|
| +
|
| ScriptOrigin Function::GetScriptOrigin() const {
|
| i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
|
| if (func->shared()->script()->IsScript()) {
|
| @@ -4150,6 +4172,12 @@ int Function::GetScriptColumnNumber() const {
|
| }
|
|
|
|
|
| +bool Function::IsBuiltin() const {
|
| + i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
|
| + return func->IsBuiltin();
|
| +}
|
| +
|
| +
|
| Handle<Value> Function::GetScriptId() const {
|
| i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
|
| i::Isolate* isolate = func->GetIsolate();
|
| @@ -6350,31 +6378,30 @@ v8::Local<Value> Isolate::ThrowException(v8::Local<v8::Value> value) {
|
| }
|
|
|
|
|
| -void Isolate::SetObjectGroupId(const Persistent<Value>& object,
|
| - UniqueId id) {
|
| +void Isolate::SetObjectGroupId(internal::Object** object, UniqueId id) {
|
| i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
|
| internal_isolate->global_handles()->SetObjectGroupId(
|
| - Utils::OpenPersistent(object).location(),
|
| + v8::internal::Handle<v8::internal::Object>(object).location(),
|
| id);
|
| }
|
|
|
|
|
| -void Isolate::SetReferenceFromGroup(UniqueId id,
|
| - const Persistent<Value>& object) {
|
| +void Isolate::SetReferenceFromGroup(UniqueId id, internal::Object** object) {
|
| i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
|
| internal_isolate->global_handles()->SetReferenceFromGroup(
|
| id,
|
| - Utils::OpenPersistent(object).location());
|
| + v8::internal::Handle<v8::internal::Object>(object).location());
|
| }
|
|
|
|
|
| -void Isolate::SetReference(const Persistent<Object>& parent,
|
| - const Persistent<Value>& child) {
|
| +void Isolate::SetReference(internal::Object** parent,
|
| + internal::Object** child) {
|
| i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
|
| - i::Object** parent_location = Utils::OpenPersistent(parent).location();
|
| + i::Object** parent_location =
|
| + v8::internal::Handle<v8::internal::Object>(parent).location();
|
| internal_isolate->global_handles()->SetReference(
|
| reinterpret_cast<i::HeapObject**>(parent_location),
|
| - Utils::OpenPersistent(child).location());
|
| + v8::internal::Handle<v8::internal::Object>(child).location());
|
| }
|
|
|
|
|
| @@ -6928,6 +6955,12 @@ int CpuProfileNode::GetLineNumber() const {
|
| }
|
|
|
|
|
| +int CpuProfileNode::GetColumnNumber() const {
|
| + return reinterpret_cast<const i::ProfileNode*>(this)->
|
| + entry()->column_number();
|
| +}
|
| +
|
| +
|
| const char* CpuProfileNode::GetBailoutReason() const {
|
| const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
|
| return node->entry()->bailout_reason();
|
| @@ -7294,6 +7327,16 @@ void HeapProfiler::SetRetainedObjectInfo(UniqueId id,
|
| }
|
|
|
|
|
| +void HeapProfiler::StartRecordingHeapAllocations() {
|
| + reinterpret_cast<i::HeapProfiler*>(this)->StartHeapAllocationsRecording();
|
| +}
|
| +
|
| +
|
| +void HeapProfiler::StopRecordingHeapAllocations() {
|
| + reinterpret_cast<i::HeapProfiler*>(this)->StopHeapAllocationsRecording();
|
| +}
|
| +
|
| +
|
| v8::Testing::StressType internal::Testing::stress_type_ =
|
| v8::Testing::kStressTypeOpt;
|
|
|
|
|