summaryrefslogtreecommitdiff
path: root/test/wasm.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm.js')
-rw-r--r--test/wasm.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/wasm.js b/test/wasm.js
index 6f208ef6..7b38c18a 100644
--- a/test/wasm.js
+++ b/test/wasm.js
@@ -14,9 +14,19 @@
* limitations under the License.
*/
-/* polyfill from SM to D8 */
+/* polyfill from SM/CH to D8 */
if (typeof arguments == 'undefined') {
- arguments = scriptArgs;
+ if (typeof scriptArgs != 'undefined') {
+ arguments = scriptArgs;
+ } else if(typeof WScript != 'undefined') {
+ arguments = WScript.Arguments || [];
+ }
+}
+
+if (typeof quit == 'undefined') {
+ if (typeof WScript != 'undefined') {
+ quit = WScript.quit;
+ }
}
if (typeof readbuffer == 'undefined') {