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

Unified Diff: Source/bindings/core/v8/ScriptFunctionCall.cpp

Issue 1104233004: DevTools: rebaseline inspector tests with poor expectations (2). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments addressed Created 5 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
Index: Source/bindings/core/v8/ScriptFunctionCall.cpp
diff --git a/Source/bindings/core/v8/ScriptFunctionCall.cpp b/Source/bindings/core/v8/ScriptFunctionCall.cpp
index 03f58c2e745d863e41a726c07a06b1c2789a234a..40227b54009d3c9883c8205f89dcec0435c50901 100644
--- a/Source/bindings/core/v8/ScriptFunctionCall.cpp
+++ b/Source/bindings/core/v8/ScriptFunctionCall.cpp
@@ -135,4 +135,17 @@ ScriptValue ScriptFunctionCall::call()
return call(hadException);
}
+v8::Handle<v8::Function> ScriptFunctionCall::function()
+{
+ v8::TryCatch tryCatch;
+ v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_thisObject.v8Value());
+ v8::Local<v8::Value> value;
+ if (!thisObject->Get(m_scriptState->context(), v8String(m_scriptState->isolate(), m_name)).ToLocal(&value))
+ return v8::Handle<v8::Function>();
+
+ ASSERT(value->IsFunction());
+ return v8::Local<v8::Function>::Cast(value);
+}
+
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698