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

Unified Diff: src/objects.h

Issue 2807333003: [api] Add DefineProperty() method that skips interceptors.
Patch Set: Previous commit with rebasing Created 3 years, 7 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index c375bb4848f533273fe0179222bfe4d2c71017e5..56a546df34c997218e8cd12cc432ca3630b946d3 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1982,17 +1982,19 @@ class JSReceiver: public HeapObject {
Handle<JSReceiver> object, uint32_t index,
LanguageMode language_mode = SLOPPY);
- MUST_USE_RESULT static Object* DefineProperty(Isolate* isolate,
- Handle<Object> object,
- Handle<Object> name,
- Handle<Object> attributes);
+ MUST_USE_RESULT static Object* DefineProperty(
+ Isolate* isolate, Handle<Object> object, Handle<Object> name,
+ Handle<Object> attributes,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
+
MUST_USE_RESULT static MaybeHandle<Object> DefineProperties(
Isolate* isolate, Handle<Object> object, Handle<Object> properties);
// "virtual" dispatcher to the correct [[DefineOwnProperty]] implementation.
MUST_USE_RESULT static Maybe<bool> DefineOwnProperty(
Isolate* isolate, Handle<JSReceiver> object, Handle<Object> key,
- PropertyDescriptor* desc, ShouldThrow should_throw);
+ PropertyDescriptor* desc, ShouldThrow should_throw,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
// ES6 7.3.4 (when passed DONT_THROW)
MUST_USE_RESULT static Maybe<bool> CreateDataProperty(
@@ -2001,9 +2003,11 @@ class JSReceiver: public HeapObject {
// ES6 9.1.6.1
MUST_USE_RESULT static Maybe<bool> OrdinaryDefineOwnProperty(
Isolate* isolate, Handle<JSObject> object, Handle<Object> key,
- PropertyDescriptor* desc, ShouldThrow should_throw);
+ PropertyDescriptor* desc, ShouldThrow should_throw,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
MUST_USE_RESULT static Maybe<bool> OrdinaryDefineOwnProperty(
LookupIterator* it, PropertyDescriptor* desc, ShouldThrow should_throw);
+
// ES6 9.1.6.2
MUST_USE_RESULT static Maybe<bool> IsCompatiblePropertyDescriptor(
Isolate* isolate, bool extensible, PropertyDescriptor* desc,
@@ -8232,7 +8236,8 @@ class JSProxy: public JSReceiver {
// ES6 9.5.6
MUST_USE_RESULT static Maybe<bool> DefineOwnProperty(
Isolate* isolate, Handle<JSProxy> object, Handle<Object> key,
- PropertyDescriptor* desc, ShouldThrow should_throw);
+ PropertyDescriptor* desc, ShouldThrow should_throw,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
// ES6 9.5.7
MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate,
@@ -8640,7 +8645,8 @@ class JSTypedArray: public JSArrayBufferView {
// ES6 9.4.5.3
MUST_USE_RESULT static Maybe<bool> DefineOwnProperty(
Isolate* isolate, Handle<JSTypedArray> o, Handle<Object> key,
- PropertyDescriptor* desc, ShouldThrow should_throw);
+ PropertyDescriptor* desc, ShouldThrow should_throw,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
DECLARE_CAST(JSTypedArray)
@@ -8768,15 +8774,16 @@ class JSArray: public JSObject {
// ES6 9.4.2.1
MUST_USE_RESULT static Maybe<bool> DefineOwnProperty(
Isolate* isolate, Handle<JSArray> o, Handle<Object> name,
- PropertyDescriptor* desc, ShouldThrow should_throw);
+ PropertyDescriptor* desc, ShouldThrow should_throw,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
static bool AnythingToArrayLength(Isolate* isolate,
Handle<Object> length_object,
uint32_t* output);
- MUST_USE_RESULT static Maybe<bool> ArraySetLength(Isolate* isolate,
- Handle<JSArray> a,
- PropertyDescriptor* desc,
- ShouldThrow should_throw);
+ MUST_USE_RESULT static Maybe<bool> ArraySetLength(
+ Isolate* isolate, Handle<JSArray> a, PropertyDescriptor* desc,
+ ShouldThrow should_throw,
+ CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS);
// Checks whether the Array has the current realm's Array.prototype as its
// prototype. This function is best-effort and only gives a conservative
« include/v8.h ('K') | « src/builtins/builtins-object.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698