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

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

Issue 1290063002: Debugger: do not expose global object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/debug/debug-scopes.cc ('k') | no next file » | 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 fcce24ff8ea4e559a9a4ed7156c0c990df4280ad..97c3ff48a9a6535208c91ceb733e3f7ae3fa5af4 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -1399,6 +1399,11 @@ static int DebugReferencedBy(HeapIterator* iterator, JSObject* target,
}
}
+ // Do not expose the global object directly.
+ if (obj->IsJSGlobalObject()) {
+ obj = JSGlobalObject::cast(obj)->global_proxy();
+ }
+
if (obj != NULL) {
// Valid reference found add to instance array if supplied an update
// count.
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698