Index: mojo/public/js/new_bindings/interface_types.js |
diff --git a/mojo/public/js/new_bindings/interface_types.js b/mojo/public/js/new_bindings/interface_types.js |
index 01ea2d1dd466a76f2f5ccb1259efe0eac00a1677..c52f6c7e551668129baca00fc46d5b8c4de82b61 100644 |
--- a/mojo/public/js/new_bindings/interface_types.js |
+++ b/mojo/public/js/new_bindings/interface_types.js |
@@ -2,10 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-define("mojo/public/js/interface_types", [ |
- "mojo/public/js/core", |
-], function(core) { |
- |
+(function() { |
// --------------------------------------------------------------------------- |
function InterfacePtrInfo(handle, version) { |
@@ -14,14 +11,14 @@ define("mojo/public/js/interface_types", [ |
} |
InterfacePtrInfo.prototype.isValid = function() { |
- return core.isHandle(this.handle); |
+ return this.handle instanceof MojoHandle; |
}; |
InterfacePtrInfo.prototype.close = function() { |
if (!this.isValid()) |
return; |
- core.close(this.handle); |
+ this.handle.close(); |
this.handle = null; |
this.version = 0; |
}; |
@@ -33,20 +30,17 @@ define("mojo/public/js/interface_types", [ |
} |
InterfaceRequest.prototype.isValid = function() { |
- return core.isHandle(this.handle); |
+ return this.handle instanceof MojoHandle; |
}; |
InterfaceRequest.prototype.close = function() { |
if (!this.isValid()) |
return; |
- core.close(this.handle); |
+ this.handle.close(); |
this.handle = null; |
}; |
- var exports = {}; |
- exports.InterfacePtrInfo = InterfacePtrInfo; |
- exports.InterfaceRequest = InterfaceRequest; |
- |
- return exports; |
-}); |
+ mojo.InterfacePtrInfo = InterfacePtrInfo; |
+ mojo.InterfaceRequest = InterfaceRequest; |
+})(); |