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

Unified Diff: content/renderer/dom_automation_controller.cc

Issue 2453693003: Browser tests for OOPIF support for drag-n-drop. (Closed)
Patch Set: Giving up and going back to using notifications. Created 4 years, 1 month 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: 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(

Powered by Google App Engine
This is Rietveld 408576698