summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
index 47b86ec9111..b40e145b028 100644
--- a/chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
+++ b/chromium/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
@@ -206,9 +206,11 @@ v8::MaybeLocal<v8::Value> CallMethodOnFrame(LocalFrame* local_frame,
v8::Local<v8::Value> object;
v8::Local<v8::Value> method;
if (!GetProperty(context, context->Global(), object_name).ToLocal(&object) ||
- !GetProperty(context, object, method_name).ToLocal(&method)) {
+ !GetProperty(context, object, method_name).ToLocal(&method) ||
+ !method->IsFunction()) {
return v8::MaybeLocal<v8::Value>();
}
+ CHECK(method->IsFunction());
return local_frame->DomWindow()
->GetScriptController()