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

Unified Diff: mojo/apps/js/test/js_to_cpp_unittest.js

Issue 282063003: Fix handling of null pointers in JS bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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: mojo/apps/js/test/js_to_cpp_unittest.js
diff --git a/mojo/apps/js/test/js_to_cpp_unittest.js b/mojo/apps/js/test/js_to_cpp_unittest.js
index 86d395bcf5d7b1877409a72d6981db701540e12d..557b57d488417429c9b7e718f6befe397b9e2c01 100644
--- a/mojo/apps/js/test/js_to_cpp_unittest.js
+++ b/mojo/apps/js/test/js_to_cpp_unittest.js
@@ -29,11 +29,13 @@ define('mojo/apps/js/test/js_to_cpp_unittest', [
this.cppSide_.pingResponse();
};
- JsSideConnection.prototype.echo = function (numIterations, arg) {
+ JsSideConnection.prototype.echo = function (numIterations, list) {
+ var arg = list.item;
var arg2;
var dataPipe1;
var dataPipe2;
var i;
+ var list;
Matt Perry 2014/05/16 18:39:04 this looks unused
var messagePipe1;
var messagePipe2;
@@ -70,7 +72,13 @@ define('mojo/apps/js/test/js_to_cpp_unittest', [
writeDataPipe(dataPipe1, senderData);
writeDataPipe(dataPipe2, senderData);
- this.cppSide_.echoResponse(arg, arg2);
+
+ var list = new jsToCpp.EchoArgsList();
Matt Perry 2014/05/16 18:39:04 use a different variable name - this one shadows t
Tom Sepez 2014/05/16 18:57:17 Yeah, I noticed this soon after posting this. Done
+ list.next = new jsToCpp.EchoArgsList();
+ list.item = arg2;
+ list.next.item = arg;
+
+ this.cppSide_.echoResponse(list);
core.close(dataPipe1.producerHandle);
core.close(dataPipe2.producerHandle);

Powered by Google App Engine
This is Rietveld 408576698