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

Unified Diff: src/objects.h

Issue 7369001: Implement delete trap for proxies. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Mads' comments. 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 9765fe2a0ab242f897145ea7d763ea21a8616b27..00267595c2f3850587fbf8bf4ca25caeb65b013f 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1359,6 +1359,12 @@ class HeapNumber: public HeapObject {
// JSObject and JSProxy.
class JSReceiver: public HeapObject {
public:
+ enum DeleteMode {
+ NORMAL_DELETION,
+ STRICT_DELETION,
+ FORCE_DELETION
+ };
+
// Casting.
static inline JSReceiver* cast(Object* obj);
@@ -1373,6 +1379,8 @@ class JSReceiver: public HeapObject {
PropertyAttributes attributes,
StrictModeFlag strict_mode);
+ MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode);
+
// Returns the class name ([[Class]] property in the specification).
String* class_name();
@@ -1422,12 +1430,6 @@ class JSReceiver: public HeapObject {
// caching.
class JSObject: public JSReceiver {
public:
- enum DeleteMode {
- NORMAL_DELETION,
- STRICT_DELETION,
- FORCE_DELETION
- };
-
enum ElementsKind {
// The "fast" kind for tagged values. Must be first to make it possible
// to efficiently check maps if they have fast elements.
@@ -6491,14 +6493,18 @@ class JSProxy: public JSReceiver {
static inline JSProxy* cast(Object* obj);
MUST_USE_RESULT MaybeObject* SetPropertyWithHandler(
- String* name_raw,
- Object* value_raw,
+ String* name,
+ Object* value,
PropertyAttributes attributes,
StrictModeFlag strict_mode);
+ MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler(
+ String* name,
+ DeleteMode mode);
+
MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler(
JSReceiver* receiver,
- String* name_raw,
+ String* name,
bool* has_exception);
// Dispatched behavior.
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698