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

Unified Diff: src/runtime/runtime-debug.cc

Issue 1938663002: [debugger] Add JSProxy support in Runtime::GetInternalProperties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | test/mjsunit/mirror-object.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index f1e009acff8e251a0b52e22d3e305f860da8af81..796de8de2d9ee8620a5a27230c104178aed909dd 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -273,6 +273,25 @@ MaybeHandle<JSArray> Runtime::GetInternalProperties(Isolate* isolate,
result->set(2, *promise_value);
result->set(3, *value_obj);
return factory->NewJSArrayWithElements(result);
+ } else if (object->IsJSProxy()) {
+ Handle<JSProxy> js_proxy = Handle<JSProxy>::cast(object);
+ Handle<FixedArray> result = factory->NewFixedArray(3 * 2);
+
+ Handle<String> handler_str =
+ factory->NewStringFromAsciiChecked("[[Handler]]");
+ result->set(0, *handler_str);
+ result->set(1, js_proxy->handler());
+
+ Handle<String> target_str =
+ factory->NewStringFromAsciiChecked("[[Target]]");
+ result->set(2, *target_str);
+ result->set(3, js_proxy->target());
+
+ Handle<String> is_revoked_str =
+ factory->NewStringFromAsciiChecked("[[IsRevoked]]");
+ result->set(4, *is_revoked_str);
+ result->set(5, isolate->heap()->ToBoolean(js_proxy->IsRevoked()));
+ return factory->NewJSArrayWithElements(result);
} else if (object->IsJSValue()) {
Handle<JSValue> js_value = Handle<JSValue>::cast(object);
« no previous file with comments | « no previous file | test/mjsunit/mirror-object.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698