diff options
author | Kenneth Pouncey <kjpou@pt.lu> | 2019-10-21 06:44:57 +0300 |
---|---|---|
committer | Larry Ewing <lewing@microsoft.com> | 2019-10-21 18:21:16 +0300 |
commit | 2cea0a89d18b445960bc6ba07124163a8424e8ec (patch) | |
tree | 4c8c5fb86397fdbbc56bfe1016de0af1d868ddf4 /sdks | |
parent | 0d357c13478d40b1a5e3646e7e03e869ee0a63bf (diff) |
Fix host object existence check.
- The checking for the existence of the object is incorrect: Missing parens around undefined.
- Modify error description returned back to managed code.
- Fix capitalization in global object check error.
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/wasm/src/binding_support.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sdks/wasm/src/binding_support.js b/sdks/wasm/src/binding_support.js index 2b945f53e51..98bdcfe2a5a 100644 --- a/sdks/wasm/src/binding_support.js +++ b/sdks/wasm/src/binding_support.js @@ -928,7 +928,7 @@ var BindingSupportLib = { if (typeof ___mono_wasm_global___ === 'object') { return ___mono_wasm_global___; } - throw Error('unable to get mono wasm global object.'); + throw Error('Unable to get mono wasm global object.'); }, }, @@ -1151,9 +1151,9 @@ var BindingSupportLib = { var coreObj = BINDING.mono_wasm_get_global()[js_name]; - if (coreObj === null || typeof coreObj === undefined) { + if (coreObj === null || typeof coreObj === "undefined") { setValue (is_exception, 1, "i32"); - return BINDING.js_string_to_mono_string ("Global object '" + js_name + "' not found."); + return BINDING.js_string_to_mono_string ("JavaScript host object '" + js_name + "' not found."); } var js_args = BINDING.mono_array_to_js_array(args); |