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

Unified Diff: src/inspector/v8-console.cc

Issue 2391323002: [inspector] command line api debug and monitor works with bound functions (Closed)
Patch Set: addressed comments Created 4 years, 2 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/inspector/debugger/command-line-api-with-bound-function.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-console.cc
diff --git a/src/inspector/v8-console.cc b/src/inspector/v8-console.cc
index b094de10b0469f213ec118d72992279bed7170c4..0fb8045de06be03a11d15d13849a28d907af891f 100644
--- a/src/inspector/v8-console.cc
+++ b/src/inspector/v8-console.cc
@@ -139,7 +139,10 @@ class ConsoleHelper {
v8::MaybeLocal<v8::Function> firstArgAsFunction() {
if (m_info.Length() < 1 || !m_info[0]->IsFunction())
return v8::MaybeLocal<v8::Function>();
- return m_info[0].As<v8::Function>();
+ v8::Local<v8::Function> func = m_info[0].As<v8::Function>();
+ while (func->GetBoundFunction()->IsFunction())
+ func = func->GetBoundFunction().As<v8::Function>();
+ return func;
}
v8::MaybeLocal<v8::Map> privateMap(const char* name) {
« no previous file with comments | « no previous file | test/inspector/debugger/command-line-api-with-bound-function.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698