Author: roger
Date: Sun May 22 09:59:34 2011
New Revision: 1125892

URL: http://svn.apache.org/viewvc?rev=1125892&view=rev
Log:
THRIFT-1176 Thrift compiler global leakage js
Patch: Dan Di Spaltro

includes updated test.html to get qunit.js with correct mime-type(IE9 complains)
Fixed by Roger Meier

Modified:
    thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc
    thrift/trunk/lib/js/test/test.html

Modified: thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc
URL: 
http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc?rev=1125892&r1=1125891&r2=1125892&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_js_generator.cc Sun May 22 
09:59:34 2011
@@ -1645,7 +1645,7 @@ string t_js_generator::declare_field(t_f
   string result = "this." + tfield->get_name();
 
   if(!obj){
-      result = tfield->get_name();
+      result = "var " + tfield->get_name();
   }
 
   if (init) {

Modified: thrift/trunk/lib/js/test/test.html
URL: 
http://svn.apache.org/viewvc/thrift/trunk/lib/js/test/test.html?rev=1125892&r1=1125891&r2=1125892&view=diff
==============================================================================
--- thrift/trunk/lib/js/test/test.html (original)
+++ thrift/trunk/lib/js/test/test.html Sun May 22 09:59:34 2011
@@ -33,8 +33,8 @@
   <script type="text/javascript" src="json2.js" charset="utf-8"></script>
 
   <!-- QUnit Test framework-->
-  <script type="text/javascript" 
src="http://github.com/jquery/qunit/raw/master/qunit/qunit.js"; 
charset="utf-8"></script>
-  <link rel="stylesheet" 
href="http://github.com/jquery/qunit/raw/master/qunit/qunit.css"; 
type="text/css" media="screen" />
+  <script type="text/javascript" 
src="http://code.jquery.com/qunit/git/qunit.js"; charset="utf-8"></script>
+  <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css"; 
type="text/css" media="screen" />
 
   <script type="text/javascript" charset="utf-8">
   //<![CDATA[


Reply via email to