diff --git a/Objective-J/Bootstrap.js b/Objective-J/Bootstrap.js index 7f7be575f..a2477ceb8 100644 --- a/Objective-J/Bootstrap.js +++ b/Objective-J/Bootstrap.js @@ -70,6 +70,10 @@ if (typeof OBJJ_COMPILER_FLAGS !== 'undefined') case "SourceMap": flags.sourceMap = true; break; + + case "SourceMapIncludeSource": + flags.sourceMapIncludeSource = true; + break; } } FileExecutable.setCurrentCompilerFlags(flags); diff --git a/Objective-J/CFDictionary.js b/Objective-J/CFDictionary.js index f61412d37..3405f1382 100644 --- a/Objective-J/CFDictionary.js +++ b/Objective-J/CFDictionary.js @@ -171,6 +171,25 @@ CFDictionary.prototype.toString = function() DISPLAY_NAME(CFDictionary.prototype.toString); +CFDictionary.prototype.toJSObject = function() +{ + var jsObject = new Object(), + keys = this._keys, + index = 0, + count = this._count; + + for (; index < count; ++index) + { + var key = keys[index]; + + jsObject[key] = this.valueForKey(key); + } + + return jsObject; +}; + +DISPLAY_NAME(CFDictionary.prototype.toJSObject); + GLOBAL(CFMutableDictionary) = function(/*CFDictionary*/ aDictionary) { CFDictionary.apply(this, []); diff --git a/Objective-J/CPLog.js b/Objective-J/CPLog.js index 87e325cc7..c04bddcb0 100644 --- a/Objective-J/CPLog.js +++ b/Objective-J/CPLog.js @@ -192,6 +192,7 @@ GLOBAL(CPLogColorize) = function(aString, aLevel) GLOBAL(CPLogPrint) = function(aString, aLevel, aTitle, aFormatter) { + if (CPLogDisable) return; if (stream === undefined) { try { stream = require("narwhal/term").stream; diff --git a/Objective-J/Executable.js b/Objective-J/Executable.js index 17dd66a02..1e6636541 100644 --- a/Objective-J/Executable.js +++ b/Objective-J/Executable.js @@ -219,6 +219,8 @@ Executable.prototype.setCode = function(code, sourceMap) { this._code = code; + if (code == null) return; + var parameters = this.functionParameters().join(","); var sourceMapBase64;