Skip to content

Commit

Permalink
Massive refactor. Control flow is greatly simplified, fewer tasks are…
Browse files Browse the repository at this point in the history
… used (thanks to select2), easier to understand the flow of the code, factored into smaller functions.
  • Loading branch information
fzzzy committed Mar 1, 2012
1 parent ea2f989 commit 188ab1d
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 156 deletions.
4 changes: 2 additions & 2 deletions js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import comm::chan;
import ctypes::{ size_t, void, c_int, c_uint };
import ptr::null;

export new_runtime, get_thread_runtime, runtime, new_context, context, begin_request, end_request, set_options, set_version, new_class;
export new_runtime, get_thread_runtime, runtime, new_context, context, begin_request, end_request, set_options, set_version, new_class, class;
export new_compartment_and_global_object, object, init_standard_classes, options;
export null_principals, compile_script, execute_script, value_to_source;
export null_principals, compile_script, script, execute_script, value_to_source;
export get_string_bytes, get_string, get_int, set_data_property, ext;
export error_report, jsrust_message;

Expand Down
14 changes: 8 additions & 6 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@

print("Hello, world!");
print(document);
/*print(document);
document._setMutationHandler(function(mut) {
print(JSON.stringify(mut));
});
});*/

// The network layer sometimes deadlocks; disable for now
//window.location = "http://127.0.0.1/";
postMessage(4, [12,34,"Hello!"]);

postMessage(0, [12,34,"Hello!"]);
/*
disabled until uv settles down
window.location = "http://127.0.0.1/";
setTimeout(function() {print("timeout1")}, 100);
setTimeout(function() {print("timeout2")}, 200);
setTimeout(function() {print("timeout3")}, 300);
setTimeout(function() {print("timeout4!!!")}, 400);

*/
Loading

0 comments on commit 188ab1d

Please sign in to comment.