THRIFT-1044 Fix JavaScript inheritance 
Patch Wade Simmons


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1062279 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/js/thrift.js b/lib/js/thrift.js
index fbdc809..c06e27a 100644
--- a/lib/js/thrift.js
+++ b/lib/js/thrift.js
@@ -723,4 +723,10 @@
   return length;
 }
 
-
+Thirft.inherits = function(constructor, superConstructor) {
+  // Prototypal Inheritance
+  // http://javascript.crockford.com/prototypal.html
+  function F() {}
+  F.prototype = superConstructor.prototype;
+  constructor.prototype = new F();
+}