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

Unified Diff: src/objects.cc

Issue 12213012: Split AccessorInfo into DeclaredAccessorInfo and ExecutableAccessorInfo (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed most feedback Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 46539311de9625d9c7ffccc54bd476ab5510a47b..12b040efe1f74af0a57a26df0c6967cd87a96f70 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -180,8 +180,8 @@ MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver,
}
// api style callbacks.
- if (structure->IsAccessorInfo()) {
- AccessorInfo* data = AccessorInfo::cast(structure);
+ if (structure->IsExecutableAccessorInfo()) {
+ ExecutableAccessorInfo* data = ExecutableAccessorInfo::cast(structure);
if (!data->IsCompatibleReceiver(receiver)) {
Handle<Object> name_handle(name);
Handle<Object> receiver_handle(receiver);
@@ -227,6 +227,11 @@ MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver,
return isolate->heap()->undefined_value();
}
+ // TODO(dcarney): Handle correctly.
+ if (structure->IsDeclaredAccessorInfo()) {
+ return isolate->heap()->undefined_value();
+ }
+
UNREACHABLE();
return NULL;
}
@@ -2003,9 +2008,9 @@ MaybeObject* JSObject::SetPropertyWithCallback(Object* structure,
return *value_handle;
}
- if (structure->IsAccessorInfo()) {
+ if (structure->IsExecutableAccessorInfo()) {
// api style callbacks
- AccessorInfo* data = AccessorInfo::cast(structure);
+ ExecutableAccessorInfo* data = ExecutableAccessorInfo::cast(structure);
if (!data->IsCompatibleReceiver(this)) {
Handle<Object> name_handle(name);
Handle<Object> receiver_handle(this);
@@ -2052,6 +2057,11 @@ MaybeObject* JSObject::SetPropertyWithCallback(Object* structure,
}
}
+ // TODO(dcarney): Handle correctly.
+ if (structure->IsDeclaredAccessorInfo()) {
+ return value;
+ }
+
UNREACHABLE();
return NULL;
}
@@ -9733,8 +9743,9 @@ MaybeObject* JSObject::GetElementWithCallback(Object* receiver,
ASSERT(!structure->IsForeign());
// api style callbacks.
- if (structure->IsAccessorInfo()) {
- Handle<AccessorInfo> data(AccessorInfo::cast(structure));
+ if (structure->IsExecutableAccessorInfo()) {
+ Handle<ExecutableAccessorInfo> data(
+ ExecutableAccessorInfo::cast(structure));
Object* fun_obj = data->getter();
v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj);
if (call_fun == NULL) return isolate->heap()->undefined_value();
@@ -9770,6 +9781,11 @@ MaybeObject* JSObject::GetElementWithCallback(Object* receiver,
return isolate->heap()->undefined_value();
}
+ if (structure->IsDeclaredAccessorInfo()) {
+ // TODO(dcarney): Handle correctly.
+ return isolate->heap()->undefined_value();
+ }
+
UNREACHABLE();
return NULL;
}
@@ -9793,11 +9809,12 @@ MaybeObject* JSObject::SetElementWithCallback(Object* structure,
// callbacks should be phased out.
ASSERT(!structure->IsForeign());
- if (structure->IsAccessorInfo()) {
+ if (structure->IsExecutableAccessorInfo()) {
// api style callbacks
Handle<JSObject> self(this);
Handle<JSObject> holder_handle(JSObject::cast(holder));
- Handle<AccessorInfo> data(AccessorInfo::cast(structure));
+ Handle<ExecutableAccessorInfo> data(
+ ExecutableAccessorInfo::cast(structure));
Object* call_obj = data->setter();
v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj);
if (call_fun == NULL) return value;
@@ -9835,6 +9852,9 @@ MaybeObject* JSObject::SetElementWithCallback(Object* structure,
}
}
+ // TODO(dcarney): Handle correctly.
+ if (structure->IsDeclaredAccessorInfo()) return value;
+
UNREACHABLE();
return NULL;
}
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698