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

Unified Diff: src/handles.cc

Issue 7331035: Implement API functions for handling the AccessorDescriptor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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/handles.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index d8cc742576e2a7550a27c5d4bace45e14bc60528..e232f91034f1501fc2c0933401e97879177f9438 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -536,6 +536,26 @@ Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) {
}
+Handle<Object> SetAccessor(Handle<JSObject> obj,
+ Handle<String> key,
+ bool is_getter,
+ Handle<Object> fun,
+ PropertyAttributes attributes) {
+ CALL_HEAP_FUNCTION(obj->GetIsolate(),
+ obj->DefineAccessor(*key, is_getter, *fun, attributes),
+ Object);
+}
+
+
+Handle<Object> GetAccessor(Handle<JSObject> obj,
+ Handle<String> key,
+ bool is_getter) {
+ CALL_HEAP_FUNCTION(obj->GetIsolate(),
+ obj->LookupAccessor(*key, is_getter),
+ Object);
+}
+
+
// Wrappers for scripts are kept alive and cached in weak global
// handles referred from foreign objects held by the scripts as long as
// they are used. When they are not used anymore, the garbage
« no previous file with comments | « src/handles.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698