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

Unified Diff: src/objects-inl.h

Issue 235083004: Introduce Object::DebugGetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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.cc ('k') | src/runtime.cc » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 96c397f51bd22331614248c1baf9203316c6fbd7..5fb6e9045470b18360c543fde8f158e8efd91ed7 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1081,6 +1081,48 @@ bool Object::HasSpecificClassOf(String* name) {
}
+MaybeHandle<Object> JSObject::GetPropertyAfterAccessCheck(
+ Isolate* isolate,
+ Handle<Object> receiver,
+ Handle<Name> name,
+ LookupResult* result,
+ PropertyAttributes* attributes) {
+ Handle<Object> value;
+ switch (result->type()) {
+ case NORMAL: {
+ value = JSObject::GetNormalizedProperty(
+ handle(result->holder(), isolate), result);
+ break;
+ }
+ case FIELD:
+ value = JSObject::FastPropertyAt(handle(result->holder(), isolate),
+ result->representation(),
+ result->GetFieldIndex().field_index());
+ break;
+ case CONSTANT:
+ return handle(result->GetConstant(), isolate);
+ case CALLBACKS:
+ return JSObject::GetPropertyWithCallback(
+ handle(result->holder(), isolate),
+ receiver,
+ handle(result->GetCallbackObject(), isolate),
+ name);
+ case HANDLER:
+ return JSProxy::GetPropertyWithHandler(
+ handle(result->proxy(), isolate), receiver, name);
+ case INTERCEPTOR:
+ return JSObject::GetPropertyWithInterceptor(
+ handle(result->holder(), isolate), receiver, name, attributes);
+ case NONEXISTENT:
+ UNREACHABLE();
+ break;
+ }
+ ASSERT(!value->IsTheHole() || result->IsReadOnly());
+ return value->IsTheHole()
+ ? Handle<Object>::cast(isolate->factory()->undefined_value()) : value;
+}
+
+
MaybeHandle<Object> Object::GetProperty(Handle<Object> object,
Handle<Name> name) {
PropertyAttributes attributes;
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698