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

Unified Diff: include/v8.h

Issue 14425011: api: Object::CachedProperty Base URL: gh:v8/v8.git@master
Patch Set: globalize reference Created 7 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 | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index f300884965233b2d92eac5099e0731ab2bad7c97..3cd82cb7551f41f1f41360547ee6042e5048ca93 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -150,6 +150,7 @@ class Heap;
class HeapObject;
class Isolate;
class Object;
+class LookupCache;
}
@@ -1682,12 +1683,27 @@ enum AccessControl {
*/
class V8EXPORT Object : public Value {
public:
+ class V8EXPORT CachedProperty {
+ public:
+ explicit CachedProperty(Handle<String> key);
+
+ protected:
+ internal::LookupCache* cache_;
+ Persistent<String> key_;
+
+ friend class Object;
+ };
+
bool Set(Handle<Value> key,
Handle<Value> value,
PropertyAttribute attribs = None);
bool Set(uint32_t index, Handle<Value> value);
+ bool Set(CachedProperty key,
+ Handle<Value> value,
+ PropertyAttribute attribs = None);
+
// Sets a local property on this object bypassing interceptors and
// overriding accessors or read-only properties.
//
@@ -1704,6 +1720,8 @@ class V8EXPORT Object : public Value {
Local<Value> Get(uint32_t index);
+ Local<Value> Get(CachedProperty key);
+
/**
* Gets the property attributes of a property which can be None or
* any combination of ReadOnly, DontEnum and DontDelete. Returns
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698