summaryrefslogtreecommitdiff
path: root/js/src/Ice/Debug.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/Ice/Debug.js')
-rw-r--r--js/src/Ice/Debug.js29
1 files changed, 12 insertions, 17 deletions
diff --git a/js/src/Ice/Debug.js b/js/src/Ice/Debug.js
index 01ea0a27282..52172bd6879 100644
--- a/js/src/Ice/Debug.js
+++ b/js/src/Ice/Debug.js
@@ -7,22 +7,17 @@
//
// **********************************************************************
-(function(global){
-
- var Ice = global.Ice || {};
-
- var Debug = {
- assert: function(b, msg)
+var Ice = require("../Ice/ModuleRegistry").Ice;
+Ice.Debug =
+{
+ assert: function(b, msg)
+ {
+ if(!b)
{
- if(!b)
- {
- console.log(msg === undefined ? "assertion failed" : msg);
- console.log(Error().stack);
- process.exit(1);
- }
+ console.log(msg === undefined ? "assertion failed" : msg);
+ console.log(Error().stack);
+ process.exit(1);
}
- };
-
- Ice.Debug = Debug;
- global.Ice = Ice;
-}(typeof (global) === "undefined" ? window : global));
+ }
+};
+module.exports.Ice = Ice;