diff lib/js/urweb.js @ 1446:36f7d1debb37

Each context gets its own non-repeating sequence of source numbers
author Adam Chlipala <adam@chlipala.net>
date Sat, 09 Apr 2011 14:36:47 -0400
parents 449a12b82db7
children 17393c5e2b90
line wrap: on
line diff
--- a/lib/js/urweb.js	Mon Mar 28 10:37:49 2011 -0400
+++ b/lib/js/urweb.js	Sat Apr 09 14:36:47 2011 -0400
@@ -734,8 +734,14 @@
             } catch (e) { }
 
             if (isok) {
+                var lines = xhr.responseText.split("\n");
+                if (lines.length != 2)
+                    whine("Bad RPC response lines");
+
+                eval(lines[0]);
+
                 try {
-                    k(parse(xhr.responseText));
+                    k(parse(lines[1]));
                 } catch (v) {
                     doExn(v);
                 }