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

Unified Diff: src/debug/mirrors.js

Issue 1840713002: [V8] Add FunctionMirror.prototype.contextDebugId method (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/mirrors.js
diff --git a/src/debug/mirrors.js b/src/debug/mirrors.js
index 9bd5cb98da7f74885e311480ea84a983dc27c756..881f303f29dd603466953bb1044f7f2356268360 100644
--- a/src/debug/mirrors.js
+++ b/src/debug/mirrors.js
@@ -1037,6 +1037,15 @@ FunctionMirror.prototype.toText = function() {
};
+FunctionMirror.prototype.context = function() {
+ if (this.resolved()) {
+ if (!this._context)
+ this._context = new ContextMirror(%FunctionGetContextData(this.value_));
+ return this._context;
+ }
+};
+
+
/**
* Mirror object for unresolved functions.
* @param {string} value The name for the unresolved function reflected by this
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698