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

Unified Diff: src/api-arguments-inl.h

Issue 2272383002: [api] Add interceptor for defineProperty(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@DefineProperty
Patch Set: Query descriptor triggers on defineProperty(). Created 4 years, 3 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/api-arguments.h ('k') | src/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api-arguments-inl.h
diff --git a/src/api-arguments-inl.h b/src/api-arguments-inl.h
index eefdf35adc0e1f7abf62f0a9c5f13cebe52bcb26..b1f7ffb3932066485ca54eb41743a79b108ab56a 100644
--- a/src/api-arguments-inl.h
+++ b/src/api-arguments-inl.h
@@ -80,6 +80,24 @@ Handle<Object> PropertyCallbackArguments::Call(
return GetReturnValue<Object>(isolate);
}
+Handle<Object> PropertyCallbackArguments::Call(
+ GenericNamedPropertyDefinerCallback f, Handle<Name> name,
+ const v8::PropertyDescriptor& desc) {
+ Isolate* isolate = this->isolate();
+ RuntimeCallTimerScope timer(
+ isolate, &RuntimeCallStats::GenericNamedPropertyDefinerCallback);
+ TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
+ isolate,
+ &tracing::TraceEventStatsTable::GenericNamedPropertyDefinerCallback);
+ VMState<EXTERNAL> state(isolate);
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
+ PropertyCallbackInfo<v8::Value> info(begin());
+ LOG(isolate,
+ ApiNamedPropertyAccess("interceptor-named-define", holder(), *name));
+ f(v8::Utils::ToLocal(name), desc, info);
+ return GetReturnValue<Object>(isolate);
+}
+
Handle<Object> PropertyCallbackArguments::Call(IndexedPropertySetterCallback f,
uint32_t index,
Handle<Object> value) {
@@ -97,6 +115,23 @@ Handle<Object> PropertyCallbackArguments::Call(IndexedPropertySetterCallback f,
return GetReturnValue<Object>(isolate);
}
+Handle<Object> PropertyCallbackArguments::Call(
+ IndexedPropertyDefinerCallback f, uint32_t index,
+ const v8::PropertyDescriptor& desc) {
+ Isolate* isolate = this->isolate();
+ RuntimeCallTimerScope timer(
+ isolate, &RuntimeCallStats::IndexedPropertyDefinerCallback);
+ TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_SCOPED(
+ isolate, &tracing::TraceEventStatsTable::IndexedPropertyDefinerCallback);
+ VMState<EXTERNAL> state(isolate);
+ ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
+ PropertyCallbackInfo<v8::Value> info(begin());
+ LOG(isolate,
+ ApiIndexedPropertyAccess("interceptor-indexed-define", holder(), index));
+ f(index, desc, info);
+ return GetReturnValue<Object>(isolate);
+}
+
void PropertyCallbackArguments::Call(AccessorNameSetterCallback f,
Handle<Name> name, Handle<Object> value) {
Isolate* isolate = this->isolate();
« no previous file with comments | « src/api-arguments.h ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698