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

Unified Diff: mojo/public/js/bindings/connector.js

Issue 411553003: Validate incoming JS Message Headers: test message parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed WebUIMojoTest.EndToEndPing Created 6 years, 5 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
« no previous file with comments | « mojo/public/js/bindings/codec_unittests.js ('k') | mojo/public/js/bindings/constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/bindings/connector.js
diff --git a/mojo/public/js/bindings/connector.js b/mojo/public/js/bindings/connector.js
index 51022b0e45f89468e78e409860a3aec766e3fa3e..cf7c93b8773e0345bdf36d3646d31a8443f7a2df 100644
--- a/mojo/public/js/bindings/connector.js
+++ b/mojo/public/js/bindings/connector.js
@@ -3,10 +3,11 @@
// found in the LICENSE file.
define("mojo/public/js/bindings/connector", [
+ "mojo/public/js/bindings/buffer",
"mojo/public/js/bindings/codec",
"mojo/public/js/bindings/core",
"mojo/public/js/bindings/support",
-], function(codec, core, support) {
+], function(buffer, codec, core, support) {
function Connector(handle) {
this.handle_ = handle;
@@ -95,8 +96,8 @@ define("mojo/public/js/bindings/connector", [
this.errorHandler_.onError(read.result);
return;
}
- var buffer = new codec.Buffer(read.buffer);
- var message = new codec.Message(buffer, read.handles);
+ var messageBuffer = new buffer.Buffer(read.buffer);
+ var message = new codec.Message(messageBuffer, read.handles);
if (this.incomingReceiver_) {
this.incomingReceiver_.accept(message);
}
« no previous file with comments | « mojo/public/js/bindings/codec_unittests.js ('k') | mojo/public/js/bindings/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698