Commit c6f0de8d authored by ishell's avatar ishell Committed by Commit bot

[debugger] Use PropertyKind instead of PropertyType.

BUG=v8:5495

Review-Url: https://codereview.chromium.org/2628323003
Cr-Commit-Position: refs/heads/master@{#42360}
parent fec61415
...@@ -223,11 +223,10 @@ function inherits(ctor, superCtor) { ...@@ -223,11 +223,10 @@ function inherits(ctor, superCtor) {
var kMaxProtocolStringLength = 80; var kMaxProtocolStringLength = 80;
// A copy of the PropertyType enum from property-details.h // A copy of the PropertyKind enum from property-details.h
var PropertyType = {}; var PropertyType = {};
PropertyType.Data = 0; PropertyType.Data = 0;
PropertyType.DataConstant = 2; PropertyType.Accessor = 1;
PropertyType.AccessorConstant = 3;
// Different attributes for a property. // Different attributes for a property.
...@@ -799,7 +798,7 @@ ObjectMirror.prototype.lookupProperty = function(value) { ...@@ -799,7 +798,7 @@ ObjectMirror.prototype.lookupProperty = function(value) {
// Skip properties which are defined through accessors. // Skip properties which are defined through accessors.
var property = properties[i]; var property = properties[i];
if (property.propertyType() != PropertyType.AccessorConstant) { if (property.propertyType() == PropertyType.Data) {
if (property.value_ === value.value_) { if (property.value_ === value.value_) {
return property; return property;
} }
...@@ -1545,7 +1544,7 @@ PropertyMirror.prototype.attributes = function() { ...@@ -1545,7 +1544,7 @@ PropertyMirror.prototype.attributes = function() {
PropertyMirror.prototype.propertyType = function() { PropertyMirror.prototype.propertyType = function() {
return %DebugPropertyTypeFromDetails(this.details_); return %DebugPropertyKindFromDetails(this.details_);
}; };
...@@ -1603,7 +1602,7 @@ PropertyMirror.prototype.setter = function() { ...@@ -1603,7 +1602,7 @@ PropertyMirror.prototype.setter = function() {
*/ */
PropertyMirror.prototype.isNative = function() { PropertyMirror.prototype.isNative = function() {
return this.is_interceptor_ || return this.is_interceptor_ ||
((this.propertyType() == PropertyType.AccessorConstant) && ((this.propertyType() == PropertyType.Accessor) &&
!this.hasGetter() && !this.hasSetter()); !this.hasGetter() && !this.hasSetter());
}; };
......
...@@ -391,14 +391,13 @@ RUNTIME_FUNCTION(Runtime_DebugGetProperty) { ...@@ -391,14 +391,13 @@ RUNTIME_FUNCTION(Runtime_DebugGetProperty) {
return *DebugGetProperty(&it); return *DebugGetProperty(&it);
} }
// Return the property kind calculated from the property details.
// Return the property type calculated from the property details.
// args[0]: smi with property details. // args[0]: smi with property details.
RUNTIME_FUNCTION(Runtime_DebugPropertyTypeFromDetails) { RUNTIME_FUNCTION(Runtime_DebugPropertyKindFromDetails) {
SealHandleScope shs(isolate); SealHandleScope shs(isolate);
DCHECK_EQ(1, args.length()); DCHECK_EQ(1, args.length());
CONVERT_PROPERTY_DETAILS_CHECKED(details, 0); CONVERT_PROPERTY_DETAILS_CHECKED(details, 0);
return Smi::FromInt(static_cast<int>(details.type())); return Smi::FromInt(static_cast<int>(details.kind()));
} }
......
...@@ -148,7 +148,7 @@ namespace internal { ...@@ -148,7 +148,7 @@ namespace internal {
F(DebugGetInternalProperties, 1, 1) \ F(DebugGetInternalProperties, 1, 1) \
F(DebugGetPropertyDetails, 2, 1) \ F(DebugGetPropertyDetails, 2, 1) \
F(DebugGetProperty, 2, 1) \ F(DebugGetProperty, 2, 1) \
F(DebugPropertyTypeFromDetails, 1, 1) \ F(DebugPropertyKindFromDetails, 1, 1) \
F(DebugPropertyAttributesFromDetails, 1, 1) \ F(DebugPropertyAttributesFromDetails, 1, 1) \
F(CheckExecutionState, 1, 1) \ F(CheckExecutionState, 1, 1) \
F(GetFrameCount, 1, 1) \ F(GetFrameCount, 1, 1) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment