Index: content/renderer/dom_automation_controller.cc |
diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc |
index 91b456a383290f2769466a03d394b5a18415a9a3..75189146f884b4a1cd43e6c1335f1fb8eb0750f4 100644 |
--- a/content/renderer/dom_automation_controller.cc |
+++ b/content/renderer/dom_automation_controller.cc |
@@ -98,17 +98,16 @@ bool DomAutomationController::SendMsg(const gin::Arguments& args) { |
// writer is lenient, and (b) on the receiving side we wrap the JSON string |
// in square brackets, converting it to an array, then parsing it and |
// grabbing the 0th element to get the value out. |
- if (!args.PeekNext().IsEmpty() && |
- (args.PeekNext()->IsString() || args.PeekNext()->IsBoolean() || |
- args.PeekNext()->IsNumber())) { |
+ if (!args.PeekNext().IsEmpty()) { |
V8ValueConverterImpl conv; |
value = |
conv.FromV8Value(args.PeekNext(), args.isolate()->GetCurrentContext()); |
} else { |
+ NOTREACHED() << "No arguments passed to domAutomationController.send"; |
return false; |
} |
- if (!serializer.Serialize(*value)) |
+ if (!value || !serializer.Serialize(*value)) |
return false; |
bool succeeded = Send(new FrameHostMsg_DomOperationResponse( |